Граничные условия

Расчётная область Rτ-сетки конечна, а устройства внутри неё ограничены металлом, магнитными стенками и открытыми границами. В методе импедансной сетки граница — это нагрузка на клеммах сетки: короткое замыкание (КЗ) для металла, холостой ход (ХХ) для магнитной стенки, активная проводимость для поглощающей границы (идея метода). На этой странице выведены эти условия, показано, почему в ядре X стенки меняются местами, и описано, как программа строит границы на узлах сетки. Возбуждение и поглощение волн на входах устройства — на странице Порты и возбуждение.

Граничные условия задаются блоками задания METAL, MAGNETIC и ABSORBER (блоки топологии). На каждом подтакте ядро сначала пересчитывает все внутренние узлы общей формулой рассеяния (подтакты H, подтакты X), а затем каждый блок границы переписывает узлы своего контура по своей схеме узла.

Металл (короткое замыкание)

Граничное условие для металлической стенки — условие КЗ на клеммах сетки: равна нулю касательная составляющая электрического поля. Это граничное условие I рода, а краевая задача — задача Дирихле [Климов, 2007, разд. 6.1]. Для волн H-поляризации напряжение узла связано с полем соотношением U=EzΔz (RLC-схема), поэтому условие КЗ означает нулевое напряжение в узлах, через которые проходит стенка, на каждом такте [Климов, 2007, (6.1)]:

Unτ=0,n∈контур металла.(1)

Кроме того, внутри металла нет связей между соседними клеммами [Климов, 2007, разд. 6.1, рис. 6.1].

В программе блок METAL после общего прохода рассеяния записывает U=0 в узлы своего контура (RunBlockNode). Узлы строятся только по контуру: прямоугольник — четыре стороны, многоугольник — ломаная по вершинам, кольцевой сектор — два радиальных отрезка и две дуги (на сетке). Внутренние узлы формулой рассеяния пересчитываются, но в схеме узла участвуют только четыре соседа по сторонам, и через линию узлов с U=0 сигнал не проходит: внутренняя область отделена от остальной сетки, и при отсутствии в ней источников напряжения её узлов остаются нулевыми.

Края области. Крайние узлы расчётной области формулой рассеяния не пересчитываются и остаются нулевыми (сетка). В ядре H край области, на котором нет порта или поглотителя, — металлическая стенка; в ядре X — магнитная (ниже).

Холостой ход, магнитная стенка

Граничное условие для магнитной стенки — условие ХХ на клеммах сетки: равна нулю касательная составляющая магнитного поля. Это граничное условие II рода, краевая задача — задача Неймана [Климов, 2007, разд. 6.2]. В схеме элемента это означает нулевые токи в клеммах последовательных шлейфов, моделирующих магнитное заполнение, у узлов, через которые проходит стенка [Климов, 2007, (6.2)]:

I01=I02=0,(2)

а также то, что за стенкой нет связей между соседними клеммами: у линий, идущих вдоль стенки, волновое сопротивление удваивается (волновая проводимость — половинная) [Климов, 2007, разд. 6.2, рис. 6.2]. По [Климов, 2007] границы типа ХХ удобны при моделировании одномерных задач.

Узел на магнитной стенке. Для узла стороны стенки с соседом Uo вне стенки и соседями Ua, Ub вдоль неё линия к Uo полная, линии вдоль стенки — половинные, линии за стенку нет, шлейф узла — половинный (y5′=y5/2), нагрузки нет (y=0):

Uτ=22+|y5′|(Uoτ−1+12(Uaτ−1+Ubτ−1)+y5′Uτ−1)−Uτ−2,y5′=y52.(3)

Это та же формула узла (4.21) (рассеяние H), в которой недостающий сосед за стенкой заменён зеркальным отражением соседа Uo: подставив в 24+|y5|(2Uo+Ua+Ub+y5Uτ−1)−Uτ−2 и сократив числитель и знаменатель на 2, получаем формулу узла магнитной стенки. Поэтому стенка ХХ — плоскость симметрии поля, ∂U/∂n=0.

В программе блок MAGNETIC строится так же, как поглотитель (ниже), но с нагрузкой y=0: узлы контура пересчитываются по коду соседства (сторона, внешний и внутренний угол), узлы внутри блока обнуляются. Если стенка подходит к краю области, к коду углового узла добавляется сторона края, и стенка продолжается до края (SetMagneticPolygonType, для прямоугольника — расстановка узлов CalcnNodeGlobalFM).

В ядре H блок MAGNETIC — именно граничное условие, а не среда с магнитной проницаемостью: ядро H моделирует только диэлектрическое заполнение (магнитная проницаемость).

Двойственность стенок в X-ядре

В ядре X узловое «напряжение» — это магнитное поле:

U=HzΔz(4)

[Климов, 2025, (3.6), (3.24)]. Эквивалентная схема элемента для волн E-поляризации дуальна реальной физической: величины, соответствующие по размерности напряжениям, обозначены как токи, и наоборот [Климов, 2025, разд. 3.1]; (схема X). Поэтому одни и те же операции над узлами в ядре X имеют обратный физический смысл:

  • КЗ узла (U=0) — это Hz=0, т. е. магнитная стенка;
  • ХХ узла (∂Hz/∂n=0) — это равенство нулю касательной составляющей E→, т. е. металл.

Условие магнитной стенки в модифицированной схеме остаётся без изменений [Климов, 2025, (3.34)]:

Hz=0,(5)

«поскольку магнитное поле в модифицированной сетке тождественно исходному магнитному полю» [Климов, 2025, разд. 3.4].

Металл в подмагниченной плазме. В модифицированной схеме рёбра несут фиктивное поле Ex′, Ey′ (модифицированная схема), и условие на металле меняется [Климов, 2025, (3.31)–(3.33)]. Из выражений (3.12) для Ex, Ey через Hz:

Ex=0:A(p)∂Hz∂y=B(p)∂Hz∂x,Ey=0:B(p)∂Hz∂y=−A(p)∂Hz∂x,(6)

и после подстановки Ex′, Ey′ из (3.22) и операторов (3.10)

Ex=0:Ey′=−pωp2Ω(p2+Ω2+ωp2)Ex′,Ey=0:Ex′=pωp2Ω(p2+Ω2+ωp2)Ey′.(7)

При Ω=0 (B=0) оператор B(p)=0, и условия (3.31), (3.32) сводятся к обычному ∂Hz/∂n=0 — узлу ХХ.

В программе слова METAL и MAGNETIC дают в обоих ядрах одни и те же типы блоков (101 и 107; макрос _MODEL_RTE__, который поменял бы их местами, в сборке не задаётся — разбор блоков). Поэтому в ядре X:

Блок задания Что делает программа Физически для волн E
METAL U=0 в узлах контура Hz=0 — магнитная стенка, условие (3.34)
MAGNETIC узел ХХ с нагрузкой y=0 (формула) ∂Hz/∂n=0 — металл
край области узлы не пересчитываются, U=0 магнитная стенка
порт METAL (по умолчанию) крайние узлы апертуры равны 0, профиль sin порт между магнитными стенками
порт MAGNETIC постоянный профиль, крайние узлы — половинные плоская волна между металлическими стенками

Отсюда практическое правило: металлическую стенку для волн E в ядре X задают блоком MAGNETIC. Мода между двумя блоками METAL имеет профиль Hz∝sin(πy/a) и критическую частоту c/(2a), а между двумя блоками MAGNETIC распространяется и волна с постоянным по сечению Hz (собственные волны).

Особого условия на металле в плазме в программе нет: блок MAGNETIC всегда — обычный узел ХХ. В вакууме, в диэлектрике и в плазме без внешнего поля (B=0) это точно соответствует теории; для металла, касающегося подмагниченной плазмы, условие (3.33) не выполняется. Подробнее о коде — двойственность стенок в ядре X.

Поглощающая граница

Постановка. Поглощающая граница ограничивает бесконечную структуру так, чтобы собственное решение, существующее по одну сторону от границы, не изменилось — как если бы структура продолжалась дальше [Климов, 2007, разд. 6.3]. Это граничное условие III рода (смешанная краевая задача); оно позволяет решать внешние задачи рассеяния. Собственные решения сетки — волны Hm0 прямоугольного волновода и плоская волна (m=0) — выведены в разделе собственные волны.

Схема граничного узла. Граница выбрана по [Сестрорецкий и др., 2000] (рис. 6.4 в [Климов, 2007]): к граничным узлам подключены активные нагрузки Ym0, проводимости линий вдоль границы умножены на коэффициент Bm, проводимость шлейфа узла — на Cm. Формула узла с произвольными проводимостями (4.19) для граничного узла 0 принимает вид [Климов, 2007, (6.33), (6.34)]:

Uτ=2(U1τ−1+BmU2τ−1+BmU4τ−1±Cmy5Uτ−1+ym0Uτ−2)1+2Bm+Cmy5+ym0−Uτ−2,y5=Y5Y0,ym0=Ym0Y0,(8)

где U1 — сосед со стороны расчётной области, U2, U4 — соседи вдоль границы; «+» перед y5 — шлейф ХХ, «−» — шлейф КЗ.

Условия согласования. Подставив в (6.34) собственное решение U=fm(ny)sin(ωττ0+αmnx) и потребовав, чтобы равенство выполнялось в любой момент времени, получают [Климов, 2007, (6.35)–(6.39)]:

ym0=Ym0Y0=sinαmsin(ωτ0),Bm=Cm=12,(9)

где αm — набег фазы собственной волны на один шаг сетки, (6.22) для волны Hm0 и (6.25) для плоской волны:

α0=arccos((2+y52)cos(ωτ0)−1∓y52)(10)

(«−» — шлейф ХХ, «+» — КЗ). Условие Bm=Cm=1/2 делает характеристическое уравнение граничного узла (6.38) совпадающим с уравнением неограниченной сетки (6.18) для любой моды; нагрузка Ym0 — характеристический адмитанс линий, в которых распространяется данное собственное решение. Как видно из (6.37), для поглощения волн с разными постоянными распространения нужны разные нагрузки [Климов, 2007, разд. 6.3.2]: граница с одной нагрузкой поглощает без отражения только одну волну.

В программе поглотитель согласован с плоской волной в вакууме, падающей по нормали (m=0, y5=0). Нагрузка вычисляется на частоте задания FREQ по (6.25), (6.37); для общности в программе записана формула со знаковым шлейфом yW (у блока поглотителя yW=0):

y=sinα0sin(ωτ0),cosα0=(2+|yW|2)cos(ωτ0)−1−yW2,ωτ0=2πΔFREQc.(11)

При yW=0 выражение для cosα0 — дисперсионное уравнение сеточного вакуума вдоль оси, cosα0=2cos(ωτ0)−1 (дисперсия).

Узлы контура пересчитываются по коду соседства — какие из четырёх соседей принадлежат блоку. Линии к соседям вне блока — полные, линии вдоль контура — половинные (B=1/2), линий внутрь блока нет; шлейф узла умножается на долю окружающих узел ячеек, лежащих вне блока:

Узел контура Код соседства Линии Шлейф Нагрузка Формула
сторона три соседа в блоке одна полная наружу, две половинные вдоль y5/2 y ниже
внешний угол два смежных соседа в блоке две полные наружу, две половинные вдоль 3y5/4 y/2 23+|y5′′|+y/2(Uo1+Uo2+12(Ua+Ub)+y5′′Uτ−1+y2Uτ−2)−Uτ−2
внутренний угол все четыре соседа в блоке, нет одного диагонального две половинные y5/4 3y/2 21+|y5′″|+3y/2(12(Ua+Ub)+y5′″Uτ−1+3y2Uτ−2)−Uτ−2
внутри блока все соседи, или ни одного — — — U=0
один сосед или два противоположных — — — — ошибка «Bad Absorber or Magnetic Type»

Для стороны контура — это узел границы (6.34) с B=C=1/2, записанная со знаковым y5:

Uτ=22+|y5′|+y(Uoτ−1+12(Uaτ−1+Ubτ−1)+y5′Uτ−1+yUτ−2)−Uτ−2,y5′=y52(12)

(числитель и знаменатель (6.34) умножены на 2). Здесь y5 — шлейф самого узла, т. е. среды, в которой стоит поглотитель, а y — нагрузка, вычисленная для вакуума. Правила для угловых узлов в [Климов, 2007] не выводятся (там рассмотрена прямая граница); в программе они заданы долями, приведёнными в таблице. Магнитная стенка — тот же узел с y=0 (выше).

Ограничения. Из (6.37) следует, что граница с нагрузкой поглотителя точно согласована только для плоской волны вдоль нормали на частоте FREQ в вакууме:

  • волна, падающая под углом γ к нормали, требует нагрузки sin(αcosγ)/sin(ωτ0)≈ycosγ ((7.54), при малом шаге sinα≈α); при нагрузке y остаётся отражение |Γ|≈(1−cosγ)/(1+cosγ). Мода H10 волновода — две плоские волны под углом γ, cosγ=1−(fc/f)2; при проверке программы на волноводе с рамкой из поглотителя (40, 72, 100 ГГц) отражение совпало с этой оценкой с точностью до 3 % (ниже);
  • если поглотитель поставить в диэлектрик, шлейф узла учитывается, а нагрузка — нет (она вычисляется для yW=0): граница перестаёт быть согласованной. Поглотитель ставят в вакуум;
  • нагрузка вычисляется один раз на частоте FREQ.

Геометрия. Прямоугольный поглотитель строится как внешний контур с кодами сторон и углов и кольцо узлов внутри (код «нет соседей», узлы обнуляются). Он не подходит к краям области ближе 1 шага слева и снизу и 2 шагов справа и сверху, его размер — не меньше 2 шагов. Верхний предел прямоугольника округляется к узлу с поправкой +0,5 шага, чтобы кольцо замыкалось и при границах, лежащих на узлах (исправление октября 2026 г.). Многоугольник и кольцевой сектор строятся полосой 2×2 узла вдоль контура (ступенчатые стенки).

Подробнее о коде — поглотитель и магнитная стенка ядра H.

Поглощение плоских волн для волн E

Постановка [Климов, 2007, разд. 7.2]. В планарной Rτ-сетке с однородной подмагниченной плазмой распространяется плоская волна под углом γ к оси x; поглощающая граница справа не должна менять это собственное решение. Граница та же, что для волн H [Сестрорецкий и др., 2000]: к граничным узлам подключены активные нагрузки Y0γ, шлейфы плазмы граничного узла — CγY5, CγY6, CγY7, линии вдоль границы — BγY0 (рис. 7.4). Узел обновляется по четырёхпараметрическому алгоритму главы 5 (узел X), записанному для граничного узла (7.51), (7.52).

Условия согласования. По аналогии с главой 6 [Климов, 2007, (7.53), (7.54)]:

Bγ=Cγ=12,y0γ=sinαxsin(ωτ0)=sin(αcosγ)sin(ωτ0),(13)

где α — набег фазы на шаг сетки из дисперсионного уравнения сетки с подмагниченной плазмой (7.40), αx=αcosγ — его проекция на нормаль к границе. Тогда узел границы обновляется по [Климов, 2007, (7.55)]:

Uτ=&24+y5+y67+2y0γ(2U1τ−1+U2τ−1+U4τ−1−y5Uτ−1+2y0γUτ−2)−Uτ−2&+2y674+y5+y67+2y0γ(2Uτ−2−y7−y6y6+y7(Uτ−1+Uτ−3))−(Uτ−2+Uτ−4)+2y7−y6y6+y7(Uτ−1+Uτ−3)&−2y7−y6y6+y724+y5+y67+2y0γ(2U1τ−2+U2τ−2+U4τ−2−y5Uτ−2+2y0γUτ−3)&+24+y5+y67+2y0γ(2U1τ−3+U2τ−3+U4τ−3−y5Uτ−3+2y0γUτ−4).(14)

Это формула узла (5.49) (алгоритм X), в которой линия к соседу U1 со стороны области полная, линии вдоль границы и шлейфы — половинные, а линия за границу заменена нагрузкой y0γ (числитель и знаменатель умножены на 2).

Доказательство [Климов, 2007, (7.56)–(7.68)]. Подставив в (7.55) собственное решение (7.46)–(7.50) и сгруппировав слагаемые так же, как при выводе дисперсионного уравнения неограниченной сетки, получают с учётом (7.54) дисперсионное уравнение для выбранной границы [Климов, 2007, (7.68)]:

cos(αcosγ)+cos(αsinγ)=cos(2ωτ0)+Az2+cos(ωτ0)Bz2Dzcos(ωτ0)−Cz−cos(ωτ0)y0γ,(15)

где Az, Bz, Cz, Dz — комбинации проводимостей узла (7.57)–(7.60). Левые части (7.68) и уравнения неограниченной сетки (7.40) совпадают, а тождественность правых частей доказывается в (7.69)–(7.81). Значит, при условиях (7.53), (7.54) собственное решение слева от границы такое же, как без границы, и плоская волна под углом γ поглощается без отражения. Как и для волн H, волны, падающие под разными углами, требуют разных нагрузок y0γ.

В программе узел поглотителя ядра X пересчитывается двухслойной схемой узла H (сторона контура) поверх результата общего прохода, с теми же кодами соседства и долями, что в ядре H (поглотитель ядра X):

  • шлейф y5 берётся из ячейки 1 коэффициентов узла (prYNode[6n+1]: −y5 у плазмы, 4Δε у диэлектрика); коэффициенты плазмы Y3, Y4, Y5 узла (коэффициенты X) не используются;
  • нагрузка — та же, что в ядре H, с yW=0, т. е. γ=0 и α сеточного вакуума;
  • магнитная стенка — тот же узел с y=0; по двойственности физически это металл.

Для поглотителя в вакууме это соответствует (7.53), (7.54) при γ=0, и поглотитель X совпадает с поглотителем H. Проверка на волноводе 12 мм с рамкой из поглотителя (волна TE1 — две плоские волны под углом γ, cosγ=1−(fc/f)2):

f, ГГц оценка (1−cosγ)/(1+cosγ) |S11|, ядро H |S11|, ядро X
40 0,0257 0,0256 0,0256
72 0,0077 0,0075 0,0075
100 0,0039 0,0038 0,0038

В октябре 2026 г. в узле поглотителя и магнитной стенки ядра X исправлена ячейка шлейфа: ветка была перенесена из ядра H, где шлейф лежит в ячейке 0, а в узле X ячейка 0 — множитель 2/(4+…) формулы узла (узел X). До исправления отражение того же поглотителя на 72 ГГц было 0,0121 вместо 0,0075.

Шлейфы y6, y7 и набег фазы с учётом плазмы (7.40) программа не учитывает, поэтому поглотитель ставят в вакууме, вне плазмы. Узел (7.55) для поглотителя внутри подмагниченной плазмы и нагрузка для заданного угла γ в программе не реализованы.

Наклонные и криволинейные стенки на сетке

Граничные условия (6.1), (6.2), (6.37) выведены для стенок, проходящих по узлам сетки вдоль её осей. Наклонные и криволинейные стенки программа заменяет ступенчатой аппроксимацией: каждая точка контура переносится в ближайший узел сетки (CalcnNodeGlobal), и стенка становится цепочкой узлов.

Отрезок. Отрезок, занимающий nx шагов по одной оси и ny<nx по другой, строится «лесенкой»: по оси с большим числом шагов узлы ставятся на каждом шаге, по другой оси — равномерно; в i-й строке лесенки лежат узлы с номерами j, для которых

jny<(i+1)nx,(16)

и соседние узлы цепочки связаны по стороне ячейки. До октября 2026 г. в функциях кольцевого сектора и многоугольников поглотителя и магнитной стенки действовал прежний цикл, который обрывал наклонный отрезок примерно на середине: в стенке оставалась щель, и волна проходила сквозь металл или поглотитель. Сейчас во всех функциях стенка сплошная.

Многоугольник. Металлический многоугольник — ломаная по вершинам в порядке задания: последняя вершина с первой сама не соединяется. Это сделано намеренно (можно задать открытый контур); чтобы контур был замкнут, первую вершину повторяют в конце списка. Поглотитель и магнитная стенка по многоугольнику — полоса шириной 2×2 узла вдоль ломаной, коды соседства вычисляются автоматически (SetAbsorberNodeType).

Кольцевой сектор. Два радиальных отрезка строятся лесенкой, дуги радиусов Rmin и Rmax — точками через угловой шаг, при котором на один шаг сетки приходится около двух точек (k=2int(RΔφ/Δ+1) точек на дугу); каждая точка переносится в ближайший узел.

Части вне области. Точки контура, лежащие дальше чем на полшага за границей расчётной области, отбрасываются вместе со своими узлами. Прежде они прижимались к крайнему столбцу (строке) узлов и искажали границу области.

Точность. Ступенчатая стенка смещена относительно заданной не больше чем на половину шага; чтобы геометрия переносилась без искажений, границы блоков задают по узлам сетки (правила сетки). Диэлектрические блоки ступенчатой аппроксимацией не строятся: их вклад в узел учитывается с весом — долей окружающих ячеек (сетка).

Соответствие в коде

Символ / действие Переменная, функция Файл (src/)
U=0 в узлах металла (6.1) RunBlockNode, RunBlockNode1 (H), RunBlockNode…RunBlockNode3 (X), ветка CTMCRTH_BLCKNTYPE_METAL kernels/planarrt_h/tmcrthnodediel.cpp, kernels/planarrt_x/tmcrthnodediel.cpp
контур металла SetRectMetal, SetPolyMetal, SetCircMetal то же
край области (U=0) узлы края не входят в обход RunScatteringNode* kernels/planarrt_h/tmcrthrectnode.cpp, kernels/planarrt_x/tmcrthrectnode.cpp
узел ХХ и поглотителя (6.34) с B=C=1/2 RunBlockNode*, ветки CTMCRTH_BLCKNTYPE_MAGNETIC, CTMCRTH_BLCKNTYPE_ABSORBER; доли шлейфа y5 *= 0.5, 0.75, 0.25 kernels/planarrt_h/tmcrthnodediel.cpp, kernels/planarrt_x/tmcrthnodediel.cpp
коды соседства (сторона, углы) SetAbsorberNodeType, CTMCRTH_BLCKNTYPE_ABSR_* то же, include/tmcgrviw.h
y=sinα0/sin(ωτ0) (6.25), (6.37) SetAbsorberAdmitance (у поглотителя dYInput = 0) kernels/planarrt_*/tmcrthnodediel.cpp
нагрузка узла y (0 у магнитной стенки) sTmcRTHNodeDielOne::rY kernels/planarrt_*/tmcrthnodediel.h
Uτ−2 узла контура sTmcRTHNodeDielOne::rU то же
y5 узла prYNode[2n] (H), prYNode[6n+1] (X) kernels/planarrt_*/tmcrthnodediel.cpp
построение поглотителя и магнитной стенки SetRectAbsorber, SetPolyAbsorber, SetCircAbsorber, SetRectMagnetic, SetPolyMagnetic, SetCircMagnetic то же
стенка до края области SetMagneticPolygonType, CTmcRTH_IndanParam::CalcnNodeGlobalFM то же, include/tmcrth_indanparam.h
ближайший узел точки контура CTmcRTH_IndanParam::CalcnNodeGlobal include/tmcrth_indanparam.h
лесенка jny<(i+1)nx циклы в SetPolyMetal, SetCircMetal и др. kernels/planarrt_*/tmcrthnodediel.cpp
части вне области отбрасываются TmcB16Out то же
METAL → 101, MAGNETIC → 107, ABSORBER → 100 разбор блока CTmcRTH_BlockList; макрос _MODEL_RTE__ не задаётся libs/tmcindan/tmcrth_bolcklist.cpp, include/tmcgrviw.h
граничные условия на видеокарте habs (H), xabs (X) kernels/planarrt_h/tmcgpuh.h, kernels/planarrt_x/tmcgpux.h

Подробное описание кода — металл и поглотитель ядра H, двойственность стенок, металл и поглотитель ядра X, граничные условия на видеокарте — расчёт на видеокарте.

Источники

  • [Климов, 2007] — гл. 6: разд. 6.1 ((6.1), рис. 6.1), 6.2 ((6.2), рис. 6.2), 6.3 (6.3.1: (6.3)–(6.26); 6.3.2: (6.27)–(6.39), рис. 6.4); гл. 3: разд. 3.4 ((3.31)–(3.34)); гл. 4: (4.19); гл. 7: разд. 7.2 ((7.46)–(7.81), рис. 7.4), (7.40).
  • [Климов, 2025] — гл. 3: разд. 3.1 ((3.6)), 3.3 ((3.22), (3.24)), 3.4 ((3.31)–(3.34)); гл. 4: разд. 4.1; гл. 5: разд. 5.2 (рис. 5.5 — узел с активной проводимостью для граничных условий).
  • [Климов, Сестрорецкий, 2001, № 9] — граничные условия поглощения и возбуждения в планарной Rτ-сетке.
  • [Сестрорецкий и др., 2000] — выбор вида поглощающей границы.
  • Полный список литературы — Литература.

Boundary conditions

The computational region of the Rτ-grid is finite, and the devices inside it are bounded by metal, magnetic walls and open boundaries. In the impedance network method, a boundary is a load at the grid terminals: a short circuit (SC) for metal, an open circuit (OC) for a magnetic wall, and an active conductance for an absorbing boundary (idea of the method). This page derives these conditions, shows why the walls are swapped in the X kernel, and describes how the program builds boundaries on grid nodes. Excitation and absorption of waves at the device inputs are covered on the Ports and excitation page.

Boundary conditions are specified by the task-file blocks METAL, MAGNETIC and ABSORBER (topology blocks). At every sub-step the kernel first updates all interior nodes with the common scattering formula (H sub-steps, X sub-steps), and then each boundary block overwrites the nodes of its contour according to its own node circuit.

Metal (short circuit)

The boundary condition for a metal wall is an SC condition at the grid terminals: the tangential component of the electric field is zero. This is a boundary condition of the first kind, and the boundary-value problem is a Dirichlet problem [Klimov, 2007, Sec. 6.1]. For H-polarized waves, the node voltage is related to the field by U=EzΔz (RLC circuit), so the SC condition means zero voltage at the nodes through which the wall passes, at every time step [Klimov, 2007, (6.1)]:

Unτ=0,n∈metal contour.(1)

In addition, there are no connections between adjacent terminals inside the metal [Klimov, 2007, Sec. 6.1, Fig. 6.1].

In the program, after the common scattering pass the METAL block writes U=0 to the nodes of its contour (RunBlockNode). Nodes are built only along the contour: a rectangle — four sides, a polygon — a polyline through the vertices, an annular sector — two radial segments and two arcs (on the grid). The interior nodes are updated by the scattering formula, but only the four side neighbours take part in the node circuit, and a signal does not pass through a line of nodes with U=0: the interior region is separated from the rest of the grid, and in the absence of sources in it its node voltages remain zero.

Region edges. The outermost nodes of the computational region are not updated by the scattering formula and remain zero (grid). In the H kernel, a region edge without a port or an absorber is a metal wall; in the X kernel it is a magnetic wall (below).

Open circuit, magnetic wall

The boundary condition for a magnetic wall is an OC condition at the grid terminals: the tangential component of the magnetic field is zero. This is a boundary condition of the second kind, and the boundary-value problem is a Neumann problem [Klimov, 2007, Sec. 6.2]. In the element circuit, this means zero currents in the terminals of the series stubs that model magnetic filling, at the nodes through which the wall passes [Klimov, 2007, (6.2)]:

I01=I02=0,(2)

and also that there are no connections between adjacent terminals behind the wall: for lines running along the wall, the characteristic impedance is doubled (the characteristic admittance is halved) [Klimov, 2007, Sec. 6.2, Fig. 6.2]. According to [Klimov, 2007], OC-type boundaries are convenient for modelling one-dimensional problems.

Node on a magnetic wall. For a node on a side of the wall with a neighbour Uo outside the wall and neighbours Ua, Ub along it, the line to Uo is a full line, the lines along the wall are half-lines, there is no line behind the wall, the node stub is halved (y5′=y5/2), and there is no load (y=0):

Uτ=22+|y5′|(Uoτ−1+12(Uaτ−1+Ubτ−1)+y5′Uτ−1)−Uτ−2,y5′=y52.(3)

This is the same node formula (4.21) (H scattering) in which the missing neighbour behind the wall is replaced by a mirror image of the neighbour Uo: substituting into 24+|y5|(2Uo+Ua+Ub+y5Uτ−1)−Uτ−2 and cancelling a factor of 2 in the numerator and denominator, we obtain the magnetic-wall node formula. Therefore an OC wall is a plane of field symmetry, ∂U/∂n=0.

In the program, the MAGNETIC block is built in the same way as an absorber (below), but with the load y=0: the contour nodes are updated according to the neighbourhood code (side, outer and inner corner), and the nodes inside the block are set to zero. If the wall reaches the region edge, the side of the edge is added to the code of the corner node, and the wall is continued up to the edge (SetMagneticPolygonType; for a rectangle, node placement by CalcnNodeGlobalFM).

In the H kernel, the MAGNETIC block is precisely a boundary condition, not a medium with magnetic permeability: the H kernel models only dielectric filling (magnetic permeability).

Wall duality in the X kernel

In the X kernel, the nodal "voltage" is the magnetic field:

U=HzΔz(4)

[Klimov, 2025, (3.6), (3.24)]. The equivalent element circuit for E-polarized waves is dual to the real physical one: quantities whose dimensions correspond to voltages are denoted as currents, and vice versa [Klimov, 2025, Sec. 3.1]; (X circuit). Therefore the same operations on nodes have the opposite physical meaning in the X kernel:

  • an SC node (U=0) means Hz=0, i.e. a magnetic wall;
  • an OC node (∂Hz/∂n=0) means that the tangential component of E→ is zero, i.e. metal.

The magnetic-wall condition remains unchanged in the modified circuit [Klimov, 2025, (3.34)]:

Hz=0,(5)

"since the magnetic field in the modified grid is identical to the original magnetic field" [Klimov, 2025, Sec. 3.4].

Metal in magnetized plasma. In the modified circuit the edges carry the fictitious field Ex′, Ey′ (modified circuit), and the condition on metal changes [Klimov, 2025, (3.31)–(3.33)]. From expressions (3.12) for Ex, Ey in terms of Hz:

Ex=0:A(p)∂Hz∂y=B(p)∂Hz∂x,Ey=0:B(p)∂Hz∂y=−A(p)∂Hz∂x,(6)

and after substituting Ex′, Ey′ from (3.22) and the operators (3.10)

Ex=0:Ey′=−pωp2Ω(p2+Ω2+ωp2)Ex′,Ey=0:Ex′=pωp2Ω(p2+Ω2+ωp2)Ey′.(7)

For Ω=0 (B=0) the operator B(p)=0, and conditions (3.31), (3.32) reduce to the usual ∂Hz/∂n=0 — an OC node.

In the program, the keywords METAL and MAGNETIC produce the same block types in both kernels (101 and 107; the _MODEL_RTE__ macro, which would swap them, is not defined in the build — block parsing). Therefore, in the X kernel:

Task-file block What the program does Physically, for E waves
METAL U=0 at the contour nodes Hz=0 — magnetic wall, condition (3.34)
MAGNETIC OC node with load y=0 (formula) ∂Hz/∂n=0 — metal
region edge nodes are not updated, U=0 magnetic wall
METAL port (default) the outermost aperture nodes are 0, sin profile port between magnetic walls
MAGNETIC port constant profile, the outermost nodes are halved plane wave between metal walls

Hence a practical rule: a metal wall for E waves in the X kernel is specified with the MAGNETIC block. The mode between two METAL blocks has the profile Hz∝sin(πy/a) and the cutoff frequency c/(2a), whereas between two MAGNETIC blocks a wave with Hz constant over the cross-section also propagates (eigenmodes).

The program has no special condition on metal in plasma: the MAGNETIC block is always an ordinary OC node. In vacuum, in a dielectric and in plasma without an external field (B=0), this corresponds exactly to the theory; for metal in contact with magnetized plasma, condition (3.33) is not satisfied. More on the code: wall duality in the X kernel.

Absorbing boundary

Problem statement. An absorbing boundary truncates an infinite structure in such a way that the eigensolution existing on one side of the boundary does not change — as if the structure continued further [Klimov, 2007, Sec. 6.3]. This is a boundary condition of the third kind (a mixed boundary-value problem); it makes it possible to solve exterior scattering problems. The eigensolutions of the grid — the Hm0 waves of a rectangular waveguide and the plane wave (m=0) — are derived in the section eigenmodes.

Boundary node circuit. The boundary is chosen following [Sestroretsky et al., 2000] (Fig. 6.4 in [Klimov, 2007]): active loads Ym0 are connected to the boundary nodes, the admittances of the lines along the boundary are multiplied by a coefficient Bm, and the node stub admittance by Cm. The node formula with arbitrary admittances (4.19) for boundary node 0 takes the form [Klimov, 2007, (6.33), (6.34)]:

Uτ=2(U1τ−1+BmU2τ−1+BmU4τ−1±Cmy5Uτ−1+ym0Uτ−2)1+2Bm+Cmy5+ym0−Uτ−2,y5=Y5Y0,ym0=Ym0Y0,(8)

where U1 is the neighbour on the side of the computational region and U2, U4 are the neighbours along the boundary; "+" before y5 corresponds to an OC stub and "−" to an SC stub.

Matching conditions. Substituting the eigensolution U=fm(ny)sin(ωττ0+αmnx) into (6.34) and requiring the equality to hold at any instant, one obtains [Klimov, 2007, (6.35)–(6.39)]:

ym0=Ym0Y0=sinαmsin(ωτ0),Bm=Cm=12,(9)

where αm is the phase shift of the eigenmode per grid step, (6.22) for the Hm0 wave and (6.25) for the plane wave:

α0=arccos((2+y52)cos(ωτ0)−1∓y52)(10)

("−" for an OC stub, "+" for SC). The condition Bm=Cm=1/2 makes the characteristic equation of the boundary node (6.38) coincide with the equation of the unbounded grid (6.18) for any mode; the load Ym0 is the characteristic admittance of the lines in which the given eigensolution propagates. As can be seen from (6.37), absorbing waves with different propagation constants requires different loads [Klimov, 2007, Sec. 6.3.2]: a boundary with a single load absorbs only one wave without reflection.

In the program, the absorber is matched to a plane wave in vacuum at normal incidence (m=0, y5=0). The load is computed at the task frequency FREQ according to (6.25), (6.37); for generality, the program implements the formula with a signed stub yW (for an absorber block yW=0):

y=sinα0sin(ωτ0),cosα0=(2+|yW|2)cos(ωτ0)−1−yW2,ωτ0=2πΔFREQc.(11)

For yW=0, the expression for cosα0 is the dispersion equation of the grid vacuum along an axis, cosα0=2cos(ωτ0)−1 (dispersion).

The contour nodes are updated according to the neighbourhood code — which of the four neighbours belong to the block. The lines to neighbours outside the block are full lines, the lines along the contour are half-lines (B=1/2), and there are no lines into the block; the node stub is multiplied by the fraction of the cells surrounding the node that lie outside the block:

Contour node Neighbourhood code Lines Stub Load Formula
side three neighbours in the block one full line outwards, two half-lines along y5/2 y below
outer corner two adjacent neighbours in the block two full lines outwards, two half-lines along 3y5/4 y/2 23+|y5′′|+y/2(Uo1+Uo2+12(Ua+Ub)+y5′′Uτ−1+y2Uτ−2)−Uτ−2
inner corner all four neighbours in the block, one diagonal neighbour missing two half-lines y5/4 3y/2 21+|y5′″|+3y/2(12(Ua+Ub)+y5′″Uτ−1+3y2Uτ−2)−Uτ−2
inside the block all neighbours, or none — — — U=0
one neighbour or two opposite ones — — — — error "Bad Absorber or Magnetic Type"

For a contour side, this is the boundary node (6.34) with B=C=1/2, written with a signed y5:

Uτ=22+|y5′|+y(Uoτ−1+12(Uaτ−1+Ubτ−1)+y5′Uτ−1+yUτ−2)−Uτ−2,y5′=y52(12)

(the numerator and denominator of (6.34) are multiplied by 2). Here y5 is the stub of the node itself, i.e. of the medium in which the absorber is placed, and y is the load computed for vacuum. Rules for corner nodes are not derived in [Klimov, 2007] (a straight boundary is considered there); in the program they are specified by the fractions given in the table. A magnetic wall is the same node with y=0 (above).

Limitations. It follows from (6.37) that a boundary with the absorber load is exactly matched only for a plane wave along the normal at the frequency FREQ in vacuum:

  • a wave incident at an angle γ to the normal requires the load sin(αcosγ)/sin(ωτ0)≈ycosγ ((7.54), for a small step sinα≈α); with the load y, a reflection |Γ|≈(1−cosγ)/(1+cosγ) remains. The H10 waveguide mode consists of two plane waves at an angle γ, cosγ=1−(fc/f)2; when the program was tested on a waveguide with an absorber frame (40, 72, 100 GHz), the reflection agreed with this estimate to within 3 % (below);
  • if the absorber is placed in a dielectric, the node stub is taken into account, but the load is not (it is computed for yW=0): the boundary is no longer matched. The absorber is placed in vacuum;
  • the load is computed once, at the frequency FREQ.

Geometry. A rectangular absorber is built as an outer contour with side and corner codes and a ring of nodes inside (code "no neighbours", the nodes are set to zero). It must not come closer to the region edges than 1 step on the left and bottom and 2 steps on the right and top, and its size must be at least 2 steps. The upper limit of the rectangle is rounded to a node with a correction of +0,5 step, so that the ring closes also when the boundaries lie on nodes (a fix of October 2026). A polygon and an annular sector are built as a 2×2-node strip along the contour (staircase walls).

More on the code: absorber and magnetic wall of the H kernel.

Absorption of plane waves for E waves

Problem statement [Klimov, 2007, Sec. 7.2]. In a planar Rτ-grid with homogeneous magnetized plasma, a plane wave propagates at an angle γ to the x axis; the absorbing boundary on the right must not change this eigensolution. The boundary is the same as for H waves [Sestroretsky et al., 2000]: active loads Y0γ are connected to the boundary nodes, the plasma stubs of a boundary node are CγY5, CγY6, CγY7, and the lines along the boundary are BγY0 (Fig. 7.4). The node is updated by the four-parameter algorithm of Chapter 5 (X node), written for a boundary node (7.51), (7.52).

Matching conditions. By analogy with Chapter 6 [Klimov, 2007, (7.53), (7.54)]:

Bγ=Cγ=12,y0γ=sinαxsin(ωτ0)=sin(αcosγ)sin(ωτ0),(13)

where α is the phase shift per grid step from the dispersion equation of the grid with magnetized plasma (7.40), and αx=αcosγ is its projection onto the boundary normal. The boundary node is then updated according to [Klimov, 2007, (7.55)]:

Uτ=&24+y5+y67+2y0γ(2U1τ−1+U2τ−1+U4τ−1−y5Uτ−1+2y0γUτ−2)−Uτ−2&+2y674+y5+y67+2y0γ(2Uτ−2−y7−y6y6+y7(Uτ−1+Uτ−3))−(Uτ−2+Uτ−4)+2y7−y6y6+y7(Uτ−1+Uτ−3)&−2y7−y6y6+y724+y5+y67+2y0γ(2U1τ−2+U2τ−2+U4τ−2−y5Uτ−2+2y0γUτ−3)&+24+y5+y67+2y0γ(2U1τ−3+U2τ−3+U4τ−3−y5Uτ−3+2y0γUτ−4).(14)

This is the node formula (5.49) (X algorithm) in which the line to the neighbour U1 on the side of the region is a full line, the lines along the boundary and the stubs are halved, and the line beyond the boundary is replaced by the load y0γ (the numerator and denominator are multiplied by 2).

Proof [Klimov, 2007, (7.56)–(7.68)]. Substituting the eigensolution (7.46)–(7.50) into (7.55) and grouping the terms in the same way as in the derivation of the dispersion equation of the unbounded grid, one obtains, taking (7.54) into account, the dispersion equation for the chosen boundary [Klimov, 2007, (7.68)]:

cos(αcosγ)+cos(αsinγ)=cos(2ωτ0)+Az2+cos(ωτ0)Bz2Dzcos(ωτ0)−Cz−cos(ωτ0)y0γ,(15)

where Az, Bz, Cz, Dz are combinations of the node admittances (7.57)–(7.60). The left-hand sides of (7.68) and of the unbounded-grid equation (7.40) coincide, and the identity of the right-hand sides is proved in (7.69)–(7.81). Hence, under conditions (7.53), (7.54), the eigensolution to the left of the boundary is the same as without the boundary, and a plane wave at an angle γ is absorbed without reflection. As for H waves, waves incident at different angles require different loads y0γ.

In the program, an absorber node of the X kernel is updated by the two-layer H-node scheme (contour side) on top of the result of the common pass, with the same neighbourhood codes and fractions as in the H kernel (X-kernel absorber):

  • the stub y5 is taken from cell 1 of the node coefficients (prYNode[6n+1]: −y5 for plasma, 4Δε for a dielectric); the plasma coefficients Y3, Y4, Y5 of the node (X coefficients) are not used;
  • the load is the same as in the H kernel, with yW=0, i.e. γ=0 and the α of the grid vacuum;
  • a magnetic wall is the same node with y=0; by duality, physically it is metal.

For an absorber in vacuum, this corresponds to (7.53), (7.54) with γ=0, and the X absorber coincides with the H absorber. Test on a 12 mm waveguide with an absorber frame (the TE1 wave consists of two plane waves at an angle γ, cosγ=1−(fc/f)2):

f, GHz estimate (1−cosγ)/(1+cosγ) |S11|, H kernel |S11|, X kernel
40 0.0257 0.0256 0.0256
72 0.0077 0.0075 0.0075
100 0.0039 0.0038 0.0038

In October 2026, the stub cell in the absorber and magnetic-wall node of the X kernel was corrected: the branch had been carried over from the H kernel, where the stub is stored in cell 0, whereas in the X node cell 0 holds the factor 2/(4+…) of the node formula (X node). Before the fix, the reflection of the same absorber at 72 GHz was 0.0121 instead of 0.0075.

The program does not take into account the stubs y6, y7 or the phase shift including the plasma (7.40), so the absorber is placed in vacuum, outside the plasma. The node (7.55) for an absorber inside magnetized plasma and the load for a given angle γ are not implemented in the program.

Oblique and curved walls on the grid

The boundary conditions (6.1), (6.2), (6.37) are derived for walls passing through grid nodes along its axes. The program replaces oblique and curved walls with a staircase approximation: each contour point is moved to the nearest grid node (CalcnNodeGlobal), and the wall becomes a chain of nodes.

Segment. A segment spanning nx steps along one axis and ny<nx along the other is built as a "staircase": along the axis with the larger number of steps, nodes are placed at every step, and along the other axis uniformly; the i-th row of the staircase contains the nodes with indices j for which

jny<(i+1)nx,(16)

and adjacent nodes of the chain are connected along a cell side. Until October 2026, the functions for annular sectors and polygons of absorbers and magnetic walls used an earlier loop that cut an oblique segment off at roughly its midpoint: a gap remained in the wall, and the wave passed through the metal or absorber. Now the wall is continuous in all functions.

Polygon. A metal polygon is a polyline through the vertices in the order given: the last vertex is not automatically connected to the first. This is intentional (an open contour can be specified); to close the contour, the first vertex is repeated at the end of the list. Absorbers and magnetic walls along a polygon are a strip 2×2 nodes wide along the polyline; the neighbourhood codes are computed automatically (SetAbsorberNodeType).

Annular sector. The two radial segments are built as staircases, and the arcs of radii Rmin and Rmax as points with an angular step that gives about two points per grid step (k=2int(RΔφ/Δ+1) points per arc); each point is moved to the nearest node.

Parts outside the region. Contour points lying more than half a step beyond the boundary of the computational region are discarded together with their nodes. Previously they were pressed against the outermost column (row) of nodes and distorted the region boundary.

Accuracy. A staircase wall is displaced relative to the specified one by no more than half a step; for the geometry to be mapped without distortion, block boundaries are placed on grid nodes (grid rules). Dielectric blocks are not built with the staircase approximation: their contribution to a node is taken into account with a weight — the fraction of the surrounding cells (grid).

Mapping to the code

Symbol / action Variable, function File (src/)
U=0 at metal nodes (6.1) RunBlockNode, RunBlockNode1 (H), RunBlockNode…RunBlockNode3 (X), branch CTMCRTH_BLCKNTYPE_METAL kernels/planarrt_h/tmcrthnodediel.cpp, kernels/planarrt_x/tmcrthnodediel.cpp
metal contour SetRectMetal, SetPolyMetal, SetCircMetal same files
region edge (U=0) edge nodes are not included in the RunScatteringNode* traversal kernels/planarrt_h/tmcrthrectnode.cpp, kernels/planarrt_x/tmcrthrectnode.cpp
OC and absorber node (6.34) with B=C=1/2 RunBlockNode*, branches CTMCRTH_BLCKNTYPE_MAGNETIC, CTMCRTH_BLCKNTYPE_ABSORBER; stub fractions y5 *= 0.5, 0.75, 0.25 kernels/planarrt_h/tmcrthnodediel.cpp, kernels/planarrt_x/tmcrthnodediel.cpp
neighbourhood codes (side, corners) SetAbsorberNodeType, CTMCRTH_BLCKNTYPE_ABSR_* same files, include/tmcgrviw.h
y=sinα0/sin(ωτ0) (6.25), (6.37) SetAbsorberAdmitance (for an absorber dYInput = 0) kernels/planarrt_*/tmcrthnodediel.cpp
node load y (0 for a magnetic wall) sTmcRTHNodeDielOne::rY kernels/planarrt_*/tmcrthnodediel.h
Uτ−2 of a contour node sTmcRTHNodeDielOne::rU same file
node y5 prYNode[2n] (H), prYNode[6n+1] (X) kernels/planarrt_*/tmcrthnodediel.cpp
construction of absorbers and magnetic walls SetRectAbsorber, SetPolyAbsorber, SetCircAbsorber, SetRectMagnetic, SetPolyMagnetic, SetCircMagnetic same files
wall up to the region edge SetMagneticPolygonType, CTmcRTH_IndanParam::CalcnNodeGlobalFM same files, include/tmcrth_indanparam.h
nearest node of a contour point CTmcRTH_IndanParam::CalcnNodeGlobal include/tmcrth_indanparam.h
staircase jny<(i+1)nx loops in SetPolyMetal, SetCircMetal, etc. kernels/planarrt_*/tmcrthnodediel.cpp
parts outside the region are discarded TmcB16Out same files
METAL → 101, MAGNETIC → 107, ABSORBER → 100 block parsing in CTmcRTH_BlockList; the _MODEL_RTE__ macro is not defined libs/tmcindan/tmcrth_bolcklist.cpp, include/tmcgrviw.h
boundary conditions on the GPU habs (H), xabs (X) kernels/planarrt_h/tmcgpuh.h, kernels/planarrt_x/tmcgpux.h

A detailed description of the code: metal and absorber of the H kernel, wall duality, metal and absorber of the X kernel; boundary conditions on the GPU: GPU computing.

Sources

  • [Klimov, 2007] — Ch. 6: Sec. 6.1 ((6.1), Fig. 6.1), 6.2 ((6.2), Fig. 6.2), 6.3 (6.3.1: (6.3)–(6.26); 6.3.2: (6.27)–(6.39), Fig. 6.4); Ch. 3: Sec. 3.4 ((3.31)–(3.34)); Ch. 4: (4.19); Ch. 7: Sec. 7.2 ((7.46)–(7.81), Fig. 7.4), (7.40).
  • [Klimov, 2025] — Ch. 3: Sec. 3.1 ((3.6)), 3.3 ((3.22), (3.24)), 3.4 ((3.31)–(3.34)); Ch. 4: Sec. 4.1; Ch. 5: Sec. 5.2 (Fig. 5.5 — node with an active conductance for boundary conditions).
  • [Klimov, Sestroretsky, 2001, No. 9] — absorbing and excitation boundary conditions in a planar Rτ-grid.
  • [Sestroretsky et al., 2000] — choice of the absorbing boundary type.
  • The full reference list is given in References.