Волны H-поляризации
Ядро PlanarRT_H (в диссертации — Tamic Rt-H) рассчитывает во временной области волны H-поляризации в области с произвольным распределением диэлектрической проницаемости. На этой странице выведена схема узла Rτ-сетки, формула, по которой ядро пересчитывает напряжения узлов на каждом такте, и показано, как в узел заносится вещество. Основа — Rτ-схема элемента пространства со страницы о методе. Как это устроено в программе — Счётное ядро H.
Постановка
Рассматривается двумерная задача: геометрия и поля не зависят от координаты . У волн H-поляризации отличны от нуля компоненты , , (, ), т. е. электрическое поле перпендикулярно плоскости расчёта, а магнитное лежит в ней. Так описываются, например, H-плоскостные волноводные устройства — волна прямоугольного волновода в плоскости вектора [Климов, 2007, рис. 9.8]. Для монохроматической волны уравнения Максвелла сводятся к (2.4) и уравнению Гельмгольца [Климов, 2025, (2.4), (2.5)]:
Задача ядра: по заданным сигналам на портах найти во времени напряжения всех узлов сетки и сигналы, отражённые и прошедшие на порты. Среда задаётся распределением ; магнитная проницаемость в ядре H равна (алгоритмы для магнитного заполнения — в разделе Магнитная проницаемость). Границы — металл, магнитная стенка, поглотитель (граничные условия), возбуждение — через порты (порты).
Схема узла
Если магнитного заполнения нет (), в схеме элемента нет последовательных шлейфов, и после объединения четырёх параллельных шлейфов, подходящих к узлу, получается сетка, в которой каждый узел — параллельное соединение [Климов, 2025, разд. 4.1, рис. 4.3, 4.4]:
- четырёх отрезков линий к соседним узлам 1–4 с волновыми проводимостями и задержкой ;
- одного шлейфа с волновой проводимостью и задержкой — холостого хода (ХХ) при или короткого замыкания (КЗ) при ;
- активной проводимости (потери; во внутренних узлах ).
2 (сосед сверху)
│
│ Y2, τ0
│ шлейф Y5, τ0/2 (ХХ или КЗ)
1 ───────── Y1, τ0 ─●─ Y3, τ0 ───────── 3
(сосед слева) │╲ (сосед справа)
│ Y (потери)
│ Y4, τ0
│
4 (сосед снизу)
Характер шлейфа и его проводимость определяются средней проницаемостью четырёх ячеек вокруг узла (сетка) [Климов, 2025, (4.3), (4.4)]:
Когда все линии сетки одинаковы (), удобно перейти к нормированным величинам , .
В программе тип шлейфа хранится знаком: — шлейф ХХ, — шлейф КЗ ( с отрицательной ). Тогда обе ветви алгоритма записываются одной формулой с в знаменателе (рассеяние). На узел хранятся четыре числа: два напряжения и два коэффициента:
| Ячейка | Содержимое |
|---|---|
prUNode1[2n], prUNode1[2n+1] |
напряжение узла на двух последних тактах |
prYNode[2n] |
со знаком |
prYNode[2n+1] |
множитель |
Это ровно тот набор, который назван в [Климов, 2025, разд. 4.1]: «кроме хранения значений напряжений за два предыдущих временных такта необходимо хранить значения и , то есть расход памяти составляет четыре вещественных числа на каждый узел сетки».
Рассеяние в узле
Пусть , , — напряжения центрального узла 0 в моменты , , , а — напряжения соседних узлов в момент . Напряжение узла через падающие на него волны со стороны входов [Климов, 2025, (4.10)]:
То же выражение для момента , переписанное через отражённые волны , даёт [Климов, 2025, (4.13)]
Падающие волны выражаются через напряжения соседей и отражённые волны (обмен волнами). Подставив их и исключив отражённые волны с помощью (4.13), получают формулу, в которую входят только напряжения узлов [Климов, 2025, (4.16)–(4.19)]:
где «+» перед — шлейф ХХ (), «−» — шлейф КЗ (). При одинаковых линиях [Климов, 2025, (4.20)]
и без потерь () [Климов, 2025, (4.21)]
Алгоритм называется двухпараметрическим: для нового такта нужны значения напряжений за два предыдущих такта. На один узел и один такт — пять сложений-вычитаний и два умножения.
Формула в программе. Со знаковым формула (4.21) принимает вид
и в коде это одна строка на узел (подтакт 0, RunScatteringNode1line):
U[2n] = Y[2n+1] * ( U[2n-1] + U[2n+3] + U[2n+1-2nX] + U[2n+1+2nX] + Y[2n]*U[2n+1] ) - U[2n]
Здесь U — массив prUNode1, Y — prYNode; U[2n-1] и U[2n+3] — нечётные ячейки
соседей слева и справа, U[2n+1-2nX] и U[2n+1+2nX] — соседей снизу и сверху, U[2n+1] —
самого узла, все на такте ; U[2n] справа — самого узла, слева —
новое . Внутренние узлы (,
) обходятся построчно и парами. Крайние узлы области не пересчитываются
(края области).
Обмен волнами между узлами
Узлы соединены отрезками линий с задержкой . Волна, отражённая от узла в сторону узла 0 в момент , приходит в узел 0 в момент как падающая [Климов, 2025, (4.14)]:
где , — отражённая от узла к узлу 0 и падающая на узел от узла 0 волны, а — волна, отражённая от узла 0 к узлу на такт раньше.
Шлейф имеет задержку : волна, ушедшая в шлейф, возвращается через . На холостом ходе она отражается без смены знака, на коротком замыкании — с изменением фазы на 180° [Климов, 2025, (4.15), (4.17)]:
Именно эта разница знаков даёт «±» перед в формуле узла.
В программе обмен волнами отдельной операцией не выполняется и волны не хранятся: он уже заложен в формулу (рассеяние) через напряжения соседей на прошлом такте и собственное напряжение на позапрошлом. Узлы с другими схемами — порты, поглотители, магнитные стенки — используют ту же идею с половинными линиями вдоль контура и нагрузками (граничные условия, порты).
Подтакты одного шага
Формула узла связывает три временных слоя: , , . Хранить три массива не нужно: новое значение записывается на место , которое после этого больше не требуется. Поэтому на узел отводятся две ячейки, и роли ячеек чередуются:
| Подтакт | Пишется (новое вместо ) | Читается ( соседей и узла) | Функции |
|---|---|---|---|
| 0 | чётная ячейка prUNode1[2n] |
нечётные ячейки | RunExciteInputs, RunScatteringNode, RunBlockNode |
| 1 | нечётная ячейка prUNode1[2n+1] |
чётные ячейки | RunExciteInputs1, RunScatteringNode1, RunBlockNode1 |
Каждый подтакт продвигает расчёт на один такт . На подтакте выполняются по порядку:
- возбуждение портов и запись сигналов портов в файл
.t(порты); - рассеяние во всех внутренних узлах сетки по (4.21);
- граничные условия блоков — металл, поглотитель, магнитная стенка (граничные условия);
- вывод кадра поля (если включён);
- накопление поля для диаграммы направленности (ДН).
Один проход цикла RunKernel1T — два подтакта. Внутри подтакта узлы независимы: каждый
пишет только свою ячейку и читает только ячейки другой чётности, поэтому порядок обхода узлов
не влияет на результат — это используется при расчёте на видеокарте
(GPU). У ядра X схема связывает больше слоёв, и подтактов четыре
(подтакты X).
Диэлектрик (eps) и проводимость шлейфа
Задание. Блоки диэлектрика (RECT_STAT, CIRCLE_STAT, POLYGON_STAT, FILE и др.)
задают выражение eps, значение которого для ядра H — это добавка к вакууму
(относительная проницаемость минус единица). В выражение
могут входить координаты узла , относительно точки привязки блока, расстояние и
полярный угол .
Средняя проницаемость узла. В узел заносится , где вес — доля окружающих узел ячеек, лежащих в блоке. Вклады всех блоков складываются, поэтому в узле накапливается
что соответствует среднему по четырём ячейкам (4.2) (ячейки вне блоков — вакуум,
). У прямоугольника вес равен 1 внутри, 0,5 на стороне и 0,25 в
углу. У круга, кольцевого сектора и многоугольника в программе вес набирается по 0,25 за
каждую из четырёх диагональных точек , попавшую в фигуру. Блок
FILE читает из файла .eps уже взвешенные значения.
Перевод в проводимость шлейфа. После построения всех блоков каждое накопленное значение узла переводится в нормированную проводимость шлейфа по (4.3), (4.4) [Климов, 2025]:
и записывается множитель . Здесь , так как .
Особенности программы:
- Формулы перевода — приближение точных соотношений (2.43), (2.45),
в которых проводимость шлейфа отличается множителем
(ХХ) или обратным ему (КЗ). В программе поправочный множитель равен 1: переменная
koef1() используется только для проверки (иначе ошибка «very big Delta*Frequence»), а строка с поправкойkoef1/tan(koef1)закомментирована. - Значения , отличающиеся от 4 меньше чем на 0,004, сдвигаются до 3,996 или 4,004.
- Для проводимость от частоты не зависит; для
она пропорциональна квадрату частоты задания
FREQ: заданная относится к этой частоте, а на других частотах среда ведёт себя как среда с частотной дисперсией (ниже). - При записи топологии выполняется обратный пересчёт: при и при .
- Тем же правилом по параметру W порта (это среды входа) вычисляется шлейф узлов порта (параметр W).
Распространение. Для узлов со шлейфом КЗ волны распространяются, пока , т. е. пока (2.49). При волна в такой среде затухает — расчёт при этом устойчив (устойчивость).
Магнитная проницаемость
В программе ядро H моделирует только диэлектрическое заполнение ( во всех
узлах). Блок «магнитная стенка» (MAGNETIC) — это граничное условие холостого хода, а не
магнитная проницаемость (граничные условия). Ниже кратко изложены
алгоритмы для магнитного заполнения, построенные в [Климов, 2025, разд. 4.2–4.4].
Неоднородное магнитное заполнение (, разд. 4.2). В схеме элемента нет параллельных шлейфов, но есть последовательные; напряжения в узлах параллельного соединения линий определять нецелесообразно, и алгоритм строится через токи в узлах последовательного включения шлейфов (узлы 01, 02, 03, 04 на рис. 4.10). Каждый такой узел лежит на середине линии между соседними узлами сетки; шлейф определяется средней проницаемостью двух соседних ячеек (4.23):
(4.24), (4.25). Токи вычисляются с шагом , но сдвинуты относительно напряжений на . Без магнитных потерь () при одинаковых линиях [Климов, 2025, (4.73), (4.74)]:
а при к правой части добавляется , . На узел и такт — девять сложений-вычитаний и четыре умножения; хранятся токи за два такта, и . Алгоритм тоже двухпараметрический и устойчив при любых , в том числе . При объединении двух последовательных шлейфов в один сделано допущение об их параллельном соединении; по [Климов, 2025] величина возникающей при этом ошибки требует отдельного исследования.
Модифицированный вариант без магнитных потерь (разд. 4.3) снова вычисляет напряжения узлов параллельного соединения, а для каждого последовательного шлейфа хранит удвоенное напряжение отражённой в шлейф волны [Климов, 2025, (4.90), (4.91)]:
где при и при (4.78), (4.79).
Сравнение алгоритмов [Климов, 2025, табл. 4.3] — на один элементарный объём и один такт:
| Тип области | Хранимые числа | Сложения-вычитания | Умножения | Записи в память |
|---|---|---|---|---|
| магнитное заполнение с магнитными потерями | 10 | 22 | 10 | 2 |
| магнитное заполнение без потерь | 8 | 18 | 8 | 2 |
| диэлектрическое заполнение с электрическими потерями | 5 | 6 | 3 | 1 |
| диэлектрическое заполнение без потерь | 4 | 5 | 2 | 1 |
Скорость счёта определяется в основном числом записей вещественных чисел в память, поэтому при организации программы важно учитывать, есть ли в задаче диэлектрическое или магнитное заполнение [Климов, 2025, разд. 4.4]. Внутренние узлы ядра H считаются по самому экономному алгоритму — последней строке таблицы.
Среды с частотной дисперсией
Зависимость проницаемостей от частоты делает их интегро-дифференциальными операторами во временной области [Климов, 2025, разд. 2.3, (2.32), (2.33)]. Для плазмы без внешнего магнитного поля () первое уравнение Максвелла принимает вид [Климов, 2025, (2.37)]
что для монохроматических колебаний даёт известную зависимость [Климов, 2025, (2.38)]
Это уравнение тождественно уравнению сетки с индуктивностью , которая моделирует (RLC-схема): «можно сделать вывод об идентичности моделей, которые описываются и импедансными сетками, и плазмой в отсутствие магнитного поля» [Климов, 2025, разд. 2.3].
Что это значит для ядра H. Шлейф КЗ узла с имеет постоянную проводимость , т. е. моделирует постоянную индуктивность (в приближении ). Ей соответствует отрицательная добавка к ёмкости, убывающая как . Если в задании на частоте задана , то на любой частоте сетка ведёт себя как среда
т. е. как плазма без внешнего поля с плазменной частотой . Частота FREQ
задаёт лишь точку, в которой равна заданной; сам расчёт во временной области
учитывает дисперсию во всей полосе сигнала. Узлы с (шлейф ХХ,
ёмкость) в том же приближении дисперсии не имеют.
Такая постановка проверена в [Климов, 2007, разд. 9.5.4]: рассеяние переднего фронта радиоимпульса на слое с проницаемостью вида (2.38), равной 0,25 на частоте заполнения 20 ГГц, рассчитанное программой Rt-H, хорошо согласуется с аналитическим решением (точность H).
Аналогично строится среда с магнитной проницаемостью (2.39), (2.40); в ядре H она не реализована. Подмагниченная плазма с тензорной проницаемостью (2.34), (2.35) рассчитывается ядром X — см. учёт частотной зависимости во временной схеме.
Потери
Удельные электрические потери и магнитные потери входят в уравнения [Климов, 2025, (2.28), (2.29)] как проводимость, параллельная ёмкости, и сопротивление, последовательное с индуктивностью. В схеме узла электрические потери — активная проводимость , и формула узла с потерями — (4.20) (рассеяние). Положительная проводимость только поглощает энергию и устойчивости не нарушает (устойчивость).
В программе внутренние узлы ядра H считаются без потерь по (4.21); объёмные потери диэлектрика в ядре H не задаются (потери и проводимость среды есть в ядре X — столкновения и проводимость). Активная проводимость в ядре H используется в узлах двух видов:
- поглотитель — нагрузка узлов контура, согласованная с плоской волной, падающей по нормали (поглощающая граница):
где — шлейф среды (у блока поглотителя , вакуум); выражение для — дисперсионное уравнение сетки для плоской волны вдоль оси (дисперсия); - порт — нагрузка, согласованная с основной волной волновода порта (трансформатор).
Вычисление полей из напряжений
Компоненты поля связаны с величинами схемы соотношениями (2.7):
где , — токи в линиях сетки вдоль осей. Ток линии выражается через бегущие по ней волны: (рис. 4.18 в [Климов, 2025]). Поэтому, зная напряжения узлов в каждый момент времени, можно определить все не равные нулю компоненты поля [Климов, 2025, разд. 4.1].
В программе ядро H выводит напряжения узлов , т. е. величину, пропорциональную (в планарной задаче — масштабный множитель, а масштаб задаётся амплитудой сигнала порта):
- кадры поля — значения всех узлов на такте, строками снизу вверх; их показывает FieldView (вывод ядра);
- накопление для диаграммы направленности — квадратуры на частоте (контур в ближней зоне);
- топология — полная каждого узла, пересчитанная из .
Компоненты , ядро H не вычисляет и не записывает.
Соответствие в коде
| Символ / действие | Переменная, функция | Файл (src/kernels/planarrt_h/) |
|---|---|---|
| , узла | prUNode1[2n], prUNode1[2n+1] (роли чередуются по подтактам) |
tmcrthrectnode.h |
| со знаком | prYNode[2n] |
tmcrthrectnode.h |
prYNode[2n+1] |
tmcrthrectnode.h |
|
| формула узла (4.21) | RunScatteringNode1line (подтакт 0), RunScatteringNode1line1 (подтакт 1); обход строк — RunScatteringNode, RunScatteringNode1 |
tmcrthrectnode.cpp |
| подтакты, порядок операций | RunKernel, RunKernel1T; nTCurrent, dTCurrent |
tmcrthrectnode.cpp |
| в узел | CTmcRTHNodeDiel::SetYLineForDiel, SetStatEpsFast (EPSFAST), вес sTmcRTHNodeDielOne::rY |
tmcrthnodediel.cpp |
| блока в точке | CTmcRTHNodeDiel::CalcEps |
tmcrthnodediel.cpp |
| по (4.3), (4.4) | CTmcRTHRectNode::SetDielInNodeList: koef , koef1 (поправка = 1) |
tmcrthrectnode.cpp |
| обратный пересчёт | PutTopology |
tmcrthrectnode.cpp |
| нагрузка поглотителя | SetAbsorberAdmitance |
tmcrthnodediel.cpp |
| узлы контура блоков (металл, поглотитель, магнитная стенка) | RunBlockNode, RunBlockNode1, коды CTMCRTH_BLCKNTYPE_ABSR_* |
tmcrthnodediel.cpp, src/Include/tmcgrviw.h |
| кадр поля ( всех узлов) | PutField |
tmcrthrectnode.cpp |
точность чисел _real = double |
_PREC_DOUBLE |
src/Include/typerth.h |
Подробное описание кода — Счётное ядро H: структура узла (node-data), проводимости шлейфов (admittance), рассеяние (scattering), цикл по времени (time-loop).
Источники
- [Климов, 2025] — гл. 2: разд. 2.1 ((2.4)–(2.11)), 2.2 ((2.28), (2.29)), 2.3 ((2.30)–(2.40)), 2.4 ((2.43)–(2.49)); гл. 4: разд. 4.1 ((4.1)–(4.21), рис. 4.2–4.8), 4.2 ((4.23)–(4.25), (4.71)–(4.74)), 4.3 ((4.75)–(4.91)), 4.4 (табл. 4.1–4.3).
- [Климов, 2007] — гл. 2 (разд. 2.1–2.4), гл. 4 (разд. 4.1–4.4, схема узла (4.21)), гл. 9 (разд. 9.5.4).
H-polarized waves
The PlanarRT_H kernel (Tamic Rt-H in the dissertation) computes, in the time domain, H-polarized waves in a region with an arbitrary permittivity distribution. This page derives the node circuit of the Rτ-grid and the formula by which the kernel updates the node voltages at every time step, and shows how material is assigned to a node. The basis is the Rτ circuit of a space element from the method page. How this is implemented in the program is described in H compute kernel.
Problem statement
A two-dimensional problem is considered: the geometry and fields do not depend on the coordinate. For H-polarized waves the non-zero components are , , (, ), i.e. the electric field is perpendicular to the computation plane and the magnetic field lies in it. This describes, for example, H-plane waveguide devices — the wave of a rectangular waveguide in the plane of the vector [Klimov, 2007, Fig. 9.8]. For a monochromatic wave, Maxwell's equations reduce to (2.4) and the Helmholtz equation [Klimov, 2025, (2.4), (2.5)]:
The task of the kernel: given the signals at the ports, find the time evolution of the voltages of all grid nodes and the signals reflected to and transmitted to the ports. The medium is specified by the distribution ; the permeability in the H kernel equals (algorithms for magnetic filling are given in the section Magnetic permeability). The boundaries are metal, magnetic wall and absorber (boundary conditions); excitation is through ports (ports).
Node circuit
If there is no magnetic filling (), the element circuit contains no series stubs, and after combining the four parallel stubs connected to a node one obtains a grid in which each node is a parallel connection of [Klimov, 2025, Sec. 4.1, Figs. 4.3, 4.4]:
- four line sections to the adjacent nodes 1–4 with characteristic admittances and delay ;
- one stub with characteristic admittance and delay — open-circuited (OC) for or short-circuited (SC) for ;
- an active conductance (losses; in interior nodes ).
2 (neighbour above)
│
│ Y2, τ0
│ stub Y5, τ0/2 (OC or SC)
1 ───────── Y1, τ0 ─●─ Y3, τ0 ───────── 3
(neighbour left) │╲ (neighbour right)
│ Y (losses)
│ Y4, τ0
│
4 (neighbour below)
The type of the stub and its admittance are determined by the average permittivity of the four cells around the node, (grid) [Klimov, 2025, (4.3), (4.4)]:
When all grid lines are identical (), it is convenient to use the normalized quantities , .
In the program, the stub type is stored as a sign: is an OC stub, is an SC stub ( with a negative ). Then both branches of the algorithm are written as a single formula with in the denominator (scattering). Four numbers are stored per node: two voltages and two coefficients:
| Cell | Contents |
|---|---|
prUNode1[2n], prUNode1[2n+1] |
voltage of node at the two most recent time steps |
prYNode[2n] |
signed |
prYNode[2n+1] |
factor |
This is exactly the set named in [Klimov, 2025, Sec. 4.1]: "in addition to storing the voltage values for the two previous time steps, it is necessary to store the values and , i.e. the memory consumption is four real numbers per grid node".
Scattering at a node
Let , , be the voltages of the central node 0 at the instants , , , and let be the voltages of the adjacent nodes at the instant . The node voltage in terms of the waves incident on it from the inputs is [Klimov, 2025, (4.10)]:
The same expression for the instant , rewritten in terms of the reflected waves , gives [Klimov, 2025, (4.13)]
The incident waves are expressed through the neighbours' voltages and the reflected waves (wave exchange). Substituting them and eliminating the reflected waves using (4.13), one obtains a formula that contains only node voltages [Klimov, 2025, (4.16)–(4.19)]:
where "+" before corresponds to an OC stub () and "−" to an SC stub (). For identical lines [Klimov, 2025, (4.20)]
and without losses () [Klimov, 2025, (4.21)]
The algorithm is called two-parameter: the new time step requires the voltage values at the two previous time steps. Per node and per time step, five additions/subtractions and two multiplications are needed.
Formula in the program. With a signed , formula (4.21) takes the form
and in the code it is one line per node (sub-step 0, RunScatteringNode1line):
U[2n] = Y[2n+1] * ( U[2n-1] + U[2n+3] + U[2n+1-2nX] + U[2n+1+2nX] + Y[2n]*U[2n+1] ) - U[2n]
Here U is the prUNode1 array and Y is prYNode; U[2n-1] and U[2n+3] are the odd cells of
the left and right neighbours, U[2n+1-2nX] and U[2n+1+2nX] those of the lower and upper neighbours, and U[2n+1] that of
the node itself, all at time step ; U[2n] on the right-hand side is of the node itself, and on the left-hand side it is
the new . The interior nodes (,
) are traversed row by row and in pairs. The outermost nodes of the region are not updated
(region edges).
Wave exchange between nodes
The nodes are connected by line sections with delay . The wave reflected from node towards node 0 at the instant arrives at node 0 at the instant as an incident wave [Klimov, 2025, (4.14)]:
where and are the waves reflected from node towards node 0 and incident on node from node 0, and is the wave reflected from node 0 towards node one time step earlier.
The stub has a delay of : a wave that enters the stub returns after . At an open circuit it is reflected without a change of sign, and at a short circuit with a phase change of 180° [Klimov, 2025, (4.15), (4.17)]:
It is this difference in signs that gives the "±" before in the node formula.
In the program, wave exchange is not performed as a separate operation and the waves are not stored: it is already built into the formula (scattering) through the neighbours' voltages at the previous time step and the node's own voltage at the time step before that. Nodes with other circuits — ports, absorbers, magnetic walls — use the same idea with half-lines along the contour and loads (boundary conditions, ports).
Sub-steps of one step
The node formula links three time layers: , , . There is no need to store three arrays: the new value is written in place of , which is no longer needed afterwards. Therefore two cells are allocated per node, and the roles of the cells alternate:
| Sub-step | Written (new in place of ) | Read ( of the neighbours and of the node) | Functions |
|---|---|---|---|
| 0 | even cell prUNode1[2n] |
odd cells | RunExciteInputs, RunScatteringNode, RunBlockNode |
| 1 | odd cell prUNode1[2n+1] |
even cells | RunExciteInputs1, RunScatteringNode1, RunBlockNode1 |
Each sub-step advances the computation by one time step . Within a sub-step, the following are performed in order:
- port excitation and writing of the port signals to the
.tfile (ports); - scattering at all interior grid nodes according to (4.21);
- block boundary conditions — metal, absorber, magnetic wall (boundary conditions);
- output of a field frame (if enabled);
- field accumulation for the radiation pattern (RP).
One pass of the RunKernel1T loop consists of two sub-steps. Within a sub-step the nodes are independent: each
writes only its own cell and reads only cells of the other parity, so the order of node traversal
does not affect the result — this is exploited in GPU computing
(GPU). In the X kernel the scheme links more layers, and there are four sub-steps
(X sub-steps).
Dielectric (eps) and stub admittance
Task file. Dielectric blocks (RECT_STAT, CIRCLE_STAT, POLYGON_STAT, FILE, etc.)
specify an eps expression whose value for the H kernel is the increment over vacuum
(relative permittivity minus one). The expression
may contain the node coordinates , relative to the anchor point of the block, the distance and
the polar angle .
Average permittivity of a node. The value is assigned to the node, where the weight is the fraction of the cells surrounding the node that lie in the block. The contributions of all blocks are summed, so the node accumulates
which corresponds to the average over four cells (4.2) (cells outside blocks are vacuum,
). For a rectangle the weight is 1 inside, 0.5 on a side and 0.25 at
a corner. For a circle, an annular sector and a polygon, the program accumulates the weight in increments of 0.25 for
each of the four diagonal points that falls inside the shape. A
FILE block reads already weighted values from an .eps file.
Conversion to stub admittance. After all blocks have been built, each accumulated value of a node is converted to a normalized stub admittance according to (4.3), (4.4) [Klimov, 2025]:
and the factor is stored. Here , since .
Program specifics:
- The conversion formulas are the approximation of the exact relations (2.43), (2.45),
in which the stub admittance differs by the factor
(OC) or by its inverse (SC). In the program the correction factor equals 1: the variable
koef1() is used only to check (otherwise the error "very big Delta*Frequence" is reported), and the line with the correctionkoef1/tan(koef1)is commented out. - Values of that differ from 4 by less than 0.004 are shifted to 3.996 or 4.004.
- For the admittance does not depend on frequency; for
it is proportional to the square of the task frequency
FREQ: the specified refers to this frequency, and at other frequencies the medium behaves as a frequency-dispersive medium (below). - When the topology is written, the inverse conversion is performed: for and for .
- The same rule, applied to the W parameter of a port (which is the of the input medium), is used to compute the stub of the port nodes (W parameter).
Propagation. For nodes with an SC stub, waves propagate as long as , i.e. as long as (2.49). For the wave decays in such a medium — the computation nevertheless remains stable (stability).
Magnetic permeability
In the program, the H kernel models only dielectric filling ( at all
nodes). The "magnetic wall" block (MAGNETIC) is an open-circuit boundary condition, not a
magnetic permeability (boundary conditions). Below, the
algorithms for magnetic filling constructed in [Klimov, 2025, Sec. 4.2–4.4] are briefly outlined.
Inhomogeneous magnetic filling (, Sec. 4.2). The element circuit contains no parallel stubs, but it does contain series ones; determining the voltages at the nodes of the parallel line connection is impractical, so the algorithm is built in terms of currents at the nodes of the series stub connection (nodes 01, 02, 03, 04 in Fig. 4.10). Each such node lies at the midpoint of the line between adjacent grid nodes; the stub is determined by the average permeability of the two adjacent cells (4.23):
(4.24), (4.25). The currents are computed with step , but are shifted relative to the voltages by . Without magnetic losses () and for identical lines [Klimov, 2025, (4.73), (4.74)]:
and for the term is added to the right-hand side, . Per node and time step, nine additions/subtractions and four multiplications are needed; the stored values are the currents for two time steps, and . This algorithm is also two-parameter and stable for any , including . When two series stubs are combined into one, an assumption is made that they are connected in parallel; according to [Klimov, 2025], the magnitude of the resulting error requires a separate study.
The modified variant without magnetic losses (Sec. 4.3) again computes the voltages of the parallel-connection nodes, and for each series stub stores twice the voltage of the wave reflected into the stub [Klimov, 2025, (4.90), (4.91)]:
where for and for (4.78), (4.79).
Comparison of the algorithms [Klimov, 2025, Table 4.3], per elementary volume and per time step:
| Region type | Stored numbers | Additions/subtractions | Multiplications | Memory writes |
|---|---|---|---|---|
| magnetic filling with magnetic losses | 10 | 22 | 10 | 2 |
| lossless magnetic filling | 8 | 18 | 8 | 2 |
| dielectric filling with electric losses | 5 | 6 | 3 | 1 |
| lossless dielectric filling | 4 | 5 | 2 | 1 |
The computation speed is determined mainly by the number of real-number writes to memory, so when organizing the program it is important to take into account whether the problem involves dielectric or magnetic filling [Klimov, 2025, Sec. 4.4]. The interior nodes of the H kernel are computed with the most economical algorithm — the last row of the table.
Frequency-dispersive media
The frequency dependence of the permittivity and permeability turns them into integro-differential operators in the time domain [Klimov, 2025, Sec. 2.3, (2.32), (2.33)]. For plasma without an external magnetic field (), the first Maxwell equation takes the form [Klimov, 2025, (2.37)]
which for monochromatic oscillations gives the well-known dependence [Klimov, 2025, (2.38)]
This equation is identical to the equation of a grid with the inductance that models (RLC circuit): "one can conclude that the models described by impedance networks and by plasma in the absence of a magnetic field are identical" [Klimov, 2025, Sec. 2.3].
What this means for the H kernel. The SC stub of a node with has a constant admittance , i.e. it models a constant inductance (in the approximation). It corresponds to a negative capacitance increment that decreases as . If the task file specifies at the frequency , then at any frequency the grid behaves as a medium with
i.e. as plasma without an external field with plasma frequency . The frequency FREQ
only sets the point at which equals the specified value; the time-domain computation itself
accounts for dispersion over the entire signal band. Nodes with (OC stub,
capacitance) have no dispersion in the same approximation.
This formulation was verified in [Klimov, 2007, Sec. 9.5.4]: the scattering of the leading edge of a radio pulse by a layer with permittivity of the form (2.38), equal to 0.25 at the carrier frequency of 20 GHz, computed by the Rt-H program, agrees well with the analytical solution (H accuracy).
A medium with permeability (2.39), (2.40) is constructed similarly; it is not implemented in the H kernel. Magnetized plasma with tensor permittivity (2.34), (2.35) is computed by the X kernel — see accounting for frequency dependence in the time-domain scheme.
Losses
The specific electric losses and magnetic losses enter the equations [Klimov, 2025, (2.28), (2.29)] as a conductance in parallel with the capacitance and a resistance in series with the inductance. In the node circuit, electric losses are the active conductance , and the node formula with losses is (4.20) (scattering). A positive conductance only absorbs energy and does not violate stability (stability).
In the program, the interior nodes of the H kernel are computed without losses according to (4.21); volume losses of a dielectric cannot be specified in the H kernel (losses and medium conductivity are available in the X kernel — collisions and conductivity). The active conductance in the H kernel is used in two kinds of nodes:
- absorber — a load at the contour nodes, matched to a plane wave at normal incidence (absorbing boundary):
where is the stub of the medium (for an absorber block , vacuum); the expression for is the grid dispersion equation for a plane wave along an axis (dispersion); - port — a load matched to the fundamental mode of the port waveguide (transformer).
Computing fields from voltages
The field components are related to the circuit quantities by relations (2.7):
where , are the currents in the grid lines along the axes. The line current is expressed through the waves travelling along it: (Fig. 4.18 in [Klimov, 2025]). Therefore, knowing the node voltages at every instant, one can determine all non-zero field components [Klimov, 2025, Sec. 4.1].
In the program, the H kernel outputs the node voltages , i.e. a quantity proportional to (in a planar problem is a scale factor, and the scale of is set by the port signal amplitude):
- field frames — the values of at all nodes at a time step, row by row from bottom to top; they are displayed by FieldView (kernel output);
- accumulation for the radiation pattern — the quadratures of at the frequency (near-field contour);
- topology — the full of each node, recomputed from .
The H kernel neither computes nor writes the components , .
Mapping to the code
| Symbol / action | Variable, function | File (src/kernels/planarrt_h/) |
|---|---|---|
| , of node | prUNode1[2n], prUNode1[2n+1] (roles alternate between sub-steps) |
tmcrthrectnode.h |
| signed | prYNode[2n] |
tmcrthrectnode.h |
prYNode[2n+1] |
tmcrthrectnode.h |
|
| node formula (4.21) | RunScatteringNode1line (sub-step 0), RunScatteringNode1line1 (sub-step 1); row traversal — RunScatteringNode, RunScatteringNode1 |
tmcrthrectnode.cpp |
| sub-steps, order of operations | RunKernel, RunKernel1T; nTCurrent, dTCurrent |
tmcrthrectnode.cpp |
| into a node | CTmcRTHNodeDiel::SetYLineForDiel, SetStatEpsFast (EPSFAST), weight sTmcRTHNodeDielOne::rY |
tmcrthnodediel.cpp |
| of a block at a point | CTmcRTHNodeDiel::CalcEps |
tmcrthnodediel.cpp |
| according to (4.3), (4.4) | CTmcRTHRectNode::SetDielInNodeList: koef , koef1 (correction = 1) |
tmcrthrectnode.cpp |
| inverse conversion of | PutTopology |
tmcrthrectnode.cpp |
| absorber load | SetAbsorberAdmitance |
tmcrthnodediel.cpp |
| block contour nodes (metal, absorber, magnetic wall) | RunBlockNode, RunBlockNode1, codes CTMCRTH_BLCKNTYPE_ABSR_* |
tmcrthnodediel.cpp, src/Include/tmcgrviw.h |
| field frame ( of all nodes) | PutField |
tmcrthrectnode.cpp |
number precision _real = double |
_PREC_DOUBLE |
src/Include/typerth.h |
A detailed description of the code is given in H compute kernel: node structure (node-data), stub admittances (admittance), scattering (scattering), time loop (time-loop).
Sources
- [Klimov, 2025] — Ch. 2: Sec. 2.1 ((2.4)–(2.11)), 2.2 ((2.28), (2.29)), 2.3 ((2.30)–(2.40)), 2.4 ((2.43)–(2.49)); Ch. 4: Sec. 4.1 ((4.1)–(4.21), Figs. 4.2–4.8), 4.2 ((4.23)–(4.25), (4.71)–(4.74)), 4.3 ((4.75)–(4.91)), 4.4 (Tables 4.1–4.3).
- [Klimov, 2007] — Ch. 2 (Sec. 2.1–2.4), Ch. 4 (Sec. 4.1–4.4, node circuit (4.21)), Ch. 9 (Sec. 9.5.4).