Метод Rt-сетки
Оба счётных ядра пакета построены на методе импедансного аналога электромагнитного пространства (ИАЭП), который также называют методом импедансных сеток. Пространство разбивается на малые элементарные объёмы; каждому объёму ставится в соответствие электрическая схема, а схемы объединяются в сетку. Для расчёта во временной области используется Rτ-сетка — сетка из отрезков линий передачи с одинаковой задержкой и шлейфов (в именах программ — «Rt»). На этой странице описано, как строится такая сетка для волн H-поляризации и почему расчёт на ней устойчив. Алгоритм ядра H — на странице Волны H-поляризации, схема с подмагниченной плазмой для волн E — на странице Волны E-поляризации.
Идея метода
«Суть метода состоит в прямом сопоставлении анализируемой геометрии с электрической схемой с сосредоточенными (RLC) или распределенными (Rτ) параметрами, а затем — в исследовании полученной эквивалентной схемы анализируемой геометрии с помощью любого (наиболее удобного в конкретном случае) метода. К достоинству метода следует отнести наглядность оперирования с физической моделью исследуемой системы» [Климов, 2025, разд. 1.11].
Построение модели состоит из двух этапов [Иванов, Сестрорецкий, 2007]:
- Пространство, в котором находится устройство, разбивается на элементарные объёмы, малые по сравнению с длиной волны. Каждому объёму сопоставляется схема с сосредоточенными (RLC) или распределёнными (Rτ) элементами. Схемы объединяются в одну сетку — сеточный вакуум, эквивалентную схему пустого пространства.
- Вещество моделируется двухполюсниками, которые подключаются к клеммам сетки вакуума: влияние вещества локально, а всё взаимодействие идёт через сетку вакуума (модель информационного многополюсника). Граничные условия — это нагрузки на клеммах: короткое замыкание для металла, холостой ход для магнитной стенки (граничные условия).
Каждый элемент сетки влияет только на соседей. Самосогласованное решение, как в интегральных методах («каждый влияет на всех»), искать не нужно: сетка — обычная радиотехническая цепь, и её анализ сводится к прямым вычислениям с известными коэффициентами [Иванов, Сестрорецкий, 2007].
Во временной области сетка состоит из отрезков линий с одинаковой задержкой . За время импульс проходит ровно от узла до соседнего узла, поэтому на время одного такта узлы независимы друг от друга: новое состояние каждого узла вычисляется по состоянию его соседей на прошлом такте несколькими сложениями и умножениями [Климов, 2007, введение]. Это и делает алгоритм быстрым, а на видеокарте — параллельным (расчёт на видеокарте).
Эквивалентная RLC-схема элемента
Для волн H-поляризации (, ) без сторонних источников уравнения Максвелла в декартовых координатах принимают вид [Климов, 2025, (2.4)]
Записанной в конечных разностях системе ставится в соответствие RLC-схема элемента пространства — прямоугольного параллелепипеда (рис. 2.1 в [Климов, 2025]): четыре конденсатора на рёбрах, параллельных оси , и катушки , на рёбрах вдоль осей и . Схема эквивалентна двумерному телеграфному уравнению. Напряжение на конденсаторах и токи через катушки связаны с полем:
а номиналы элементов определяются размерами объёма и проницаемостями вещества [Климов, 2025, (2.7), (2.8)]:
Для элемента, не заполненного веществом, в эти формулы подставляются , — получаются номиналы , , (2.9). Вещество учитывается двухполюсниками , подключёнными параллельно конденсаторам (диэлектрик), и , , включёнными последовательно с катушками (магнетик). Чтобы сетка оставалась консервативной (без поглощения и генерации энергии), двухполюсник — либо ёмкость, либо индуктивность [Климов, 2025, разд. 2.1]:
| Вещество | Что добавляется | Номинал | Формула в [Климов, 2025] |
|---|---|---|---|
| ёмкость параллельно | (2.10) | ||
| индуктивность параллельно (вместо отрицательной ёмкости) | , | (2.11) | |
| индуктивности , последовательно | , | (2.15) | |
| ёмкости , последовательно | , | (2.16), (2.17) |
При вещество уменьшает ёмкость элемента, и это эквивалентно внесению индуктивности. Такая трактовка наглядно объясняет частные случаи [Климов, 2025, (2.12)–(2.14)]:
- : контур из и в параллельном резонансе (), его проводимость равна нулю — как в волноводе на критической частоте;
- : проводимость контура индуктивная () — как в волноводе ниже критической частоты;
- волны распространяются только при , т. е. при .
Аналогичные условия для магнетика — (2.18)–(2.20), для одновременно отрицательных и — (2.21).
Важное следствие: в консервативной схеме проницаемость, меньшая чем у вакуума, обязательно зависит от частоты — индуктивность постоянна, а эквивалентная ей отрицательная ёмкость меняется как . По [Климов, 2025, разд. 2.1] это согласуется с невозможностью превысить фазовой скоростью плоской волны в вакууме скорость света; систему, где сигнал распространяется быстрее света, можно построить, «но тогда такая линейная система будет неконсервативной и неустойчивой». Как именно такая схема описывает плазму, показано в разделе Среды с частотной дисперсией.
Rt-схема: элемент из отрезков линий с задержкой
От RLC-схемы переходят к Rτ-схеме — схеме из отрезков линий передачи без потерь [Климов, 2025, разд. 2.4]. Сетка берётся квадратной:
тогда , и RLC-схема вакуума заменяется четырьмя отрезками линий по сторонам элемента с задержкой и волновой проводимостью каждый (рис. 2.14 в [Климов, 2025]). Параметры линий [Климов, 2025, (2.42)]:
Задержка соответствует локальной скорости распространения сигнала между соседними узлами, в раз большей скорости света . Это сеточный эффект: импульсы в сетке идут по ломаной траектории, и макроскопические процессы при этом описываются правильно. Как отмечено в [Иванов, Сестрорецкий, 2007], корректно промоделировать переходные процессы в сетке можно только при превышении микроскопической скорости над скоростью света; то же наблюдается в методах TLM и FDTD.
Вещество моделируется шлейфами длиной, соответствующей задержке . Длина выбрана так, чтобы получился двухпараметрический алгоритм (разд. Подтакты). Номинал шлейфа находится из равенства проводимостей шлейфа и заменяемого элемента на частоте анализа :
Диэлектрик, — ёмкость заменяется шлейфом холостого хода (ХХ) с волновым адмитансом [Климов, 2025, (2.43), (2.44)]:
Диэлектрик, — индуктивность заменяется шлейфом короткого замыкания (КЗ) [Климов, 2025, (2.45), (2.46)]:
При получается , при — ; в обоих случаях волны в сетке не распространяются. Условие распространения для шлейфа КЗ [Климов, 2025, (2.47)–(2.49)]:
Магнетик. Последовательные двухполюсники заменяются шлейфами длиной с волновым сопротивлением : при — шлейфом КЗ, (2.51); при — шлейфом ХХ, (2.53), где . Условие распространения — (2.56); при одновременно отрицательных и есть ещё условие (2.57).
Сочетания шлейфов для всех комбинаций знаков и показаны на рис. 2.21–2.24 [Климов, 2025]. Получившиеся Rτ-схемы консервативны, и сетка, собранная из них, тоже консервативна, что даёт вычислительно устойчивую процедуру (устойчивость).
В программе (ядро H) используются приближённые формулы для — правые части (2.44) и (2.46); см. Диэлектрик.
Падающие и отражённые волны напряжения
Во временной области состояние сетки описывается волнами напряжения в линиях. Напряжение узла — сумма падающей на него и отражённой от него волн в любой подходящей к узлу линии [Климов, 2025, (4.12)]:
Узел — параллельное соединение линий с волновыми проводимостями , шлейфа и активной проводимости . Поскольку схема линейна, напряжение узла складывается из падающих волн с коэффициентами , где — коэффициенты отражения параллельного разветвления [Климов, 2025, (4.5)–(4.9)]:
Отражённая от узла волна уходит по линии к соседнему узлу и через становится для него падающей. Поэтому падающая волна выражается через напряжение соседа на прошлом такте и отражённую волну прошлого такта (обмен волнами между узлами, подробнее). Исключив из формул все волны, получают выражение нового напряжения узла только через напряжения узлов на двух предыдущих тактах — именно его и вычисляет программа (рассеяние в узле). Сами волны в памяти не хранятся.
Волны используются там, где нужно разделить падающий и отражённый сигналы: в портах программа выделяет отражённую волну проекцией напряжений апертуры на профиль собственной волны (порты).
Шаг по времени и шаг сетки
Шаг по времени в методе не выбирается произвольно: он жёстко связан с шагом сетки выражением (2.42) [Климов, 2025, разд. 4.1]:
В программе один такт (подтакт цикла) — это : время расчёта
из строки TIME задания делится на такты, .
Шаг сетки задаёт строка DELTA.
Следствия:
- Стоимость расчёта. Число узлов растёт как , число тактов на тот же интервал времени — как , поэтому при уменьшении шага время анализа растёт пропорционально кубу , а память — квадрату (рекомендации автора пакета, руководство пользователя, разд. 4.5).
- Точность определяется отношением — длины волны в среде к шагу (численная дисперсия).
- Проверки программы при чтении задания и подготовке шага (частота
FREQ): шаг не больше пятой части длины волны в вакууме, , иначе ошибка «Delta > WaveLenght/5»; , иначе ошибка «very big Delta*Frequence»; область — не меньше 10 шагов по каждой оси.
Устойчивость
Критерий устойчивости в импедансной трактовке сформулирован в [Климов, 2025, разд. 2.3]:
«Двухполюсники, которые соответствуют элементам тензоров и , состоят из емкостей, индуктивностей и активных сопротивлений, значения которых положительны. Отрицательные значения емкостей, индуктивностей и активных сопротивлений означают включение в схему генераторов энергии с неограниченной мощностью. Генераторы энергии в системе и являются причиной неустойчивости системы, если приток энергии от таких генераторов превышает поглощение энергии в активных элементах системы».
Rτ-схемы элемента построены так, чтобы этот критерий выполнялся при любых значениях проницаемостей:
- проницаемость меньше вакуумной моделируется не отрицательной ёмкостью, а индуктивностью (шлейфом КЗ), поэтому сетка консервативна и при , в том числе при . Алгоритм ядра H (4.21) «соответствует консервативной сетке и, следовательно, обладает численной устойчивостью при , , в том числе » [Климов, 2025, разд. 4.1];
- потери вводятся положительными проводимостями (поглотители, нагрузки портов) — они только забирают энергию;
- шаг по времени не подбирается, а следует из построения сетки (формула (2.42)), поэтому отдельного условия на шаг по времени, как в явных конечно-разностных схемах, нет.
Важно различать устойчивость и распространение волн. При (среда с ) волна в сетке не распространяется — затухает, как в волноводе ниже критической частоты, — но расчёт остаётся устойчивым.
Устойчивость консервативной схемы — свойство точной арифметики. В расчёте с конечной разрядностью важна точность представления чисел; программа считает в числах двойной точности (float и double).
Сетка, узлы, нумерация
Из схем элементарных объёмов собирается сетка всей области (рис. 4.1–4.3 в [Климов, 2025]). Для неоднородного диэлектрического заполнения () в каждом узле сходятся четыре шлейфа соседних элементов; их объединяют в один шлейф. Получается сетка, в которой ([Климов, 2025, разд. 4.1]):
- узлы соединены отрезками линий с волновой проводимостью и задержкой ;
- к каждому узлу подходит один шлейф длиной — ХХ или КЗ;
- характер шлейфа и его проводимость определяются средней проницаемостью четырёх элементарных объёмов вокруг узла [Климов, 2025, (4.2)]:
ε6 │ ε7 ─── линия Y0, τ0
──────●────── ● узел: напряжение U, шлейф Y5 (τ0/2), потери Y
ε10 │ ε11 ε проницаемость элементарного объёма (ячейки Δ×Δ)
Область и узлы в программе. Расчётная область — прямоугольник X_MIN…X_MAX,
Y_MIN…Y_MAX секции #PARM. Узлы нумеруются ,
, координата узла , ,
номер узла в массивах ядра
(64-битное целое TmcIdx: на больших сетках номер превышает ). Правая и верхняя
границы области переносятся на ближайший узел сетки, лежащий правее X_MAX (выше
Y_MAX), — резервный столбец (строку) узлов (выравнивание по сетке).
Что хранится в узле. У ядра H — четыре вещественных числа: напряжения узла на двух последних тактах, проводимость шлейфа и множитель (схема узла H). У ядра X — шесть значений напряжения и шесть коэффициентов (узел X).
Края области. Крайние узлы формулой рассеяния не пересчитываются и остаются нулевыми — на краю области действует условие короткого замыкания (металл), если там не стоит порт или поглотитель (граничные условия).
Блоки. Геометрия задаётся блоками в локальных координатах; строка T n; X0; Y0; секции
#TOPOLOGY переносит начало координат блока в точку области. Каждый узел,
попавший в блок, получает вклад вещества с весом — долей окружающих ячеек, лежащих в блоке;
вклады блоков складываются, так что узел на стыке получает среднее (4.2)
(диэлектрик). Чтобы геометрия переносилась на сетку без
искажений, границы блоков должны проходить по узлам (правила сетки).
Соответствие в коде
| Величина / действие | Переменная, функция | Файл (src/) |
|---|---|---|
| — шаг сетки, м | CTmcRTH_IndanParam::rDelta, dGetDelta() |
libs/tmcindan/tmcrth_indanparam.cpp |
rt = rDelta*sqrt(0.5*MU0___*EPS0___) (ReadDelta), dGetdT(); в ядре — dT |
libs/tmcindan/tmcrth_indanparam.cpp, kernels/planarrt_h/tmcrthrectnode.cpp |
|
| число тактов | nTMax, текущий такт nTCurrent, время dTCurrent |
kernels/planarrt_h/tmcrthrectnode.cpp (InitKernel, RunKernel) |
проверка в CTmcRTH_IndanParam::IsCorrectly |
libs/tmcindan/tmcrth_indanparam.cpp |
|
koef1 = rFreq*2π*dT/2, ошибка «very big Delta*Frequence» |
kernels/planarrt_h/tmcrthrectnode.cpp (SetDielInNodeList) |
|
| , , резервный столбец | nXGrid, nYGrid, rXmax, rYmax (IsCorrectly) |
libs/tmcindan/tmcrth_indanparam.cpp |
CalcnNodeGlobal(x, y), тип TmcIdx |
include/tmcrth_indanparam.h |
|
| узла на двух тактах | prUNode1[2n], prUNode1[2n+1] |
kernels/planarrt_h/tmcrthrectnode.h |
| , | prYNode[2n], prYNode[2n+1] |
kernels/planarrt_h/tmcrthrectnode.h |
| по ((2.44), (2.46)) | CTmcRTHRectNode::SetDielInNodeList |
kernels/planarrt_h/tmcrthrectnode.cpp |
размещение блока T n; X0; Y0; |
CTmcRTH_IndanTopology |
include/tmcrth_indantopology.h |
| , , | C0___, MU0___, EPS0___ |
include/typerth.h |
Подробнее о структуре данных — ядро H: структура данных узла.
Источники
- [Климов, 2025] — разд. 1.11; гл. 2: разд. 2.1 (RLC-схема, (2.1)–(2.21)), 2.3 (критерий устойчивости, (2.30)–(2.38)), 2.4 (Rτ-схема, (2.41)–(2.57)); гл. 4: разд. 4.1 ((4.1)–(4.21)).
- [Климов, 2007] — введение; гл. 1 (разд. 1.11), гл. 2 (разд. 2.1–2.4), гл. 6 (6.49).
- Иванов С. А., Сестрорецкий Б. В. Метод импедансного аналога электромагнитного пространства для двумерных задач электродинамики // Журнал радиоэлектроники. 2007. № 5 — введение, разделы о RLC- и Rτ-сетках.
- Руководство пользователя TMC Suite, «Язык заданий», разд. 4.5
DELTA.
The Rt-grid method
Both compute kernels of the package are built on the impedance analogue of electromagnetic space (IAES) method, also known as the impedance network method. Space is divided into small elementary volumes; each volume is associated with an electrical circuit, and the circuits are joined into a grid. For time-domain computation, an Rτ-grid is used — a grid of transmission-line sections with equal delay and of stubs (hence "Rt" in the program names). This page describes how such a grid is built for H-polarized waves and why computation on it is stable. The H kernel algorithm is given on the H-polarized waves page, and the circuit with magnetized plasma for E waves on the E-polarized waves page.
Idea of the method
"The essence of the method is a direct mapping of the analysed geometry onto an electrical circuit with lumped (RLC) or distributed (Rτ) parameters, followed by the study of the resulting equivalent circuit of the analysed geometry by any method (the most convenient one in a particular case). An advantage of the method is the clarity of operating with a physical model of the system under study" [Klimov, 2025, Sec. 1.11].
The model is constructed in two stages [Ivanov, Sestroretsky, 2007]:
- The space containing the device is divided into elementary volumes that are small compared with the wavelength. Each volume is associated with a circuit of lumped (RLC) or distributed (Rτ) elements. The circuits are joined into a single grid — the grid vacuum, the equivalent circuit of empty space.
- Matter is modelled by two-terminal elements connected to the terminals of the vacuum grid: the influence of matter is local, and all interaction takes place through the vacuum grid (the information multiport model). Boundary conditions are loads at the terminals: a short circuit for metal and an open circuit for a magnetic wall (boundary conditions).
Each grid element affects only its neighbours. There is no need to seek a self-consistent solution, as in integral methods ("everything affects everything"): the grid is an ordinary electrical circuit, and its analysis reduces to direct computations with known coefficients [Ivanov, Sestroretsky, 2007].
In the time domain, the grid consists of line sections with equal delay . During the time a pulse travels exactly from one node to the adjacent node, so within one time step the nodes are independent of each other: the new state of each node is computed from the state of its neighbours at the previous time step with a few additions and multiplications [Klimov, 2007, introduction]. This is what makes the algorithm fast, and on a GPU, parallel (GPU computing).
Equivalent RLC circuit of an element
For H-polarized waves (, ) without impressed sources, Maxwell's equations in Cartesian coordinates take the form [Klimov, 2025, (2.4)]
The system written in finite differences is mapped onto an RLC circuit of a space element — a rectangular parallelepiped (Fig. 2.1 in [Klimov, 2025]): four capacitors on the edges parallel to the axis, and inductors , on the edges along the and axes. The circuit is equivalent to the two-dimensional telegraph equation. The capacitor voltage and the inductor currents are related to the field:
and the element values are determined by the volume dimensions and the material permittivity and permeability [Klimov, 2025, (2.7), (2.8)]:
For an element not filled with material, and are substituted into these formulas, giving the values , , (2.9). Matter is accounted for by two-terminal elements connected in parallel with the capacitors (dielectric), and , connected in series with the inductors (magnetic material). For the grid to remain conservative (without absorption or generation of energy), each two-terminal element is either a capacitance or an inductance [Klimov, 2025, Sec. 2.1]:
| Material | What is added | Value | Formula in [Klimov, 2025] |
|---|---|---|---|
| capacitance in parallel with | (2.10) | ||
| inductance in parallel with (instead of a negative capacitance) | , | (2.11) | |
| inductances , in series | , | (2.15) | |
| capacitances , in series | , | (2.16), (2.17) |
For , the material reduces the capacitance of the element, which is equivalent to introducing an inductance. This interpretation gives a clear explanation of special cases [Klimov, 2025, (2.12)–(2.14)]:
- : the circuit of and is at parallel resonance (), and its admittance is zero — as in a waveguide at the cutoff frequency;
- : the admittance of the circuit is inductive () — as in a waveguide below the cutoff frequency;
- waves propagate only for , i.e. for .
Similar conditions for a magnetic material are (2.18)–(2.20), and for simultaneously negative and , (2.21).
An important consequence: in a conservative circuit, a permittivity lower than that of vacuum necessarily depends on frequency — the inductance is constant, while the equivalent negative capacitance varies as . According to [Klimov, 2025, Sec. 2.1], this is consistent with the impossibility for the phase velocity of a plane wave in vacuum to exceed the speed of light; a system in which a signal propagates faster than light can be built, "but then such a linear system will be non-conservative and unstable". Exactly how such a circuit describes plasma is shown in the section Frequency-dispersive media.
Rt circuit: an element made of delay-line sections
From the RLC circuit one passes to the Rτ circuit — a circuit of lossless transmission-line sections [Klimov, 2025, Sec. 2.4]. The grid is taken to be square:
then , and the RLC circuit of vacuum is replaced by four line sections along the sides of the element, each with delay and characteristic admittance (Fig. 2.14 in [Klimov, 2025]). The line parameters are [Klimov, 2025, (2.42)]:
The delay corresponds to a local velocity of signal propagation between adjacent nodes that is times the speed of light . This is a grid effect: pulses in the grid travel along a zigzag path, while macroscopic processes are still described correctly. As noted in [Ivanov, Sestroretsky, 2007], transient processes in a grid can be modelled correctly only if the microscopic velocity exceeds the speed of light; the same is observed in the TLM and FDTD methods.
Matter is modelled by stubs whose length corresponds to a delay of . This length is chosen so as to obtain a two-parameter algorithm (Sec. Sub-steps). The stub value is found by equating the admittances of the stub and of the element it replaces at the analysis frequency :
Dielectric, — the capacitance is replaced by an open-circuited stub (OC) with characteristic admittance [Klimov, 2025, (2.43), (2.44)]:
Dielectric, — the inductance is replaced by a short-circuited stub (SC) [Klimov, 2025, (2.45), (2.46)]:
For one obtains , and for , ; in both cases waves do not propagate in the grid. The propagation condition for an SC stub is [Klimov, 2025, (2.47)–(2.49)]:
Magnetic material. The series two-terminal elements are replaced by stubs of length with characteristic impedance : for , by an SC stub, (2.51); for , by an OC stub, (2.53), where . The propagation condition is (2.56); for simultaneously negative and there is an additional condition (2.57).
The stub arrangements for all combinations of the signs of and are shown in Figs. 2.21–2.24 [Klimov, 2025]. The resulting Rτ circuits are conservative, and the grid assembled from them is also conservative, which yields a computationally stable procedure (stability).
The program (H kernel) uses the approximate formulas for — the right-hand sides of (2.44) and (2.46); see Dielectric.
Incident and reflected voltage waves
In the time domain, the state of the grid is described by voltage waves in the lines. The node voltage is the sum of the waves incident on and reflected from the node in any line connected to it [Klimov, 2025, (4.12)]:
A node is a parallel connection of lines with characteristic admittances , a stub and an active conductance . Since the circuit is linear, the node voltage is composed of the incident waves with coefficients , where are the reflection coefficients of the parallel junction [Klimov, 2025, (4.5)–(4.9)]:
The wave reflected from a node travels along the line to the adjacent node and after becomes incident on it. Therefore the incident wave is expressed through the neighbour's voltage at the previous time step and the reflected wave of the previous time step (wave exchange between nodes, more details). Eliminating all waves from the formulas yields an expression for the new node voltage solely in terms of node voltages at the two previous time steps — this is exactly what the program computes (scattering at a node). The waves themselves are not stored in memory.
Waves are used where the incident and reflected signals must be separated: at the ports the program extracts the reflected wave by projecting the aperture voltages onto the eigenmode profile (ports).
Time step and grid step
In this method the time step is not chosen arbitrarily: it is rigidly tied to the grid step by expression (2.42) [Klimov, 2025, Sec. 4.1]:
In the program, one time step (a sub-step of the loop) is : the computation time
from the TIME line of the task file is divided into time steps, .
The grid step is set by the DELTA line.
Consequences:
- Computational cost. The number of nodes grows as , and the number of time steps over the same time interval as ; therefore, when the step is reduced, the analysis time grows in proportion to the cube of , and memory in proportion to its square (recommendations of the package author, user manual, Sec. 4.5).
- Accuracy is determined by the ratio — of the grid step to the wavelength in the medium (numerical dispersion).
- Program checks when reading the task file and preparing a step (frequency
FREQ): the step must not exceed one fifth of the free-space wavelength, , otherwise the error "Delta > WaveLenght/5" is reported; , otherwise the error "very big Delta*Frequence"; the region must be at least 10 steps along each axis.
Stability
The stability criterion in the impedance interpretation is formulated in [Klimov, 2025, Sec. 2.3]:
"The two-terminal elements corresponding to the elements of the tensors and consist of capacitances, inductances and resistances whose values are positive. Negative values of capacitances, inductances and resistances mean the inclusion in the circuit of energy generators of unlimited power. Energy generators in the system are the cause of system instability if the inflow of energy from such generators exceeds the absorption of energy in the active elements of the system".
The Rτ circuits of an element are constructed so that this criterion holds for any values of permittivity and permeability:
- a permittivity lower than that of vacuum is modelled not by a negative capacitance but by an inductance (an SC stub), so the grid is conservative also for , including . The H kernel algorithm (4.21) "corresponds to a conservative grid and therefore possesses numerical stability for , , including " [Klimov, 2025, Sec. 4.1];
- losses are introduced by positive conductances (absorbers, port loads) — they can only remove energy;
- the time step is not tuned but follows from the grid construction (formula (2.42)), so there is no separate time-step condition as in explicit finite-difference schemes.
It is important to distinguish stability from wave propagation. For (a medium with ), a wave does not propagate in the grid — it decays, as in a waveguide below the cutoff frequency — but the computation remains stable.
The stability of a conservative scheme is a property of exact arithmetic. In finite-precision computation, the accuracy of number representation matters; the program computes in double-precision numbers (float and double).
Grid, nodes, numbering
The grid of the entire region is assembled from the circuits of the elementary volumes (Figs. 4.1–4.3 in [Klimov, 2025]). For an inhomogeneous dielectric filling (), four stubs of adjacent elements meet at each node; they are combined into a single stub. The result is a grid in which ([Klimov, 2025, Sec. 4.1]):
- the nodes are connected by line sections with characteristic admittance and delay ;
- one stub of length , either OC or SC, is connected to each node;
- the type of the stub and its admittance are determined by the average permittivity of the four elementary volumes around the node [Klimov, 2025, (4.2)]:
ε6 │ ε7 ─── line Y0, τ0
──────●────── ● node: voltage U, stub Y5 (τ0/2), losses Y
ε10 │ ε11 ε permittivity of an elementary volume (cell Δ×Δ)
Region and nodes in the program. The computational region is the rectangle X_MIN…X_MAX,
Y_MIN…Y_MAX of the #PARM section. The nodes are numbered ,
, the node coordinates are , ,
and the node number in the kernel arrays is
(a 64-bit integer TmcIdx: on large grids the number exceeds ). The right and top
boundaries of the region are moved to the nearest grid node lying to the right of X_MAX (above
Y_MAX) — a reserve column (row) of nodes (grid alignment).
What is stored in a node. For the H kernel, four real numbers: the node voltages at the two most recent time steps, the stub admittance and the factor (H node circuit). For the X kernel, six voltage values and six coefficients (X node).
Region edges. The outermost nodes are not updated by the scattering formula and remain zero — a short-circuit (metal) condition acts at the edge of the region unless a port or an absorber is placed there (boundary conditions).
Blocks. The geometry is specified by blocks in local coordinates; the line T n; X0; Y0; of the
#TOPOLOGY section moves the origin of block to the point of the region. Each node
that falls within a block receives a material contribution with a weight equal to the fraction of the surrounding cells lying in the block;
the contributions of blocks are summed, so a node at a junction receives the average (4.2)
(dielectric). For the geometry to be mapped onto the grid without
distortion, block boundaries must pass through nodes (grid rules).
Mapping to the code
| Quantity / action | Variable, function | File (src/) |
|---|---|---|
| — grid step, m | CTmcRTH_IndanParam::rDelta, dGetDelta() |
libs/tmcindan/tmcrth_indanparam.cpp |
rt = rDelta*sqrt(0.5*MU0___*EPS0___) (ReadDelta), dGetdT(); in the kernel, dT |
libs/tmcindan/tmcrth_indanparam.cpp, kernels/planarrt_h/tmcrthrectnode.cpp |
|
| number of time steps | nTMax, current time step nTCurrent, time dTCurrent |
kernels/planarrt_h/tmcrthrectnode.cpp (InitKernel, RunKernel) |
check in CTmcRTH_IndanParam::IsCorrectly |
libs/tmcindan/tmcrth_indanparam.cpp |
|
koef1 = rFreq*2π*dT/2, error "very big Delta*Frequence" |
kernels/planarrt_h/tmcrthrectnode.cpp (SetDielInNodeList) |
|
| , , reserve column | nXGrid, nYGrid, rXmax, rYmax (IsCorrectly) |
libs/tmcindan/tmcrth_indanparam.cpp |
CalcnNodeGlobal(x, y), type TmcIdx |
include/tmcrth_indanparam.h |
|
| node at two time steps | prUNode1[2n], prUNode1[2n+1] |
kernels/planarrt_h/tmcrthrectnode.h |
| , | prYNode[2n], prYNode[2n+1] |
kernels/planarrt_h/tmcrthrectnode.h |
| from ((2.44), (2.46)) | CTmcRTHRectNode::SetDielInNodeList |
kernels/planarrt_h/tmcrthrectnode.cpp |
block placement T n; X0; Y0; |
CTmcRTH_IndanTopology |
include/tmcrth_indantopology.h |
| , , | C0___, MU0___, EPS0___ |
include/typerth.h |
More on the data structure: H kernel: node data structure.
Sources
- [Klimov, 2025] — Sec. 1.11; Ch. 2: Sec. 2.1 (RLC circuit, (2.1)–(2.21)), 2.3 (stability criterion, (2.30)–(2.38)), 2.4 (Rτ circuit, (2.41)–(2.57)); Ch. 4: Sec. 4.1 ((4.1)–(4.21)).
- [Klimov, 2007] — introduction; Ch. 1 (Sec. 1.11), Ch. 2 (Sec. 2.1–2.4), Ch. 6 (6.49).
- Ivanov S. A., Sestroretsky B. V. The impedance analogue of electromagnetic space method for two-dimensional electrodynamic problems [Metod impedansnogo analoga ...] // Zhurnal Radioelektroniki. 2007. No. 5 — introduction, sections on RLC and Rτ grids. (in Russian)
- TMC Suite user manual, "Task language", Sec. 4.5
DELTA.