Файл задания .tpl — как его создать. Полный справочник входного языка

Относится к счётным ядрам PlanarRT_H (tmc_rth.exe) и PlanarRT_X (tmc_rtx.exe).

Документ восстановлен по авторскому руководству «TAMIC-Rt H. Программа для электродинамического анализа в H плоскости планарных структур с неоднородным диэлектрическим заполнением, версия 2.0p» (TAMIC_soft group, 2000) и сверен с текущим исходным кодом TMC Suite. Места, где нынешний код расходится с руководством 2000 года, отмечены явно — при расхождении верным считается код.

Изменения языка и ядер по исправлениям 26.10.2026 (версия 5.1, см. История изменений) внесены в соответствующие разделы и отмечены словами «с 26.10.2026».

Исправления 29.10.2026 (по ответам автора) внесены так же и отмечены словами «с 29.10.2026».


1. Что такое файл задания

Входными данными счётного ядра является геометрия анализируемого устройства, которая описывается в текстовом файле задания с расширением .tpl. Ядро читает .tpl, проводит расчёт и выдаёт результаты в виде файлов нескольких типов, которые затем смотрят вьюверы пакета.

Структурная схема пакета
Структурная схема пакета

Структурная схема пакета (рис. 2.1 авторского руководства).

Расхождение с рисунком. На схеме 2000 года файл поля обозначен File.ft, а в тексте того же руководства — File.tf. В текущем коде поле пишется в файл .ex (в ядре X в нём лежит Hz), распределение поля для ДН — в .AMP / .FAZ (см. раздел 8). Расширение .tf осталось только в списке открываемых FieldView форматов.

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


2. Общая структура файла задания

Каждая строка файла начинается уникальным описателем, который определяет следующие за ним данные.

Файл задания всегда начинается строкой #TMC_RT_H и заканчивается строкой #EOF.

Всё задание делится на шаги. Каждый шаг может описывать независимое СВЧ-устройство или его часть; шаг начинается строкой #STEP и заканчивается #END_STEP:

#TMC_RT_H          Начало файла задания
#STEP              Это первый шаг
   Данные для первой задачи
#END_STEP
#STEP              Это второй шаг
   Данные для второй задачи
#END_STEP
#EOF               Конец файла задания

Сигнатура #TMC_RT_H — общая для обоих ядер. X-ядро (tmc_rtx.exe) читает файлы с той же первой строкой #TMC_RT_H, отдельной сигнатуры #TMC_RT_X в коде нет.

Каждый шаг состоит из четырёх секций, которые рекомендуется располагать в таком порядке:

Секция Назначение Обязательна?
#PARM … #END_PARM Единицы измерения, шаг сетки, время, границы «коробки», частота Да, в каждом шаге (с 29.10.2026)
#TOPOLOGY … #END_TOPOLOGY Блоки (графические примитивы), из которых состоит устройство Да
#LINK_LIST … #END_LINK Геометрическое положение каждого блока в «коробке» Да
#OUTPUT … #END_OUTPUT Какие выходные файлы формировать Да (нужно хотя бы FILE)

Каждый шаг — независимая задача (с 29.10.2026). Секция параметров обязательна в каждом шаге, и в ней обязательны X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ (раздел 4). Раньше секцию или отдельные параметры можно было не повторять — недостающие параметры молча брались из предыдущего шага.

2.1. Синтаксис

  • Все операторы, имеющие символ #, должны начинаться с первой позиции строки.
  • Остальные операторы должны иметь как минимум один пробел в первой позиции строки.
  • Комментарий — любая строка или часть строки, начинающаяся с символа !.
  • Допустимы пустые строки и строки из одних пробелов.
  • Параметры отделяются от идентификатора строки как минимум одним пробелом, а между собой — символом ;.

В формализованных записях формата ниже приняты обозначения:

Обозначение Смысл
< > обязательный параметр
[ ] необязательный параметр
expression математическое выражение
expression(x,y,r,f) выражение, содержащее функцию от декартовых (x,y) или полярных (r,f) координат
n целое число

3. Методика: как составить задание с нуля

Это тот самый порядок действий, которым пользовался автор. Разберём его на задаче из авторского руководства: рассеяние плоской волны на плоскопараллельной пластине с ε = 4 на частоте 10 ГГц.

Шаг 1. Нарисовать топологию в H-плоскости

Начинают с чертежа реального устройства в H-плоскости, со всеми размерами.

Исходная геометрия
Исходная геометрия

Расположение плоскопараллельной пластины в H-плоскости (рис. 3.1). Все размеры в миллиметрах.

Шаг 2. Вписать устройство в «коробку»

Всё устройство должно помещаться в прямоугольник — его называют «коробкой». Положение коробки задаётся в секции параметров величинами X_MIN, X_MAX, Y_MIN, Y_MAX.

Границей коробки является металл или входы устройства. Это важно: сама граница коробки — всегда металл, если на ней не стоит вход.

Расположение в коробке
Расположение в коробке

Расположение пластины в «коробке» и значения задаваемых константных выражений (рис. 3.2).

Обратите внимание на обозначение ε⁺ = 3 внутри пластины: это не сама проницаемость, а добавка к проницаемости вакуума. Пластине с ε = 4 соответствует добавка ε⁺ = 3 (см. раздел 5.1).

Шаг 3. Декомпозировать геометрию на примитивы

Полученную геометрию раскладывают на блоки — графические примитивы входного языка.

Декомпозиция
Декомпозиция

Декомпозиция заданной геометрии с использованием графических примитивов (рис. 3.3).

Для нашей задачи получается пять блоков:

Блок Что это
Block 1, Block 2 входы устройства (INPUT_X)
Block 3, Block 4 прямоугольники с магнитными стенками (RECT_STAT MAGNETIC)
Block 5 прямоугольник с заданным диэлектрическим распределением (RECT_STAT)

Шаг 4. Выбрать шаг сетки Δ

Шаг сетки DELTA определяет точность. Правила выбора — в разделе 4.5. Кратко: ориентировочно 1/20 длины волны в волноводе на максимальной частоте диапазона даёт точность около 3 %.

Шаг 5. Написать задание

Каждый блок описывается в секции #TOPOLOGY в своей локальной системе координат, а затем размещается в коробке строкой T в секции #LINK_LIST.

Полный текст задания (файл samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL, приведён по авторскому руководству — в репозитории файл с тех пор изменялся, см. примечание ниже):

#TMC_RT_H
#define L1 @ (   50.00)
#define L2 @ (   50.00)
#define L3 @ (   50.00)
#define W_freq @ (  10 )
#define W_eps @ ( 4.00 )
#define W_waveg @ (  6.00 )
#define W_input @ (  2.00 )
#define W_delta @ (    0.5 )
#define W_type @ MAGNETIC
#define a1 @ ( W_input )
#STEP
#PARM
 ANGLE_UNIT radian;
 FREQ_UNIT GHz;
 LONG_UNIT mm;
 TIME_UNIT ns;
 DELTA W_delta;
 TIME 0.; 5;
 X_MIN  0.0;
 X_MAX L1+L2+L3;
 Y_MIN  0.0;
 Y_MAX W_waveg;
 FREQ  10;
#END_PARM
#TOPOLOGY
 BLOCK 1;
  INPUT_X   W_type ; -a1/2; a1/2; 0; 200;
 END_B
 BLOCK 2;
  INPUT_X    W_type ; -a1/2; a1/2; 200; 201;
 END_B
 BLOCK 3;
  RECT_STAT W_type ; 0.0; L1+L2+L3; -a1/2-2*W_delta; -a1/2-1*W_delta;
 END_B
 BLOCK 4;
  RECT_STAT W_type ; 0.0;L1+L2+L3; a1/2; a1/2+W_delta;
 END_B
 BLOCK 5;
  RECT_STAT (W_eps-1); 0;L2; 0.0; W_waveg;
 END_B
#END_TOPOLOGY
#LINK_LIST
 T 1; 0.0; W_waveg/2;
 T 2; L1+L2+L3; W_waveg/2;
 T 3; 0.0; W_waveg/2;
 T 4; 0.0; W_waveg/2;
 T 5; L1; 0.0;
#END_LINK
#OUTPUT
 FILE test1;
 SMATRIX test1; 10; 4; 5;
 FIELDS;
 TOPOLOGY;
#END_OUTPUT
#END_STEP
#EOF

Разбор ключевых мест:

  • #define W_eps @ ( 4.00 ) — проницаемость пластины ε = 4;
  • RECT_STAT (W_eps-1); … — в блок передаётся добавка ε⁺ = ε − 1 = 3. Отсюда -1;
  • INPUT_X W_type; -a1/2; a1/2; 0; 200; — вход шириной a1, радиоимпульс с 0 по 200 нс;
  • второй вход (Block 2) имеет T_min = 200, что больше времени анализа (TIME 0.; 5;) — так задают вход, на котором нет падающей волны, только приём;
  • SMATRIX test1; 10; 4; 5; — записать S-матрицу для частоты 10 ГГц, усреднив с 4 по 5 нс. Частота в SMATRIX совпадает с FREQ 10; — в одночастотном режиме это обязательно (раздел 7.4).

Файл в репозитории отличается от руководства. В samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL с 2000 года изменены L1=100, L2=600, L3=100, W_eps=-0.01, W_delta=0.1, TIME 0.; 200;, а у первого входа появились дополнительные параметры (… 0; 200; 1.; ; — амплитуда и фаза, см. раздел 6.4). Приведённый выше текст — из руководства; он показывает исходный замысел.

Шаг 6. Проверить и запустить

  1. Откройте .tpl в ядре (File → Open).
  2. Ошибки разбора выводятся с указанием строки — язык проверяется строго.
  3. Запустите расчёт и посмотрите результаты вьюверами (раздел 8).

4. Секция параметров #PARM

#PARM
    . . .
#END_PARM

#PARM или #PARMS? В авторском руководстве 2000 года разделы «Формат ввода» пунктов 4.1.x написаны через #PARMS / #END_PARMS (11 мест), а все реальные примеры и оглавление — через #PARM / #END_PARM. Это след родственного продукта TAMIC-E/H, где секция действительно называется #PARMS.

Оба варианта работают. Канонические имена в коде — #PARM и #END_PARM (src/Include/TmcRTH_Indan.h, строка 23), но секции ищутся сравнением по префиксу (strncmp(csCh, csSection, csSection.GetLength()) в TmcRTH_Indan.cpp, строки 435 и 460), поэтому #PARMS и #END_PARMS тоже совпадают. Рекомендуется писать #PARM / #END_PARM.

Единицы измерения углов, частоты, длин и времени необходимо задавать до определения частот и параметров с размерностью длины и времени.

Порядок строк в #PARM. Сначала пишутся строки единиц — ANGLE_UNIT, FREQ_UNIT, LONG_UNIT, TIME_UNIT, — и только потом значения (DELTA, TIME, X_MIN … Y_MAX, FREQ). Величина переводится в единицы в момент чтения своей строки; строка единицы действует только на строки, стоящие ниже неё.

Строка единицы, стоящая в той же секции #PARM ниже своей величины, — ошибка разбора (с 29.10.2026). Пример сообщения:

{FREQ_UNIT MHz;}: the unit is written after its value (FREQ ) in the section #PARM. A unit acts only on the lines below it - move the line of the unit above the values

Для каждой строки единицы проверяются свои величины:

Строка единицы Величины
FREQ_UNIT FREQ
LONG_UNIT X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, HEIGHT
TIME_UNIT TIME, DELTA_T

Раньше такая строка единицы на величину молча не действовала: например, FREQ 7.2;, записанная выше FREQ_UNIT MHz;, считалась как 7,2 ГГц. TPL Designer всегда пишет строки единиц первыми.

#PARM
 ANGLE_UNIT radian;     ! сначала — все единицы
 FREQ_UNIT GHz;
 LONG_UNIT mm;
 TIME_UNIT ns;
 DELTA 0.5;             ! затем — значения: 0,5 мм
 TIME 0.; 5;            ! 0…5 нс
 . . .
#END_PARM

Обязательные параметры шага (с 29.10.2026). Каждый шаг #STEP — независимая задача: секция #PARM обязательна в каждом шаге, и в ней обязательны X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ. Если хоть один из них не задан — ошибка разбора, например:

Section #PARM: missing X_MAX. Every step is an independent task: ...

Шаг без секции #PARM — ошибка Missing section #PARM in 2 step .... Раньше недостающие параметры молча брались из предыдущего шага.

Строки единиц (ANGLE_UNIT, FREQ_UNIT, LONG_UNIT, TIME_UNIT) не обязательны и, как и раньше, действуют до следующей строки этой единицы — в том числе в следующих шагах.

Задания-примеры. В 23 заданиях samples\SAMPLE_R и в двух заданиях регрессии недостающие параметры дописаны (с комментарием ! B-15 (29.10.2026) ...); их результаты не изменились.

4.1. ANGLE_UNIT — единицы измерения углов

ANGLE_UNIT <radian> | <gradus>;

Фиксирует единицу измерения углов аргументов тригонометрических функций.

Значение Смысл
radian радианы
gradus градусы

По умолчанию — как в предыдущем шаге; если шаг первый — radian.

4.2. FREQ_UNIT — единицы измерения частоты

FREQ_UNIT <GHz> | <MHz> | <kHz> | <Hz>;

Вводится до строки FREQ. По умолчанию в первом шаге — GHz.

4.3. LONG_UNIT — единицы измерения длины

LONG_UNIT <mm> | <cm> | <m>;

Вводится до строк DELTA, X_MIN, X_MAX, Y_MIN, Y_MAX. По умолчанию в первом шаге — mm.

Единицы длины относятся только к геометрии. Величины плазмы и потерь задаются в фиксированных единицах, на которые LONG_UNIT не действует: концентрация N — всегда в м⁻³, индукция B — всегда в теслах, проводимость σ — в См/м (раздел 4.10).

4.4. TIME_UNIT — единицы измерения времени

TIME_UNIT <s> | <ms> | <mks> | <ns> | <ps>;

Вводится до строки TIME.

По авторскому руководству, значение по умолчанию в первом шаге — секунды (s), а не ns. Единицу времени лучше задавать явно.

4.5. DELTA — шаг сетки (точность анализа)

DELTA <expression>;

Физический смысл — размер пространственного дискрета, шага квадратной сетки, на которую разбивается всё устройство. Это главный параметр точности.

Рекомендации автора:

  1. Для точности около 3 % величина должна составлять около 1/20 длины волны в волноводе на максимальной частоте диапазона. Точнее — определяется серией расчётов на сходимость.
  2. При уменьшении шага время анализа растёт пропорционально кубу. Поэтому первоначальную отработку устройства ведут при низкой точности, повышая её на заключительном этапе.
  3. Подбирайте шаг и геометрию так, чтобы геометрия вписывалась целым числом дискретов. Если толщина металла 1, 2, 3, 4 мм — берите DELTA = 1 мм или 0.5 мм, а не 1.02 мм или 0.47 мм.
  4. Время счёта минимально, если в «коробке» вдоль X и Y укладывается целое число дискретов.

От DELTA зависит и шаг по времени dT. Через него ядро X пересчитывает проводимость σ блоков *_STAT_S в сеточные потери, и от него же зависит действие сеточных потерь Y (раздел 5.7.3).

Параметр обязателен в каждом шаге (с 29.10.2026; раньше — только в первом).

4.6. TIME — время анализа

TIME <expression>; <expression>;

Первый параметр — время начала анализа, второй — время окончания. Обязателен в каждом шаге (с 29.10.2026; раньше — только в первом).

4.7. X_MIN, X_MAX, Y_MIN, Y_MAX — границы «коробки»

X_MIN <expression>;
X_MAX <expression>;
Y_MIN <expression>;
Y_MAX <expression>;

Задают прямоугольник, в который помещается анализируемая топология. Обязательны в каждом шаге (с 29.10.2026; раньше — только в первом).

Как ядро строит сетку по границам (с 26.10.2026):

  • Число узлов сетки по X и по Y ядро считает один раз — при чтении границ (X_MIN, X_MAX, Y_MIN, Y_MAX) и шага DELTA. С 29.10.2026 эти строки обязательны в каждом шаге (раздел 4), поэтому сетка каждого шага строится по его собственным границам и шагу.
  • Правую и верхнюю границы ядро, как и раньше, сдвигает на один шаг сетки — добавляет запасной столбец (и запасную строку) узлов. Так задумано: сетка на один узел больше заданной области — последний узел стоит на шаг Delta дальше X_MAX (то же по Y — дальше Y_MAX). Поэтому в окне «Статистика» ядра при X_MAX = 200 и Δ = 1 мм показывается max = 201.

Исправлено 26.10.2026. Раньше на некоторых сетках (например, X_MAX 1000 при DELTA 0.5 или Y_MAX 16 при DELTA 0.2) терялся крайний столбец X_MAX (строка Y_MAX): вход, стоящий на этой границе, давал полное отражение. Теперь столбец не теряется. Кроме того, раньше в шаге без строк границ сетка вырастала на один шаг по сравнению с предыдущим шагом — теперь она остаётся прежней.

4.8. FREQ — частота сигналов возбуждения

FREQ <expression>;

Частота сигналов возбуждения на входах устройства. Обязателен в каждом шаге (с 29.10.2026; раньше — только в первом).

В одночастотном режиме частота строки SMATRIX должна совпадать с FREQ шага (раздел 7.4).

4.9. Параметры, принимаемые кодом, но не влияющие на расчёт

Разбор этих строк в коде есть, значение сохраняется, но ни одно ядро его не читает. Проверено по исходникам: соответствующие геттеры (dGetHeight, GetDeltaT, IsDeltaTDefine) не вызываются ни из kernels/, ни из fieldview/, ни из viewers/.

Ключевое слово Формат Состояние
HEIGHT HEIGHT <expression>; Разбирается, на расчёт не влияет. Встречается в samples/SAMPLE_R/TEST_*/…/HWVGD_1.TPL (HEIGHT 0.1;)
DELTA_T_MECHANICAL DELTA_T_MECHANICAL <expression>; Разбирается, вызывает SetDeltaT(), но результат не читается

4.10. Единицы величин плазмы и потерь

Величины плазмы и потерь всегда задаются в фиксированных единицах:

Величина Блоки Единица
Концентрация электронов N *_STAT_N, FILE_N м⁻³
Индукция магнитного поля B *_STAT_B, FILE_B Тл (тесла)
Проводимость σ *_STAT_S См/м
Сеточные потери Y *_STAT_Y, FILE_Y безразмерная сеточная величина

Единицы длины секции параметров (LONG_UNIT) относятся только к геометрии и на эти величины не действуют. Подробно о плазменных блоках — раздел 5.7.

Строки N_UNIT и B_UNIT (с 29.10.2026). Ядро считает N только в м^-3, а B — только в Тл. Поэтому в секции #PARM допустимы только записи

 N_UNIT m3;
 B_UNIT Tl;

Записи N_UNIT cm3;, N_UNIT mm3;, B_UNIT mTl;, B_UNIT mkTl; — ошибка разбора (например, the kernel calculates N only in m^-3 ...). Раньше такие единицы принимались, а значения молча брались в м^-3 и Тл.


5. Секция топологии #TOPOLOGY

#TOPOLOGY
    BLOCK 1;
        <тип примитива и его параметры>
    END_B
    . . .
    BLOCK <n>;
        . . .
    END_B
#END_TOPOLOGY

Каждому блоку присваивается уникальный номер <n> — целое число больше нуля. Номера не обязаны идти по порядку и не обязаны быть непрерывными (в авторском примере с рупорами используются номера 1, 2, 5, 6, 7, 12, 14, 21, 22, 25, 26, 41…46, 104).

Параметры каждого примитива описываются в его локальной системе координат. Положение блока в коробке определяется в #LINK_LIST — поэтому каждому блоку обязательно должна соответствовать одна строка в #LINK_LIST.

Все примитивы, кроме входов (INPUT_X, INPUT_Y), могут накладываться и пересекаться между собой. Входы обязательно должны помещаться только на границе «коробки».

5.1. Материал или распределение ε

Первый параметр примитива задаёт либо материал, либо распределение добавки диэлектрической проницаемости:

Значение Смысл
METAL металл (идеальный проводник)
MAGNETIC магнетик — стенка холостого хода (магнитная стенка)
ABSORBER поглотитель
expression(x,y,r,f) распределение добавки ε⁺ к проницаемости вакуума

Ключевое соглашение: задаётся добавка, а не сама проницаемость.

Нужная ε Что писать
ε = 4 3
ε = 9 8
ε = 1 (вакуум) 0
ε = 0 -1
ε = 0.25 -0.75

Добавка, близкая к 4 (только ядро X). Добавку ε, отличающуюся от 4 меньше чем на 0,004 (то есть ε, близкую к 5), ядро PlanarRT X сдвигает до 3,996 или до 4,004. Так задумано автором: без этого алгоритм расходится.

Как ядро кладёт магнитную стенку на сетку. Границы блока MAGNETIC ядро округляет до узлов сетки в разные стороны: у прямоугольника нижняя граница сдвигается вниз (на полшага), к верхней добавляется шаг; у наклонной стенки пороги у левого и правого краёв — 1,5 и 2,5 шага (правый край области стоит на запасном столбце, раздел 4.7). Поэтому стенка в узлах получается симметричной относительно заданных границ. Разные добавки к краям — не ошибка, так задумано (ответ К. Н. Климова 29.10.2026).

Важная разница в смысле примитива — материал задаёт КОНТУР, а не заливку. Если задан материал, примитив задаёт границу (контур, ломаную линию). Если задано выражение, примитив задаёт область, заполненную средой. Это хорошо видно на рисунках ниже: у RECT_STAT METAL металлом является только контур прямоугольника, а у RECT_STAT 8 закрашена вся площадь.

Подтверждено кодом: SetRectMetal (src/kernels/PlanarRT_H/TmcRTHNodeDiel.cpp:2419) выделяет nNumNode = 2*nX + 2*(nY-1) узлов — это периметр, а не nX*nY (заливка), и заполняет их четырьмя циклами: нижнее ребро (y = dYmin), верхнее (y = dYmax), левое (x = dXmin), правое (x = dXmax).

Практическое следствие. Чтобы получить сплошной металлический объект, задавайте его контуром: поле внутрь замкнутого контура не проникает. А чтобы получить сплошную диэлектрическую вставку — задавайте выражение, оно заполняет площадь.

Толщина магнитной стенки и поглотителя. Стенка MAGNETIC и поглотитель ABSORBER — у всех примитивов, в том числе у CIRCLE_STAT и POLYGON_STAT, — имеют толщину в одну ячейку сетки (2×2 узла). С 26.10.2026 наклонные стороны (стороны многоугольника и радиальные стороны сектора) строятся сплошными, без диагональных просветов. Раньше «лесенка» наклонной стороны обрывалась примерно на середине отрезка, а в её углах оставались щели.

Поглотитель в диэлектрике и в плазме (с 29.10.2026). Поглотитель ABSORBER может стоять в диэлектрике и в плазме: его нагрузка считается по среде каждого его узла — по добавке Delta eps узла (так же, как нагрузка входа считается по параметру W, раздел 5.5), а в подмагниченной плазме — по дисперсии с полем. Проверка: волновод в диэлектрике eps = 2 и eps = 4 даёт |S11| = 0,0036 и 0,0017 при теоретических 0,0038 и 0,0019. Раньше получалось 0,16 и 0,32: граница поглотителя работала как граница «диэлектрик — вакуум».

Если в среде узла поглотителя волна на этой сетке не распространяется (плотная плазма, eps < 0), узел сохраняет прежнюю (вакуумную) нагрузку, и расчёт выдаёт предупреждение (N — число таких узлов):

WARNING: N absorber nodes are in a medium where the wave does not propagate ...

Поглотитель в такой среде не поглощает — вынесите его из неё.

Значение на границе блока. В узлах, лежащих на границе блока, значение блока ополовинивается, в углу — делится на четыре. Правило одно для всех величин: ε, N, B, Y, σ (подробно — раздел 5.7.1). С 29.10.2026 правило одно и для всех примитивов — прямоугольника, круга и многоугольника.

Внимание, METAL и MAGNETIC меняются местами. В src/Include/Tmcgrviw.h (строки 159–165) определения зависят от макроса _MODEL_RTE__: при его наличии METAL и MAGNETIC меняются ролями (модель E-плоскости). В штатных сборках H и X этот макрос не задаётся, и слова означают то, что написано.

5.2. RECT_STAT — неподвижный прямоугольник

BLOCK <n>;
    RECT_STAT [[file_name]]<METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
    <X_min>; <X_max>;
    <Y_min>; <Y_max>;
END_B
№ Параметр Смысл
1 материал / выражение см. раздел 5.1
2 X_min левая граница по X
3 X_max правая граница по X
4 Y_min нижняя граница по Y
5 Y_max верхняя граница по Y

Необязательный [file_name] в квадратных скобках перед выражением — сохранить рассчитанное распределение ε в файл file_name.eps, чтобы потом переиспользовать его примитивом FILE (раздел 5.6). Нужно для повышения эффективности при повторении вычислений на больших площадях.

Два дополнительных условия для MAGNETIC и ABSORBER:

  1. Разности X_max − X_min и Y_max − Y_min должны превышать 2*DELTA — толщина и высота должны быть больше двух пространственных дискретов.
  2. Весь прямоугольник должен находиться в коробке, и его граница должна отстоять от границы коробки не менее чем на один шаг сетки.

Примеры

Прямоугольник из металла
Прямоугольник из металла

Рис. 4.1. Неподвижный прямоугольник 30×10 мм, ограниченный металлом.

BLOCK 1;
    RECT_STAT METAL; 0; 30; 0; 10;
END_B
Прямоугольник из магнетика
Прямоугольник из магнетика

Рис. 4.2. Прямоугольник 29×8 мм со стенками холостого хода (магнетиком).

BLOCK 1;
    RECT_STAT MAGNETIC; -29; 0; -8; 0;
END_B
Прямоугольник из поглотителя
Прямоугольник из поглотителя

Рис. 4.3. Прямоугольник 27×9 мм с поглощающими стенками.

BLOCK 1;
    RECT_STAT ABSORBER; 0; 27; 0; 9;
END_B
Прямоугольник с eps=4
Прямоугольник с eps=4

Рис. 4.4. Прямоугольник 31×12 мм с ε = 4 (добавка ε⁺ = 3).

BLOCK 1;
    RECT_STAT 3; 0; 31; 0; 12;
END_B
Прямоугольник с eps=0
Прямоугольник с eps=0

Рис. 4.5. Прямоугольник 31×12 мм с ε = 0 (добавка ε⁺ = −1).

BLOCK 1;
    RECT_STAT -1; 0; 31; 0; 12;
END_B
Прямоугольник с градиентом
Прямоугольник с градиентом

Рис. 4.6. Прямоугольник 30×10 мм, ε линейно падает вдоль X от 1 на левой границе до −1 на правой (добавка меняется от 0 до −2).

BLOCK 1;
    RECT_STAT -2*x/30; 0; 30; 0; 10;
END_B

5.3. CIRCLE_STAT — неподвижный сектор

BLOCK <n>;
    CIRCLE_STAT <METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
    <R_min>; <R_max>;
    <F_min>; <F_max>;
END_B
№ Параметр Ограничение
1 материал / выражение см. раздел 5.1
2 R_min ≥ 0
3 R_max > R_min
4 F_min ≥ 0
5 F_max > F_min; полный круг — F_max до 2π + 10⁻¹²

R_min, R_max — в единицах LONG_UNIT; F_min, F_max — в единицах ANGLE_UNIT.

Полный круг (с 26.10.2026). Круг считается полным, если F_max не больше 2π + 10⁻¹². Поэтому и точное значение 2π (например, 2*3.141592653589 или 6.28318530718), и 360° (при ANGLE_UNIT gradus) дают полный круг. Раньше точное значение 2π могло дать неполный круг («луч») или пустой блок.

Магнитный круг у края области (CIRCLE_STAT MAGNETIC) обрабатывается так же, как магнитный многоугольник (POLYGON_STAT MAGNETIC).

Примеры

Круг из металла
Круг из металла

Рис. 4.7. Металлический круг радиусом 30 мм.

BLOCK 1;
    CIRCLE_STAT METAL; 0; 30; 0; 2*3.141592653589;
END_B
Полуокружность из магнетика
Полуокружность из магнетика

Рис. 4.8. Полуокружность из магнетика радиусом 29 мм.

BLOCK 1;
    CIRCLE_STAT MAGNETIC; 28.9; 29; 3.141592653589/2; 3*3.141592653589/2;
END_B
Полукруг из поглотителя
Полукруг из поглотителя

Рис. 4.9. Полукруг из поглотителя радиусом 27 мм.

BLOCK 1;
    CIRCLE_STAT ABSORBER; 0; 27; 0; 3.141592653589;
END_B
Круг с eps=9
Круг с eps=9

Рис. 4.10. Круг радиусом 30 мм с ε = 9 (добавка ε⁺ = 8).

BLOCK 1;
    CIRCLE_STAT 8; 0; 30; 0; 2*3.141592653589;
END_B
Сектор
Сектор

Рис. 4.11. Сектор с ε = −1 (добавка ε⁺ = −2).

BLOCK 1;
    CIRCLE_STAT -2; 10; 30; 3.141592653589/2; 3.141592653589;
END_B

5.4. POLYGON_STAT — неподвижный многоугольник

BLOCK <n>;
    POLYGON_STAT <METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
        L <expression>; <expression>;
        L <expression>; <expression>;
        L <expression>; <expression>;
        [L <expression>; <expression>;]
        …
END_B

В первой строке — материал или выражение. В последующих строках после символа L вводятся абсцисса и ордината вершины в локальной системе координат блока.

Поведение зависит от первого параметра — это важно:

Первый параметр Поведение
выражение (ε) Последняя точка всегда соединяется с первой, образуя замкнутую область. Область должна быть односвязной и выпуклой, вершины обходятся по часовой стрелке. Число вершин должно быть больше 3.
METAL Формируется ломаная линия: последняя точка сама с первой не соединяется. Так задумано — например, можно задать открытый «квадрат», в который затекает волна. Чтобы замкнуть металлический контур, последней вершиной повторяют первую (рис. 4.12). Направление обхода и выпуклость соблюдать не нужно.
MAGNETIC, ABSORBER Последняя точка не соединяется с первой — формируется ломаная линия, а не замкнутая область. Направление обхода и выпуклость соблюдать не нужно. Толщина стенки — одна ячейка (2×2 узла), наклонные стороны сплошные (раздел 5.1).

Программа не контролирует, является ли область замкнутой и односвязной, а также правильность направления обхода вершин. Ошибка здесь не диагностируется — она проявится как неверный результат.

Примеры

Металлический четырёхугольник
Металлический четырёхугольник

Рис. 4.12. Металлический четырёхугольник (замкнут явно — первая точка повторена в конце).

BLOCK 1;
    POLYGON_STAT METAL;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B
Металлическая ломаная
Металлическая ломаная

Рис. 4.13. Металлическая ломаная линия (та же запись без повтора первой точки).

BLOCK 1;
    POLYGON_STAT METAL;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
END_B
Диэлектрический четырёхугольник
Диэлектрический четырёхугольник

Рис. 4.14. Диэлектрический четырёхугольник с ε = 4 (добавка ε⁺ = 3) — область замыкается сама.

BLOCK 1;
    POLYGON_STAT 3;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
END_B
Ломаная из магнетика
Ломаная из магнетика

Рис. 4.15. Ломаная линия из магнитной стенки.

BLOCK 1;
    POLYGON_STAT MAGNETIC;
        L -10; 0;
        L 0; 10;
        L 10; 0;
END_B
Ломаная из поглотителя
Ломаная из поглотителя

Рис. 4.16. Ломаная линия из поглотителя.

BLOCK 1;
    POLYGON_STAT ABSORBER;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B
Диэлектрический треугольник
Диэлектрический треугольник

Рис. 4.17. Диэлектрический треугольник с ε = 0.25 (добавка ε⁺ = −0.75).

BLOCK 1;
    POLYGON_STAT -0.75;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B

5.5. INPUT_X и INPUT_Y — входы (трансформаторы возбуждения)

По функциональному назначению блоки делятся на два типа: трансформаторы возбуждения и внутренние области. Все примитивы выше — внутренние области.

Осторожно с названиями — они означают не то, что кажется. INPUT_X — это вход вдоль оси Y, он ставится на левую или правую границу коробки, и его размеры задаются по Y. INPUT_Y — это вход вдоль оси X, он ставится на нижнюю или верхнюю границу коробки, и его размеры задаются по X. На какой именно границе окажется вход, определяется координатами в #LINK_LIST.

BLOCK <n>;
    INPUT_X [<METAL> | <MAGNETIC>];
    <Y_min>; <Y_max>;
    <T_min>; <T_max>;
    [<Amplitude>]; [<Faza>];
    [<Eps>];
END_B
BLOCK <n>;
    INPUT_Y [<METAL> | <MAGNETIC>];
    <X_min>; <X_max>;
    <T_min>; <T_max>;
    [<Amplitude>]; [<Faza>];
    [<Eps>];
END_B

Параметры 1–5 (документированы в руководстве 2000 года):

№ Параметр Смысл
1 тип Мода падающей волны (см. таблицу ниже)
2 Y_min / X_min Нижняя (левая) граница входа
3 Y_max / X_max Верхняя (правая) граница входа, > min
4 T_min Время начала радиоимпульса возбуждения
5 T_max Время окончания радиоимпульса возбуждения, > T_min

Мода возбуждения задаётся первым параметром:

Значение Мода Требование к ширине входа
MAGNETIC плоская волна ширина меньше половины длины волны входного сигнала
METAL или пусто первый тип колебаний прямоугольного волновода (волна H₁₀) ширина больше половины, но меньше полной длины волны

Эти условия необходимо соблюдать, чтобы во входном сечении реализовывался одномодовый режим возбуждения и согласования. Мода, по которой смотрится отражённый сигнал, соответствует падающей.

Частота радиоимпульса определяется параметром FREQ из секции параметров.

Согласованная плоская волна между стенками MAGNETIC (по ответу автора 29.10.2026; рис. 9.9 диссертации К. Н. Климова, 2007). Образец — samples\SAMPLE_R\TEST_MAG\EPS4\TEST025.TPL; та же расстановка — в примере раздела 3 (блоки 3 и 4):

  • порт INPUT_X MAGNETIC шириной a (от -a/2 до a/2);
  • нижняя стенка MAGNETIC — от -a/2-2·Delta до -a/2-Delta, то есть на шаг ниже края порта;
  • верхняя стенка MAGNETIC — от a/2 до a/2+Delta, то есть от самого края порта;
  • обе стенки идут по X от порта до порта.

При такой расстановке пустой канал отражает |S11| ~ 1e-7…1e-8 — и в H-, и в X-ядре.

Стенка не должна «заползать» на порт. Если расстановка другая, двигайте нижнюю и верхнюю стенки по отдельности на Delta–2·Delta. Критерий правильной расстановки — неискажённое поле в FieldView и |S11| пустого канала, близкий к 0.

Как задать вход без падающей волны (только приёмный). Если на входе отсутствует падающая волна, T_min должно быть больше времени анализа из секции параметров (TIME). Именно так сделан второй вход в примере раздела 3: TIME 0.; 5; при INPUT_X …; 200; 201;.

Параметры 6–8 — расширение, которого нет в руководстве 2000 года.

Установлено по исходному коду (ReadInputX / ReadInputY в src/libs/TMCIndan/TmcRTH_BolckList.cpp; вычисление — dAmplitude, dFaza, CalculateYForInput в src/kernels/PlanarRT_H/TmcRTHNodeDiel.cpp):

№ Параметр Смысл Если не задан
6 Amplitude Амплитуда сигнала — выражение от переменных t (текущее время) и f (частота). Допустимо любое значение, в том числе ≠ 1 (см. ниже). Вместо выражения можно указать файл сигнала в квадратных скобках [имя] — многочастотный режим (Многочастотный расчёт) 1.0
7 Faza Фаза сигнала — выражение от t и f, в единицах ANGLE_UNIT. Минус перед фазой означает запаздывание (так задумано) 0.0
8 Eps Добавка ε в сечении входа (влияет на волновую проводимость входа). Число или выражение; переменные t и f в нём недопустимы (см. ниже). В коде хранится в поле W не применяется

Все три необязательны, но параметр 7 обязателен, если задан параметр 6 (иначе — ошибка «Missing separator ';'»). Пустое значение допустимо: … 0; 200; 1.; ; означает амплитуду 1.0 и фазу по умолчанию — именно так записан первый вход в текущем samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL.

Переменные t и f позволяют задать огибающую импульса вместо прямоугольного радиоимпульса — например, гауссову.

Примеры

Волноводный вход INPUT_X
Волноводный вход INPUT_X

Рис. 4.18. Волноводный вход (H₁₀) шириной 20 мм, возбуждает систему радиоимпульсом длиной 10 нс.

BLOCK 1;
    INPUT_X METAL; 0; 20; 0; 10;
END_B
Вход плоской волны INPUT_X
Вход плоской волны INPUT_X

Рис. 4.19. Вход для плоской волны шириной 2 мм, радиоимпульс длиной 100 нс.

BLOCK 1;
    INPUT_X MAGNETIC; 0; 2; 0; 100;
END_B
Волноводный вход INPUT_Y
Волноводный вход INPUT_Y

Рис. 4.20. Волноводный вход (H₁₀) шириной 20 мм вдоль оси X. Тип не указан — эквивалент METAL.

BLOCK 1;
    INPUT_Y ; 0; 20; 0; 10;
END_B
Вход плоской волны INPUT_Y
Вход плоской волны INPUT_Y

Рис. 4.21. Вход для плоской волны шириной 2 мм вдоль оси X.

BLOCK 1;
    INPUT_Y MAGNETIC; 0; 2; 0; 100;
END_B

5.6. FILE — чтение распределения ε из файла

BLOCK <n>;
    FILE <file_name>;
    <X_min>; <X_max>;
    <Y_min>; <Y_max>;
END_B

При расчёте распределения ε для больших площадей прямоугольников вычисление формулы в каждом узле занимает заметное время. Его можно проделать один раз, сохранив результат в файл (параметр [file_name] у RECT_STAT, раздел 5.2), а затем подставлять готовое распределение.

№ Параметр Смысл
1 file_name Имя файла с распределением. Должен находиться в той же директории, что и файл задания
2–5 X_min, X_max, Y_min, Y_max Границы прямоугольника

Величины X_min, X_max, Y_min, Y_max должны быть такими же, как у RECT_STAT, из которого формировался файл.

Файл распределения — только для прямоугольника. Так задумано. Область любой формы вписывают в прямоугольник; всё, что вне фигуры, в файле — нули.

Для X-ядра так же читаются из файла величины плазмы — примитивы FILE_N, FILE_B, FILE_Y (раздел 5.7.4).

Распределение из файла
Распределение из файла

Рис. 4.22. Прямоугольник 30×10 мм, добавка ε⁺ задана функцией декартовых координат.

Сначала сохраняем распределение (первый шаг задания):

BLOCK 1;
    RECT_STAT [distr]-(2*x/30)^2+(2*y/10)^3; 2; 30; 1; 10;
END_B

Затем используем результат из distr.eps:

BLOCK 1;
    FILE distr; 2; 30; 1; 10;
END_B

5.7. Примитивы X-моды (плазма и потери)

Помимо перечисленных, код принимает плазменные варианты примитивов. Их нет в руководстве 2000 года; они относятся к X-моде (tmc_rtx.exe) и задают параметры замагниченной плазмы и потери. Полный список определён в src/Include/Tmcgrviw.h (строки 136–157):

Суффикс Примитивы Величина Единица
_N RECT_STAT_N, CIRCLE_STAT_N, POLYGON_STAT_N, FILE_N Концентрация электронов N м⁻³
_B RECT_STAT_B, CIRCLE_STAT_B, POLYGON_STAT_B, FILE_B Индукция магнитного поля B Тесла
_Y RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y Сеточные потери Y безразмерная сеточная величина
_S RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S Проводимость σ (потери в физических единицах) См/м

Параметры (координаты) — такие же, как у соответствующих базовых примитивов; вместо материала или выражения для ε пишется значение (или выражение) величины.

Единицы фиксированы: N — м⁻³, B — Тл, σ — См/м. Строки единиц секции #PARM на них не действуют — единицы длины относятся только к геометрии (раздел 4.10).

В H-ядре плазменных примитивов нет. Для *_STAT_S и FILE_N / FILE_B / FILE_Y H-ядро выдаёт ошибку «Unknow type block».

Исправлено 26.10.2026: CIRCLE_STAT_B, CIRCLE_STAT_Y, POLYGON_STAT_B, POLYGON_STAT_Y читаются в свои величины B и Y. Раньше они молча воспринимались как блоки N (плазма). Для RECT_STAT_* это было исправлено ранее (баг #15). Все три формы примитивов (RECT, CIRCLE, POLYGON) теперь равноправны.

5.7.1. Значение на границе блока

В узлах, лежащих на границе блока, значение блока ополовинивается, в углу блока — делится на четыре. Правило одно для всех величин: ε, N, B, Y, σ.

Вес узла одинаков для всех примитивов — прямоугольника, круга, многоугольника (с 29.10.2026): узел внутри блока — 1, на стороне блока — 1/2, в углу — 1/4. У круга и многоугольника вес узла определяется по его четырём соседям по сторонам — узлам (x +- Delta, y) и (x, y +- Delta), — попавшим в блок:

Соседей в блоке Вес узла
4 1
3 1/2
2 1/4 (и при двух противоположных соседях — блок толщиной в один узел)
1 1

Раньше у круга и многоугольника вес считался по диагональным точкам.

Граница круга в сетке — «лесенка» узлов. Площадь круга R = 3 мм в сетке — 24,0 мм^2 при Delta = 0,5 мм и 26,1 мм^2 при Delta = 0,2 мм (точная — 28,3 мм^2): эффективный радиус меньше заданного примерно на полшага. Для точной геометрии берите шаг мельче.

Следствия для плазмы в магнитном поле:

  • если B на границе плазмы должно быть полным, блок *_STAT_B задают шире блока плазмы, чтобы граница плазмы оказалась внутри блока B;
  • совпадающие блоки B и N допустимы, но на их общей границе будет B/2 — это даёт ложный резонансный слой.
 BLOCK 20;
  RECT_STAT_N 1.24e18; 100; 140; 20; 60;   ! плазма: концентрация электронов, 1/м^3
 END_B
 BLOCK 21;
  RECT_STAT_B 0.2; 99; 141; 19; 61;        ! магнитное поле, Тл (блок шире плазмы)
 END_B

5.7.2. Плазма, диэлектрик и магнитное поле в одном узле

  • Положительная добавка ε и плазма N в одном узле — так делать не нужно. Ядро выдаёт предупреждение — в консоль и в строку состояния (WARNING: … nodes have a positive addition of epsilon and the plasma N at once …). Такой узел считается как плазма; добавка ε в нём верна только на частоте FREQ. Если добавка ε больше плазменной части, эквивалентная концентрация получается отрицательной и расчёт этих узлов расходится — об этом предупреждение говорит отдельно. Диэлектрик и плазму размещают в разных узлах.
  • Отрицательная добавка ε без N — по-прежнему эквивалентная плазма.
  • Поле B в узле с положительной добавкой ε (без N) не используется — ядро тоже выдаёт предупреждение (WARNING: … nodes have a positive addition of epsilon and the magnetic field B …). Блок B без плазмы на расчёт не влияет.

Предупреждения на результат расчёта не влияют: расчёт продолжается.

Потери без плазмы (ответ автора 29.10.2026). Потери Y (*_STAT_Y, FILE_Y — уже нормированная сеточная проводимость) и sigma (*_STAT_S, См/м) действуют и в узлах без плазмы N — это среда с потерями, так задумано. Модель плазмы — без столкновений.

5.7.3. Потери: *_STAT_Y и *_STAT_S

Блок Что задаётся Как действует
RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y Y — сеточная величина потерь Работают как раньше. Связь с проводимостью: σ = Y·ε₀/(2·dT), где dT — шаг по времени, он зависит от DELTA. Поэтому при вдвое меньшем DELTA то же Y даёт вдвое большее затухание
RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S (с 26.10.2026) σ — проводимость, См/м Ядро пересчитывает σ в сеточные потери: Y = 2·dT·σ/ε₀. Одно и то же σ даёт одно и то же затухание на любой сетке

Формат *_STAT_S — как у *_STAT_Y, только значение — σ в См/м:

RECT_STAT_S <σ>; <X_min>; <X_max>; <Y_min>; <Y_max>;
CIRCLE_STAT_S <σ>; <R_min>; <R_max>; <F_min>; <F_max>;
POLYGON_STAT_S <σ>;
    L <expression>; <expression>;
    …

Проверка: слой σ = 0,1 См/м на частоте 72 ГГц даёт |T| = 0,347 при DELTA 0,2 мм и |T| = 0,349 при DELTA 0,1 мм; теоретическое значение — 0,355.

5.7.4. Плазма из файла: FILE_N, FILE_B, FILE_Y

Распределение N, B или Y можно, как и распределение ε (раздел 5.6), один раз рассчитать, сохранить в файл и затем читать из файла (с 26.10.2026; раньше FILE_N, FILE_B, FILE_Y не работали: давали ошибку или значения молча уходили в ε).

  1. Записать файл — блок с префиксом имени файла в квадратных скобках:

    RECT_STAT_N [имя]<выражение>; <X_min>; <X_max>; <Y_min>; <Y_max>;
    

    Так же — RECT_STAT_B [имя]… и RECT_STAT_Y [имя]…. 2. Прочитать файл — блок FILE_N имя; (FILE_B имя;, FILE_Y имя;) с теми же границами прямоугольника, что и у записавшего его блока:

    FILE_N <имя>; <X_min>; <X_max>; <Y_min>; <Y_max>;
    

Правила:

  • FILE_N принимает файл, записанный блоком RECT_STAT_N, или обычный файл RECT_STAT; так же FILE_B и FILE_Y — файлы своих величин или обычный файл RECT_STAT;
  • файл другой величины (например, файл N в блоке FILE_B) — ошибка с указанием причины (bad type of the file {…} for block … : it holds {…}, the block needs {…} or {…});
  • расширение и папка — как у файла ε (раздел 5.6);
  • в H-ядре этих примитивов нет.

5.7.5. Подмагниченная плазма (исправлено 26.10.2026)

Расчёт плазмы в магнитном поле B исправлен: знак коэффициента узла «плазма в поле B» приведён к формуле (5.49) учебного пособия. Раньше поле B только ослабляло плазму, и у необыкновенной волны не было окон непрозрачности. Теперь непрозрачные области совпадают с теорией холодной плазмы, например:

  • 72 ГГц, N = 2·10¹⁹ м⁻³, B = 1,8…2,1 Тл;
  • 52 ГГц при B = 1 Тл.

При B = 0 результат прежний. Значения N и B, записанные в файл топологии .tt (для FieldView), восстанавливаются верно.

Также в коде определены примитивы подвижных блоков — RECT_MOVE, CIRCLE_MOVE, POLYGON_MOVE.


#LINK_LIST
    T <n>; <X0>; <Y0>;
    . . .
#END_LINK

Секция служит для указания геометрического положения всех блоков внутри «коробки». Устройство, «разбитое» на блоки в #TOPOLOGY, здесь собирается из них — то есть выполняется процедура рекомпозиции (объединения) базовых элементов.

Строка T <n>; <X0>; <Y0>; означает: начало координат блока <n> поместить в точку «коробки» с абсциссой <X0> и ординатой <Y0>.

Секция обязательна, и каждому блоку из #TOPOLOGY должна соответствовать ровно одна строка.

Правила наложения блоков:

  1. Блоки могут накладываться друг на друга и пересекаться.
  2. Недопустимо пересечение входов (INPUT_X, INPUT_Y). Входы должны находиться на границе коробки.
  3. Если накладываются два или более блока с распределением ε, итоговая добавка в области наложения равна сумме добавок от каждого блока.
  4. Области METAL, MAGNETIC, ABSORBER могут накладываться на области, заполненные диэлектриком.
  5. При пересечении между собой металла, магнетика и поглотителя приоритет определяется порядком следования блоков в секции топологии.
  6. В узлах на границе блока его значение ополовинивается, в углу — делится на четыре (для ε, N, B, Y, σ; раздел 5.7.1).
  7. Части блока, выходящие за границы «коробки», отбрасываются (с 26.10.2026). Раньше они прижимались к крайнему столбцу узлов и деформировали блок.

7. Секция выходных данных #OUTPUT

#OUTPUT
    . . .
#END_OUTPUT

Обязательным является только имя файла выходного сигнала (FILE).

7.1. FILE — имя файла сигналов (обязательно, первым)

FILE <file_name>;

Задаёт имя файла, в который записываются падающие и отражённые волны для каждого временно́го дискрета. Файл получает расширение .t и записывается в директорию файла задания.

Строка обязательна и должна быть первой в секции. Имя не должно содержать точку — код проверяет это явно и выдаёт ошибку Unresolved simbol '.' in filename.

От этого имени строятся все остальные выходные файлы шага (см. раздел 8).

7.2. TOPOLOGY — вывод геометрии

TOPOLOGY;

Необязательна. Если отсутствует — файл геометрии не формируется. Файл получает расширение .tt.

При включении вывода полей (FIELDS) необходимо включить и TOPOLOGY — иначе FieldView не сможет показать картину.

7.3. FIELDS — вывод распределения полей

FIELDS;

Необязательна. Включает вывод распределения интенсивности поля.

Существенно замедляет анализ. При проведении серии расчётов этот флаг лучше выключить.

Если включён режим вывода полей и установлен флаг синхронизации, счётное ядро не будет просчитывать следующий временно́й такт, пока FieldView не прорисует текущее распределение полей.

В файл записывается распределение поля для одного временно́го такта (текущего). Это важно, если вы обрабатываете файл сторонними программами.

7.4. SMATRIX — вывод матрицы рассеяния

SMATRIX <Sfile>; <expression>; <T_min>; <T_max>;
SMATRIX <Sfile>; <expression>;                     ! только в многочастотном режиме
№ Параметр Смысл
1 Sfile Имя файла S-матрицы (получит расширение .s)
2 expression Частота, под которой записывается точка. В одночастотном режиме обязана равняться FREQ шага
3 T_min Начало окна, по которому вычисляется результат. В одночастотном режиме окно обязательно
4 T_max Конец окна

Матрица рассеяния вычисляется по временно́му окну T_min … T_max. В одночастотном режиме окно ставят с момента установившегося режима переходного процесса. Элемент S-матрицы — отношение рассеянной волны к падающей волне Up возбуждённого входа, S = Uo/Up (раздел 5.5).

Пример: SMATRIX test1; 10; 4; 5; — записать S-матрицу для частоты 10 ГГц (при FREQ 10;) по окну с 4 по 5 нс.

Частота SMATRIX = FREQ (с 26.10.2026). Если в одночастотном режиме частота в строке SMATRIX отличается от FREQ шага, это ошибка разбора шага с подсказкой SMATRIX name; <FREQ>; Tmin; Tmax;. Раньше S молча считалась на частоте FREQ, а в .s подписывалась частотой из SMATRIX. Без окна T_min; T_max; строка в одночастотном режиме — тоже ошибка разбора. Например, samples/SAMPLE_R/STATIKA/TEST0.TPL (FREQ 0.0001 ГГц, SMATRIX на 10 ГГц) теперь даёт эту ошибку.

Многочастотный режим (вход с файлом сигнала [имя], см. Многочастотный расчёт):

  • частота в SMATRIX с FREQ не сверяется — частоты берутся из сигнала;
  • окно T_min … T_max учитывается (с 26.10.2026);
  • запись SMATRIX имя; F; без окна означает полное окно 0 … T_max задания — это вариант по умолчанию для многочастотного режима;
  • если отклик импульса к концу окна не затух (в последних 5 % окна больше 1 % пика) или окно начинается, когда падающий импульс ещё идёт, ядро выдаёт предупреждение (консоль, строка состояния). S-матрица при этом записывается.

Ошибка на шаге не обрывает свип (с 26.10.2026). Если шаг закончился ошибкой, в .s на его частоте записывается S-матрица из нулей, в консоль и строку состояния выводится сообщение Error at step N (f): …, и расчёт идёт дальше. В конце — код возврата 2 и список шагов с ошибками. В многочастотном режиме нули записываются только на частотах с ошибкой (например, на частоте ниже отсечки порта), остальные частоты считаются. Значение S, не являющееся числом (NaN или Inf — расходящееся поле), — ошибка, а не NaN в файле.

Одна точка на шаг. В одночастотном режиме каждый #STEP даёт одну частотную точку в .s. Чтобы получить частотную характеристику, нужен свип — много шагов с разными FREQ, пишущих в один и тот же Sfile (см. раздел 10), либо многочастотный расчёт. Если сделать SMATRIX на одной частоте, в .s будет одна точка и кривая в TMCGROUT не нарисуется — это не ошибка программы.

7.5. FIELD_DISTRIBUTION и FIELD_DISTRIBUTION_M

FIELD_DISTRIBUTION <file_name>; <freq>; <T_min>; <T_max>;
FIELD_DISTRIBUTION_M <file_name>; <freq>; <T_min>; <T_max>;

Расширение, которого нет в руководстве 2000 года. Определены в src/Include/TmcRTH_IndanOutput.h (строки 14–15), разбираются в src/libs/TMCIndan/TmcRTH_IndanOutput.cpp. Сохраняют комплексное распределение поля на заданной частоте (амплитуда → .AMP, фаза → .FAZ; по ним строится файл излучателей ДН .DAT). FIELD_DISTRIBUTION_M — вариант с накоплением в памяти (ReadFileDistrInMemory).

Используется, например, в samples/SAMPLE_R/1/TEST.TPL.

Окно диаграммы направленности (параметры 3 и 4 — окно времени, на котором накапливается распределение поля):

  • длина окна округляется вверх до целого числа периодов частоты. Если число периодов уже целое, лишний период не добавляется (с 26.10.2026; раньше добавлялся ещё один период, и окно могло уйти за конец времени анализа TIME);
  • окно должно кончаться раньше TIME. Окно, кончающееся ровно на TIME, не закрывается — файлов диаграммы направленности нет, выводится сообщение об ошибке, код возврата 2.

Контур интегрирования ДН стоит на 10 шагов сетки от X_MIN и Y_MIN и на 8 шагов от X_MAX и Y_MAX (асимметрия — из-за запасного столбца, раздел 4.7). На ДН эта асимметрия не влияет: контур — решётка, каждая его сторона излучает в свою полуплоскость (элемент Гюйгенса: Ez — электрический вибратор, Hx, Hy — магнитный ток). Ключа для задания контура в #OUTPUT нет.


8. Какие файлы создаёт ядро

Имена строятся от базового имени из FILE в секции #OUTPUT. Список проверен по коду (src/libs/TMCIndan/TmcRTH_IndanOutput.cpp, строки 194–204):

Расширение Содержимое Чем смотреть
.t Временны́е сигналы на входах (падающие и отражённые волны) TMCROS
.s Матрица рассеяния TMCGROUT
.tt Топология устройства FieldView
.ex Поле на каждом шаге вывода (FIELDS): в ядре H — Ez, в ядре X — Hz (узел X-схемы хранит Hz) FieldView
.AMP, .FAZ Амплитуда и фаза распределения поля на частоте ДН (FIELD_DISTRIBUTION, FIELD_DISTRIBUTION_M) FieldView
.DAT Излучатели контура ДН (при многочастотной ДН — <имя>_<частота>MHz.DAT на каждый тон) TMC_DN
.eps Сохранённое распределение ε (из RECT_STAT [file_name]), а в X-ядре — также N, B или Y (из RECT_STAT_N/_B/_Y [file_name]) вход/выход ядра

FieldView открывает форматы *.tf, *.AMP, *.FAZ, *.ex (строка IDR_FLDVIETYPE в ресурсах). Расширение .tf — историческое (версия 2.0p); текущий код его не пишет.

Проверено по коду 29.10.2026 (libs/tmcindan/tmcrth_indanoutput.cpp): имена .ey, .hz, .em, .ef, .q, .ix, .iy ядро составляет, но ни одно из них не открывает и не пишет — это остатки прежних версий. Раньше они были перечислены в этой таблице ошибочно.


9. Препроцессор входного языка

Препроцессор работает непосредственно до ввода данных и позволяет делать макроопределения и макроподстановки, включать содержимое других файлов и записывать данные математическими выражениями. Функции аналогичны препроцессорам C и FORTRAN.

Прежде всего он необходим, чтобы структурировать и параметризировать входные данные — это позволяет избежать ошибок при вводе и модификации.

9.1. Математические выражения

Любые числовые параметры могут быть записаны выражениями. Выражения могут содержать целые и вещественные числа, имена макроопределений, круглые скобки, знаки операций и функции.

Арифметические операции:

Знак Операция
+ сложение
- вычитание
* умножение
/ деление
^ возведение в степень

Математические функции:

Функция Смысл Функция Смысл
abs(x) модуль sin(x) синус
exp(x) экспонента cos(x) косинус
log(x) натуральный логарифм tan(x) тангенс
log10(x) десятичный логарифм sinh(x) синус гиперболический
sqrt(x) корень квадратный cosh(x) косинус гиперболический
asin(x) арксинус tanh(x) тангенс гиперболический
acos(x) арккосинус atan(x) арктангенс

Аргументы тригонометрических функций — в градусах или радианах, в зависимости от ANGLE_UNIT.

Приоритет операций в руководстве 2000 года описан так: «возведение в степень, деление, умножение, вычитание и суммирование». Обратите внимание, что деление указано перед умножением, а вычитание — перед сложением, что расходится с общепринятой равноприоритетностью. Не полагайтесь на приоритет — расставляйте скобки явно. Выражение в самых внутренних скобках вычисляется первым.

Числа с порядком и возведение в степень (с 26.10.2026):

Правило Пример Результат
Число с порядком пишется без скобок, в том числе перед операцией 1.24e+17*(…), 0.5e-1*2 вычисляется как обычно
Порядок без знака — то же, что с плюсом 1e18 1·10¹⁸
Степень правоассоциативна: a^b^c = a^(b^c) 2^3^2 512 (а не 64)
Отрицательное основание с целым показателем (-2)^3, (x-5)^2 −8; квадрат разности
Основание ≤ 0 с дробным показателем (-2)^0.5 ошибка
0^0 0^0 ошибка

Точность координат и времени. Координаты x, y и время t передаются в формулы с полной точностью (с 26.10.2026). Раньше они передавались с 6 значащими цифрами, и на больших координатах (например, x ≈ 100 000 мм) формула ε(x) становилась ступенчатой.

Переменные координат. Когда задаётся распределение добавки ε, выражение может содержать:

Переменная Смысл Единица
x, y декартовы координаты LONG_UNIT
r полярный радиус LONG_UNIT
f полярный угол ANGLE_UNIT

Программа сама подставляет значения этих переменных для точек плоскости.

Переменные входов. В параметрах Amplitude и Faza примитивов INPUT_X / INPUT_Y доступны переменные t (текущее время) и f (частота) — см. раздел 5.5. В параметре 8 (Eps, поле W) переменные t и f недопустимы — это ошибка разбора.

Обратите внимание: f означает полярный угол в выражениях для ε, но частоту в выражениях амплитуды и фазы входа.

9.2. Макроопределения #define

#define <имя>  [par1; par2; ... ; par32;] @ text1(par1 - par32)\\
                                            text2(par1 - par32)\\
                                            text3(par1 - par32)
Элемент Смысл
#define признак начала макроопределения
<имя> имя макроопределения
[par1; …] формальные параметры (до 32, необязательны)
@ разделительный знак
textN замещающий текст
\\ символ переноса строк текста

Правила именования. Имя отделяется с двух сторон пробелами, может содержать до 32 символов из множества: латинские буквы A-Z, a-z, цифры 0-9, символ подчёркивания _. Все макроопределения в одном задании должны иметь уникальные имена.

Замещающий текст отделяется от имени (или параметров) пробелом, знаком @ и ещё одним пробелом. Если текст содержит несколько строк, в конце всех строк, кроме последней, добавляется пара символов \\. Текст, следующий за \\, считается комментарием и игнорируется.

Все макроопределения необходимо размещать до того места, где они используются.

Главная ловушка: макрос подставляется текстом

#define  Length @ 38+12
#define  Width @ Length/2
 . . .
    RECT_STAT 3; 0; Length; 0; Width;

Результат работы препроцессора:

    RECT_STAT 3; 0; 38+12; 0; 38+12/2;

Длина будет 50, а ширина — 44, а не 25! Потому что 38+12/2 = 38+6 = 44.

Правильно — заключать значение в скобки:

#define  Length @ (38+12)
#define  Width @ Length/2

Тогда Width развернётся в (38+12)/2 = 25. Именно поэтому во всех авторских заданиях макроопределения записаны как #define L1 @ ( 50.00 ) — со скобками.

Макросы с параметрами

#define  Stp  name1; name2; @ name1+name2
#define  Stm  param; @ param*param
. . .
    RECT_STAT 3; 0; (Stm  (Stp 10; 2;);); 0; 40;

Результат:

    RECT_STAT 3; 0; 10+2*10+2; 0; 40;

То есть длина будет 32, а не 144. Так происходит потому, что первая и последняя скобки, в которые заключён фактический параметр, заменяются пробелами.

Если макроопределение, используемое как фактический параметр, имеет свои фактические параметры, его необходимо заключить в скобки.

9.3. Вставка файла #include

#include <file_name>

Вставляет в текст задания содержимое файла <file_name>. Включаемый файл должен находиться в директории входного задания.

Это основной приём структурирования: константы выносят в один .h, описание шага — в другой.

#include parm.h
 . . .
    BLOCK 1;
        RECT_STAT 3; 0; Length; 0; Width;

где parm.h содержит:

#define  Length @ (38+12)
#define  Width @ Length/2

10. Частотный свип: расчёт на нескольких частотах

Для анализа системы на нескольких частотах нужно повторить процедуру на всех интересующих частотах — это делается добавлением новых шагов #STEP. Наиболее удобно использовать при этом макроопределения с параметрами.

Приём автора: весь шаг заворачивается в макрос в отдельном .h-файле, а .tpl состоит из вызовов этого макроса.

Файл STEP1.H — макрос одного шага:

#define step1 Freq__; File__; SFile__; Tmin__; Tmax__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT GHz;\\
 LONG_UNIT mm;\\
 TIME_UNIT ns;\\
 DELTA W_delta;\\
 TIME 0.; 5;\\
 X_MIN  0.0;\\
 X_MAX L1+L2+L3;\\
 Y_MIN  0.0;\\
 Y_MAX W_waveg;\\
 FREQ  Freq__ ;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\
  INPUT_X   W_type ; -a1/2; a1/2; 0; 200;\\
 END_B\\
 BLOCK 7;\\
  INPUT_X    W_type ; -a1/2; a1/2; 200; 201;\\
 END_B\\
 BLOCK 2;\\
  RECT_STAT W_type ; 0.0; L1+L2+L3; -a1/2-2*W_delta; -a1/2-1*W_delta;\\
 END_B\\
 BLOCK 3;\\
  RECT_STAT W_type ; 0.0;L1+L2+L3; a1/2; a1/2+W_delta;\\
 END_B\\
 BLOCK 5;\\
  RECT_STAT [epsil1](W_eps-1); 0;L2; 0.0; W_waveg;\\
 END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
 T 1; 0.0; W_waveg/2;\\
 T 2; 0.0; W_waveg/2;\\
 T 3; 0.0; W_waveg/2;\\
 T 5; L1; 0.0;\\
 T 7; L1+L2+L3; W_waveg/2;\\
#END_LINK\\
#OUTPUT\\
 FILE File__;\\
 SMATRIX SFile__; Freq__; Tmin__; Tmax__;\\
! FIELDS;\\
! TOPOLOGY;\\
#END_OUTPUT\\
#END_STEP\\

Файл задания — свип от 10 до 12 ГГц с шагом 0.1 ГГц:

#TMC_RT_H
#define L1 @ (   50.00)
#define L2 @ (   50.00)
#define L3 @ (   50.00)
#define W_eps @ ( 4.00 )
#define W_waveg @ (  400.00 )
#define W_input @ (  2.00 )
#define W_delta @ (    0.5 )
!#define W_type @ METAL
#define W_type @ MAGNETIC
#define file_S @ test101
#define a1 @ ( W_input )
#include step1.h
step1 10.0; test100; file_S; 4; 5;
step1 10.1; test101; file_S; 4; 5;
step1 10.2; test102; file_S; 4; 5;
…
step1 12.0; test120; file_S; 4; 5;
#EOF

Обратите внимание на приёмы:

  • все шаги пишут S-матрицу в один файл file_S — так и накапливается частотная характеристика;
  • частота в SMATRIX и в FREQ задаётся одним параметром Freq__ — в одночастотном режиме они обязаны совпадать (раздел 7.4);
  • имя файла сигналов у каждого шага своё (test100, test101, …) — иначе шаги затрут файлы друг друга;
  • FIELDS и TOPOLOGY закомментированы символом ! — при свипе вывод полей резко замедляет счёт;
  • RECT_STAT [epsil1](W_eps-1) — распределение ε считается один раз и сохраняется в epsil1.eps;
  • строка !#define W_type @ METAL — закомментированная альтернатива; так хранят запасные варианты.

Ошибка на одном шаге не обрывает свип (с 26.10.2026). На частоте шага с ошибкой в .s записываются нули (вся S-матрица), остальные шаги считаются; в конце — код возврата 2 и список шагов с ошибками (раздел 7.4).

Ожидаемое расхождение с аналитикой. Частотная зависимость, рассчитанная на сетке, сдвигается относительно точного аналитического решения, потому что длина волны в сетке отличается от точного значения. Программа выводит эту погрешность в окне статистики, и сдвиг ей соответствует. Это свойство метода, а не ошибка.


11. Развёрнутый пример: рассеяние на неоднородном цилиндре

Задание находится в samples/SAMPLE_R/METAL/CIRCLE/RUPOR.TPL.

Система из трёх рупоров
Система из трёх рупоров

Рис. 6.1. Система из трёх рупоров для изучения рассеяния на неоднородном диэлектрическом цилиндре радиусом 250 мм. Проницаемость цилиндра зависит от радиуса: на границе равна 1, в центре −5.

Центральный рупор излучает сигнал, два боковых — приёмные.

Ключевые места задания:

#define W_eps @ ( -4 + 4*r/(W_waveg/2)+1 )
…
 BLOCK 104;
  CIRCLE_STAT (W_eps-1); 0; W_waveg/2; 0; 2*3.1415;
 END_B
…
 BLOCK 8;
  RECT_STAT ABSORBER; L_waveg-5*W_delta; L_waveg - 1*W_delta+0.00; 0.0; W_waveg-2*W_delta;
 END_B

Здесь:

  • W_eps — функция от полярного радиуса r: на границе (r = W_waveg/2) даёт 1, в центре (r = 0) даёт −4 + 1 = −3;
  • в блок передаётся (W_eps-1) — снова добавка;
  • блоки 8, 9, 10 — поглотители по краям коробки, чтобы волна не отражалась от стенок. Обратите внимание, как их границы отступают от границ коробки на несколько W_delta — это выполнение требования из раздела 5.2;
  • рупоры собраны из RECT_STAT METAL (стенки) и POLYGON_STAT METAL (раскрывы), причём одна и та же группа блоков повторена трижды с разными номерами и размещена в #LINK_LIST на разных высотах (W_waveg/2, W_waveg/4, 3*W_waveg/4).
Распределение ε
Распределение ε

Рис. 6.2. Распределение диэлектрической проницаемости, как его показывает FieldView.


12. Таблица ключевых слов

Обозначения: expression — математическое выражение; expression(x,y,r,f) — выражение от декартовых или полярных координат; n — целое число; < > — обязательный параметр; [ ] — необязательный.

Ключевое слово Формат Назначение
#TMC_RT_H Начало файла задания
#STEP Начало шага задания
#PARM Начало секции параметров
ANGLE_UNIT <radian> \| <gradus>; Единицы измерения углов
FREQ_UNIT <GHz> \| <MHz> \| <kHz> \| <Hz>; Единицы измерения частоты
LONG_UNIT <mm> \| <cm> \| <m>; Единицы измерения длины (только геометрия)
TIME_UNIT <s> \| <ms> \| <mks> \| <ns> \| <ps>; Единицы измерения времени
DELTA <expression>; Точность анализа — размер пространственного дискрета
TIME <expression>; <expression>; Время анализа T_min; T_max
X_MIN <expression>; Абсцисса левого края «коробки»
X_MAX <expression>; Абсцисса правого края «коробки»
Y_MIN <expression>; Ордината нижнего края «коробки»
Y_MAX <expression>; Ордината верхнего края «коробки»
FREQ <expression>; Частота сигналов возбуждения
HEIGHT <expression>; Разбирается, на расчёт не влияет (раздел 4.9)
DELTA_T_MECHANICAL <expression>; Разбирается, на расчёт не влияет (раздел 4.9)
N_UNIT <m3>; Единица концентрации N: допустимо только m3 (м^-3), другая — ошибка (раздел 4.10)
B_UNIT <Tl>; Единица индукции B: допустимо только Tl (Тл), другая — ошибка (раздел 4.10)
#END_PARM Конец секции параметров
#TOPOLOGY Начало секции геометрии
BLOCK <n>; Начало блока, n > 0
RECT_STAT [[file_name]]<METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; <X_min>; <X_max>; <Y_min>; <Y_max>; Неподвижный прямоугольник
CIRCLE_STAT <METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; <R_min>; <R_max>; <F_min>; <F_max>; Неподвижный сектор (полный круг — F_max до 2π + 10⁻¹²)
POLYGON_STAT <METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; Неподвижный многоугольник (с материалом — ломаная)
L <expression>; <expression>; Точка многоугольника X0; Y0;
INPUT_X [<METAL> \| <MAGNETIC>]; <Y_min>; <Y_max>; <T_min>; <T_max>; [<Amp>]; [<Faza>]; [<Eps>]; Вход вдоль оси Y (на левой/правой границе)
INPUT_Y [<METAL> \| <MAGNETIC>]; <X_min>; <X_max>; <T_min>; <T_max>; [<Amp>]; [<Faza>]; [<Eps>]; Вход вдоль оси X (на нижней/верхней границе)
FILE <file_name>; <X_min>; <X_max>; <Y_min>; <Y_max>; Чтение распределения ε из файла (только прямоугольник)
RECT_STAT_N, CIRCLE_STAT_N, POLYGON_STAT_N, FILE_N как у базового примитива Концентрация плазмы N, м⁻³ (X-мода)
RECT_STAT_B, CIRCLE_STAT_B, POLYGON_STAT_B, FILE_B как у базового примитива Индукция B, Тесла (X-мода)
RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y как у базового примитива Сеточные потери Y (X-мода)
RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S как у *_STAT_Y, значение — σ Проводимость σ, См/м (X-мода)
RECT_MOVE, CIRCLE_MOVE, POLYGON_MOVE не документировано Подвижные блоки
END_B Конец блока
#END_TOPOLOGY Конец секции геометрии
#LINK_LIST Начало секции графа связей
T <n>; <expression>; <expression>; Поместить начало координат блока n в точку X0; Y0;
#END_LINK Конец секции графа связей
#OUTPUT Начало секции выходных данных
FILE <file_name>; Сигналы на входах → file_name.t (обязательно, первым)
TOPOLOGY Вывод топологии → file_name.tt
FIELDS Вывод распределения полей
SMATRIX <Sfile>; <expression>; <T_min>; <T_max>; S-матрица → Sfile.s. В одночастотном режиме частота = FREQ, окно обязательно; в многочастотном окно можно опустить
FIELD_DISTRIBUTION <file_name>; <freq>; <expression>; <expression>; Комплексное распределение поля
FIELD_DISTRIBUTION_M <file_name>; <freq>; <expression>; <expression>; То же, с накоплением в памяти
#END_OUTPUT Конец секции выходных данных
#END_STEP Конец шага задания
#EOF Конец входного задания
#define <имя> [par1; …] @ <текст> Макроопределение (препроцессор)
#include <file_name> Вставка файла (препроцессор)
! Комментарий (до конца строки)

13. Типичные ошибки

Симптом Причина
Ширина/длина блока «не та» Макрос без скобок: #define L @ 38+12 вместо #define L @ (38+12). См. 9.2
Ошибка «Missing file name» / Unresolved simbol '.' Имя в FILE пустое или содержит точку. См. 7.1
Пустой .s, «Error when read» в TMCGROUT SMATRIX задан на одной частоте (одна точка — кривая не строится) либо окно T_min…T_max вне интервала сигнала. См. 7.4
Ошибка разбора шага со строкой SMATRIX В одночастотном режиме частота SMATRIX не равна FREQ шага либо не задано окно T_min; T_max;. См. 7.4
Ошибка {FREQ_UNIT MHz;}: the unit is written after its value ... Строка единицы стоит ниже своей величины в той же секции #PARM (с 29.10.2026 — ошибка). Сначала единицы, потом значения. См. раздел 4
Ошибка Section #PARM: missing X_MAX. Every step is an independent task: ... или Missing section #PARM in 2 step ... В шаге не задан обязательный параметр (X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ) или нет секции #PARM. Каждый шаг — независимая задача: допишите параметры. См. раздел 4
Ошибка the kernel calculates N only in m^-3 ... В N_UNIT или B_UNIT задана единица, кроме m3 и Tl. См. 4.10
Предупреждение WARNING: N absorber nodes are in a medium where the wave does not propagate ... Поглотитель стоит в среде, где волна не распространяется (плотная плазма, eps < 0), и там не поглощает. Вынесите поглотитель из этой среды. См. 5.1
Плоская волна между стенками MAGNETIC: пустой канал заметно отражает Стенки расставлены не по образцу TEST025.TPL или «заползают» на порт. См. 5.5
FieldView ничего не показывает Включён FIELDS, но не включён TOPOLOGY. См. 7.2
Расчёт идёт очень долго Слишком мелкий DELTA (время растёт как куб) либо включён FIELDS при свипе. См. 4.5, 10
Неверный результат у POLYGON_STAT с ε Область невыпукла или вершины обойдены против часовой стрелки — не диагностируется. См. 5.4
Металлический многоугольник «не замкнут», волна затекает внутрь POLYGON_STAT METAL — ломаная, сама не замыкается (так задумано). Повторите первую вершину последней. См. 5.4
Частотная характеристика сдвинута относительно аналитики Свойство метода (длина волны в сетке). Погрешность выводится в окне статистики. См. 10
Блок не появился в расчёте Для блока нет строки T в #LINK_LIST. См. 6
Ложный резонансный слой на краю плазмы Блоки B и N совпадают — на границе действует B/2. Сделайте блок B шире плазмы. См. 5.7.1
Предупреждение WARNING: … positive addition of epsilon and the plasma N …; расчёт расходится В одних узлах заданы и положительная добавка ε, и плазма N. Разнесите диэлектрик и плазму по разным узлам. См. 5.7.2
Ошибка bad type of the file … for block … В блок FILE_N/FILE_B/FILE_Y подан файл другой величины. См. 5.7.4
Ошибка «Unknow type block» в H-ядре Блоки *_STAT_S, FILE_N/_B/_Y есть только в X-ядре. Откройте задание в PlanarRT X. См. 5.7
Нет файлов диаграммы направленности, ошибка, код 2 Окно FIELD_DISTRIBUTION кончается на TIME или позже. Окно должно кончаться раньше TIME. См. 7.5
В .s на одной из частот свипа — нули На этом шаге произошла ошибка (сообщение Error at step N (f): …); остальные частоты посчитаны. См. 7.4

14. Источники

Документ восстановлен по авторским материалам из архива Tamic\data Tamic\ и сверен с исходным кодом TMC Suite.

Использовано:

Документ Что взято
TMC\DISTR\MANUALS\RT_HPLANAR\rt_hplanar.doc (2.6 МБ, 2000) Основной источник. Полное описание входного языка, методика составления задания, все рисунки примитивов, примеры
TMC\DISTR\MANUALS\RT_HPLANAR\FormEps.doc (1999) Формат распределения ε
TMC\DISTR\TMC_I\TMC\DOC_SRC\S_FILE.DOC (1992) Формат S-файла (см. docs/api/libs/sfile95.md)

Рисунки извлечены из rt_hplanar.doc (векторные WMF → PNG) и лежат в docs/screenshots/tpl/.

Проверено и отклонено как не относящееся к TMC Suite:

Документ Почему не подошёл
TMC\DISTR\MANUALS\TAMICE_H.DOC (898 КБ, 1999) Отчёт о НИР по родственному продукту TAMIC-E/H. Другой входной язык: #PARMS, FRQS, TOLERANCE, WIDTH, GRAPH_K. Полезен как объяснение разнобоя #PARM/#PARMS (раздел 4)
TMC\DISTR\EMSTAR\MANUAL.DOC Продукт EMSTAR — планарный ЭМ-симулятор со своим языком (LAYER, MEDIA, PORT, EMFRQS). К TMC Rt отношения не имеет
TMC\DISTR\MANUALS\{E2R,H2R,I1R,I2E,I2R,M2E,M2R,W2R}\*.DOC Руководства других анализаторов семейства TAMIC

15. Связанные документы

  • docs/user-manual/planar_rt_h.md — руководство пользователя ядра H
  • docs/user-manual/planar_rt_x.md — руководство пользователя ядра X
  • docs/user-manual/multifreq.md — многочастотный расчёт
  • docs/user-manual/fieldview.md — просмотр полей и топологии
  • docs/user-manual/tmcros.md — просмотр сигналов .t
  • docs/user-manual/tmcgrout.md — просмотр S-матриц .s
  • docs/user-manual/changelog.md — история изменений
  • docs/api/libs/prepr.md — API препроцессора
  • docs/api/libs/tmcindan.md — API разбора входного языка
  • ISSUES.md — известные дефекты

The .tpl task file: how to create it. Complete reference of the input language

Applies to the compute kernels PlanarRT_H (tmc_rth.exe) and PlanarRT_X (tmc_rtx.exe).

The document has been reconstructed from the author's manual “TAMIC-Rt H. A program for electrodynamic analysis of planar structures with inhomogeneous dielectric filling in the H plane, version 2.0p” (TAMIC_soft group, 2000) and checked against the current source code of TMC Suite. Places where the present code differs from the 2000 manual are marked explicitly; in case of a discrepancy, the code is considered correct.

Changes to the language and kernels from the fixes of 26.10.2026 (version 5.1, see Changelog) have been made in the corresponding sections and are marked with the words “since 26.10.2026”.

The fixes of 29.10.2026 (based on the author's answers) have been made in the same way and are marked with the words “since 29.10.2026”.


1. What a task file is

The input data of a compute kernel is the geometry of the device being analysed, which is described in a text task file with the .tpl extension. The kernel reads the .tpl, performs the computation and outputs the results as files of several types, which are then viewed with the viewers of the package.

Block diagram of the package
Block diagram of the package

Block diagram of the package (Fig. 2.1 of the author's manual).

Discrepancy with the figure. In the 2000 diagram the field file is labelled File.ft, while the text of the same manual says File.tf. In the current code the field is written to the .ex file (in the X kernel it holds Hz), and the field distribution for the RP to .AMP / .FAZ (see section 8). The .tf extension remains only in the list of formats FieldView can open.

This separation (computation separately, viewing separately) makes the system more flexible and minimizes the demands on the computer's resources during a computation.


2. General structure of a task file

Each line of the file begins with a unique descriptor that determines the data following it.

A task file always begins with the line #TMC_RT_H and ends with the line #EOF.

The whole task is divided into steps. Each step may describe an independent microwave device or a part of it; a step begins with the line #STEP and ends with #END_STEP:

#TMC_RT_H          Beginning of the task file
#STEP              This is the first step
   Data for the first problem
#END_STEP
#STEP              This is the second step
   Data for the second problem
#END_STEP
#EOF               End of the task file

The #TMC_RT_H signature is common to both kernels. The X kernel (tmc_rtx.exe) reads files with the same first line #TMC_RT_H; there is no separate #TMC_RT_X signature in the code.

Each step consists of four sections, which are recommended to be placed in this order:

Section Purpose Mandatory?
#PARM … #END_PARM Units of measurement, grid step, time, “box” bounds, frequency Yes, in every step (since 29.10.2026)
#TOPOLOGY … #END_TOPOLOGY The blocks (graphic primitives) of which the device consists Yes
#LINK_LIST … #END_LINK The geometric position of each block in the “box” Yes
#OUTPUT … #END_OUTPUT Which output files to produce Yes (at least FILE is needed)

Each step is an independent problem (since 29.10.2026). The parameter section is mandatory in every step, and X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ are mandatory in it (section 4). Previously the section or individual parameters could be omitted; the missing parameters were silently taken from the previous step.

2.1. Syntax

  • All statements that contain the # character must begin at the first position of the line.
  • All other statements must have at least one space at the first position of the line.
  • A comment is any line or part of a line beginning with the ! character.
  • Empty lines and lines consisting only of spaces are allowed.
  • Parameters are separated from the line identifier by at least one space, and from each other by the ; character.

The formal format descriptions below use the following notation:

Notation Meaning
< > mandatory parameter
[ ] optional parameter
expression mathematical expression
expression(x,y,r,f) an expression containing a function of the Cartesian (x,y) or polar (r,f) coordinates
n integer

3. Method: how to compose a task from scratch

This is the very sequence of actions the author used. Let us go through it on a problem from the author's manual: scattering of a plane wave by a plane-parallel plate with ε = 4 at a frequency of 10 GHz.

Step 1. Draw the topology in the H plane

Start with a drawing of the real device in the H plane, with all dimensions.

Initial geometry
Initial geometry

Position of the plane-parallel plate in the H plane (Fig. 3.1). All dimensions are in millimeters.

Step 2. Fit the device into the “box”

The whole device must fit into a rectangle, which is called the “box”. The position of the box is set in the parameter section by the values X_MIN, X_MAX, Y_MIN, Y_MAX.

The boundary of the box is metal or the ports of the device. This is important: the box boundary itself is always metal unless a port stands on it.

Position in the box
Position in the box

Position of the plate in the “box” and the values of the constant expressions to be set (Fig. 3.2).

Note the notation ε⁺ = 3 inside the plate: this is not the permittivity itself but the increment to the permittivity of vacuum. A plate with ε = 4 corresponds to the increment ε⁺ = 3 (see section 5.1).

Step 3. Decompose the geometry into primitives

The resulting geometry is broken down into blocks, the graphic primitives of the input language.

Decomposition
Decomposition

Decomposition of the given geometry using graphic primitives (Fig. 3.3).

For our problem there are five blocks:

Block What it is
Block 1, Block 2 device ports (INPUT_X)
Block 3, Block 4 rectangles with magnetic walls (RECT_STAT MAGNETIC)
Block 5 a rectangle with a given dielectric distribution (RECT_STAT)

Step 4. Choose the grid step Δ

The grid step DELTA determines the accuracy. The selection rules are in section 4.5. In short: roughly 1/20 of the guide wavelength at the maximum frequency of the range gives an accuracy of about 3 %.

Step 5. Write the task

Each block is described in the #TOPOLOGY section in its own local coordinate system and then placed in the box by a T line in the #LINK_LIST section.

The full text of the task (file samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL, given as in the author's manual; the file in the repository has changed since then, see the note below):

#TMC_RT_H
#define L1 @ (   50.00)
#define L2 @ (   50.00)
#define L3 @ (   50.00)
#define W_freq @ (  10 )
#define W_eps @ ( 4.00 )
#define W_waveg @ (  6.00 )
#define W_input @ (  2.00 )
#define W_delta @ (    0.5 )
#define W_type @ MAGNETIC
#define a1 @ ( W_input )
#STEP
#PARM
 ANGLE_UNIT radian;
 FREQ_UNIT GHz;
 LONG_UNIT mm;
 TIME_UNIT ns;
 DELTA W_delta;
 TIME 0.; 5;
 X_MIN  0.0;
 X_MAX L1+L2+L3;
 Y_MIN  0.0;
 Y_MAX W_waveg;
 FREQ  10;
#END_PARM
#TOPOLOGY
 BLOCK 1;
  INPUT_X   W_type ; -a1/2; a1/2; 0; 200;
 END_B
 BLOCK 2;
  INPUT_X    W_type ; -a1/2; a1/2; 200; 201;
 END_B
 BLOCK 3;
  RECT_STAT W_type ; 0.0; L1+L2+L3; -a1/2-2*W_delta; -a1/2-1*W_delta;
 END_B
 BLOCK 4;
  RECT_STAT W_type ; 0.0;L1+L2+L3; a1/2; a1/2+W_delta;
 END_B
 BLOCK 5;
  RECT_STAT (W_eps-1); 0;L2; 0.0; W_waveg;
 END_B
#END_TOPOLOGY
#LINK_LIST
 T 1; 0.0; W_waveg/2;
 T 2; L1+L2+L3; W_waveg/2;
 T 3; 0.0; W_waveg/2;
 T 4; 0.0; W_waveg/2;
 T 5; L1; 0.0;
#END_LINK
#OUTPUT
 FILE test1;
 SMATRIX test1; 10; 4; 5;
 FIELDS;
 TOPOLOGY;
#END_OUTPUT
#END_STEP
#EOF

Key points:

  • #define W_eps @ ( 4.00 ): the plate permittivity ε = 4;
  • RECT_STAT (W_eps-1); …: the block receives the increment ε⁺ = ε − 1 = 3. Hence the -1;
  • INPUT_X W_type; -a1/2; a1/2; 0; 200;: a port of width a1, an RF pulse from 0 to 200 ns;
  • the second port (Block 2) has T_min = 200, which is greater than the analysis time (TIME 0.; 5;); this is how a port is set that has no incident wave and only receives;
  • SMATRIX test1; 10; 4; 5;: write the S-matrix for the frequency of 10 GHz, averaged from 4 to 5 ns. The frequency in SMATRIX matches FREQ 10;; in single-frequency mode this is mandatory (section 7.4).

The file in the repository differs from the manual. In samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL since 2000 the values have been changed to L1=100, L2=600, L3=100, W_eps=-0.01, W_delta=0.1, TIME 0.; 200;, and the first port has acquired additional parameters (… 0; 200; 1.; ;, the amplitude and phase, see section 6.4). The text above is from the manual; it shows the original intent.

Step 6. Check and run

  1. Open the .tpl in the kernel (File → Open).
  2. Parsing errors are reported with the line number; the language is checked strictly.
  3. Start the computation and look at the results with the viewers (section 8).

4. The parameter section #PARM

#PARM
    . . .
#END_PARM

#PARM or #PARMS? In the author's 2000 manual the “Input format” subsections of items 4.1.x are written with #PARMS / #END_PARMS (11 places), while all real examples and the table of contents use #PARM / #END_PARM. This is a trace of the related product TAMIC-E/H, where the section really is called #PARMS.

Both variants work. The canonical names in the code are #PARM and #END_PARM (src/Include/TmcRTH_Indan.h, line 23), but sections are searched by prefix comparison (strncmp(csCh, csSection, csSection.GetLength()) in TmcRTH_Indan.cpp, lines 435 and 460), so #PARMS and #END_PARMS match as well. Writing #PARM / #END_PARM is recommended.

The units of angles, frequency, length and time must be set before the frequencies and parameters with the dimension of length and time are defined.

Order of lines in #PARM. The unit lines come first (ANGLE_UNIT, FREQ_UNIT, LONG_UNIT, TIME_UNIT), and only then the values (DELTA, TIME, X_MIN … Y_MAX, FREQ). A value is converted to units at the moment its line is read; a unit line acts only on the lines below it.

A unit line standing in the same #PARM section below its value is a parsing error (since 29.10.2026). Example message:

{FREQ_UNIT MHz;}: the unit is written after its value (FREQ ) in the section #PARM. A unit acts only on the lines below it - move the line of the unit above the values

For each unit line its own values are checked:

Unit line Values
FREQ_UNIT FREQ
LONG_UNIT X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, HEIGHT
TIME_UNIT TIME, DELTA_T

Previously such a unit line silently did not act on the value: for example, FREQ 7.2; written above FREQ_UNIT MHz; was taken as 7.2 GHz. TPL Designer always writes the unit lines first.

#PARM
 ANGLE_UNIT radian;     ! first, all units
 FREQ_UNIT GHz;
 LONG_UNIT mm;
 TIME_UNIT ns;
 DELTA 0.5;             ! then the values: 0.5 mm
 TIME 0.; 5;            ! 0…5 ns
 . . .
#END_PARM

Mandatory step parameters (since 29.10.2026). Each #STEP is an independent problem: the #PARM section is mandatory in every step, and X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ are mandatory in it. If even one of them is not set, it is a parsing error, for example:

Section #PARM: missing X_MAX. Every step is an independent task: ...

A step without a #PARM section gives the error Missing section #PARM in 2 step .... Previously the missing parameters were silently taken from the previous step.

The unit lines (ANGLE_UNIT, FREQ_UNIT, LONG_UNIT, TIME_UNIT) are not mandatory and, as before, act until the next line of the same unit, including in subsequent steps.

Example tasks. In 23 tasks of samples\SAMPLE_R and in two regression tasks the missing parameters have been added (with the comment ! B-15 (29.10.2026) ...); their results have not changed.

4.1. ANGLE_UNIT: units of angles

ANGLE_UNIT <radian> | <gradus>;

Fixes the unit of the angle arguments of trigonometric functions.

Value Meaning
radian radians
gradus degrees

Default: as in the previous step; if the step is the first, radian.

4.2. FREQ_UNIT: units of frequency

FREQ_UNIT <GHz> | <MHz> | <kHz> | <Hz>;

Entered before the FREQ line. Default in the first step: GHz.

4.3. LONG_UNIT: units of length

LONG_UNIT <mm> | <cm> | <m>;

Entered before the DELTA, X_MIN, X_MAX, Y_MIN, Y_MAX lines. Default in the first step: mm.

Length units apply only to geometry. Plasma and loss quantities are set in fixed units on which LONG_UNIT does not act: the electron density N is always in m⁻³, the flux density B always in teslas, the conductivity σ in S/m (section 4.10).

4.4. TIME_UNIT: units of time

TIME_UNIT <s> | <ms> | <mks> | <ns> | <ps>;

Entered before the TIME line.

According to the author's manual, the default value in the first step is seconds (s), not ns. It is better to set the time unit explicitly.

4.5. DELTA: grid step (analysis accuracy)

DELTA <expression>;

Physical meaning: the size of the spatial discrete, the step of the square grid into which the whole device is divided. This is the main accuracy parameter.

The author's recommendations:

  1. For an accuracy of about 3 % the value should be about 1/20 of the guide wavelength at the maximum frequency of the range. More precisely, it is determined by a series of convergence runs.
  2. As the step is reduced, the analysis time grows as the cube. Therefore the initial tuning of a device is done at low accuracy, which is increased at the final stage.
  3. Choose the step and geometry so that the geometry fits an integer number of discretes. If the metal thickness is 1, 2, 3, 4 mm, take DELTA = 1 mm or 0.5 mm, not 1.02 mm or 0.47 mm.
  4. The run time is minimal if an integer number of discretes fits into the “box” along X and Y.

The time step dT also depends on DELTA. Through it the X kernel converts the conductivity σ of the *_STAT_S blocks into grid losses, and the effect of the grid losses Y also depends on it (section 5.7.3).

The parameter is mandatory in every step (since 29.10.2026; previously only in the first).

4.6. TIME: analysis time

TIME <expression>; <expression>;

The first parameter is the start time of the analysis, the second the end time. Mandatory in every step (since 29.10.2026; previously only in the first).

4.7. X_MIN, X_MAX, Y_MIN, Y_MAX: bounds of the “box”

X_MIN <expression>;
X_MAX <expression>;
Y_MIN <expression>;
Y_MAX <expression>;

They set the rectangle in which the topology being analysed is placed. Mandatory in every step (since 29.10.2026; previously only in the first).

How the kernel builds the grid from the bounds (since 26.10.2026):

  • The kernel computes the number of grid nodes in X and in Y once, when reading the bounds (X_MIN, X_MAX, Y_MIN, Y_MAX) and the step DELTA. Since 29.10.2026 these lines are mandatory in every step (section 4), so the grid of each step is built from its own bounds and step.
  • As before, the kernel shifts the right and top bounds by one grid step, adding a spare column (and a spare row) of nodes. This is intended: the grid is one node larger than the given domain, and the last node stands one step Delta beyond X_MAX (likewise in Y, beyond Y_MAX). That is why the kernel's Statistics window shows max = 201 for X_MAX = 200 and Δ = 1 mm.

Fixed on 26.10.2026. Previously, on some grids (for example, X_MAX 1000 with DELTA 0.5 or Y_MAX 16 with DELTA 0.2) the outermost column X_MAX (row Y_MAX) was lost: a port standing on this boundary gave total reflection. Now the column is not lost. In addition, previously in a step without boundary lines the grid grew by one step compared with the previous step; now it stays the same.

4.8. FREQ: frequency of the excitation signals

FREQ <expression>;

The frequency of the excitation signals at the device ports. Mandatory in every step (since 29.10.2026; previously only in the first).

In single-frequency mode the frequency of the SMATRIX line must match the FREQ of the step (section 7.4).

4.9. Parameters accepted by the code but not affecting the computation

The code parses these lines and stores the value, but no kernel reads it. Checked against the sources: the corresponding getters (dGetHeight, GetDeltaT, IsDeltaTDefine) are not called from kernels/, fieldview/ or viewers/.

Keyword Format Status
HEIGHT HEIGHT <expression>; Parsed, does not affect the computation. Occurs in samples/SAMPLE_R/TEST_*/…/HWVGD_1.TPL (HEIGHT 0.1;)
DELTA_T_MECHANICAL DELTA_T_MECHANICAL <expression>; Parsed, calls SetDeltaT(), but the result is not read

4.10. Units of plasma and loss quantities

Plasma and loss quantities are always set in fixed units:

Quantity Blocks Unit
Electron density N *_STAT_N, FILE_N m⁻³
Magnetic flux density B *_STAT_B, FILE_B T (tesla)
Conductivity σ *_STAT_S S/m
Grid losses Y *_STAT_Y, FILE_Y dimensionless grid quantity

The length units of the parameter section (LONG_UNIT) apply only to geometry and do not act on these quantities. Plasma blocks in detail: section 5.7.

The N_UNIT and B_UNIT lines (since 29.10.2026). The kernel computes N only in m^-3 and B only in T. Therefore only the following entries are allowed in the #PARM section:

 N_UNIT m3;
 B_UNIT Tl;

The entries N_UNIT cm3;, N_UNIT mm3;, B_UNIT mTl;, B_UNIT mkTl; are a parsing error (for example, the kernel calculates N only in m^-3 ...). Previously such units were accepted, and the values were silently taken in m^-3 and T.


5. The topology section #TOPOLOGY

#TOPOLOGY
    BLOCK 1;
        <primitive type and its parameters>
    END_B
    . . .
    BLOCK <n>;
        . . .
    END_B
#END_TOPOLOGY

Each block is assigned a unique number <n>, an integer greater than zero. The numbers do not have to be in order and do not have to be contiguous (the author's example with horns uses the numbers 1, 2, 5, 6, 7, 12, 14, 21, 22, 25, 26, 41…46, 104).

The parameters of each primitive are described in its local coordinate system. The position of the block in the box is determined in #LINK_LIST, so each block must have exactly one line in #LINK_LIST.

All primitives except ports (INPUT_X, INPUT_Y) may overlap and intersect each other. Ports must be placed only on the boundary of the “box”.

5.1. Material or ε distribution

The first parameter of a primitive sets either the material or the distribution of the permittivity increment:

Value Meaning
METAL metal (perfect conductor)
MAGNETIC magnetic: an open-circuit wall (magnetic wall)
ABSORBER absorber
expression(x,y,r,f) distribution of the increment ε⁺ to the permittivity of vacuum

Key convention: the increment is set, not the permittivity itself.

Required ε What to write
ε = 4 3
ε = 9 8
ε = 1 (vacuum) 0
ε = 0 -1
ε = 0.25 -0.75

An increment close to 4 (X kernel only). An ε increment that differs from 4 by less than 0.004 (that is, ε close to 5) is shifted by the PlanarRT X kernel to 3.996 or 4.004. This is intended by the author: without it the algorithm diverges.

How the kernel places a magnetic wall on the grid. The kernel rounds the bounds of a MAGNETIC block to grid nodes in different directions: for a rectangle the lower bound is shifted down (by half a step), and a step is added to the upper one; for an inclined wall the thresholds at the left and right edges are 1.5 and 2.5 steps (the right edge of the domain stands on the spare column, section 4.7). As a result the wall in nodes is symmetric with respect to the given bounds. The different additions to the edges are not an error; this is intended (answer of K. N. Klimov, 29.10.2026).

An important difference in the meaning of a primitive: a material sets an OUTLINE, not a fill. If a material is given, the primitive sets a boundary (an outline, a polyline). If an expression is given, the primitive sets a region filled with a medium. This is clearly visible in the figures below: for RECT_STAT METAL only the outline of the rectangle is metal, while for RECT_STAT 8 the whole area is painted.

Confirmed by the code: SetRectMetal (src/kernels/PlanarRT_H/TmcRTHNodeDiel.cpp:2419) allocates nNumNode = 2*nX + 2*(nY-1) nodes, which is the perimeter, not nX*nY (a fill), and fills them with four loops: the bottom edge (y = dYmin), the top (y = dYmax), the left (x = dXmin), the right (x = dXmax).

Practical consequence. To obtain a solid metal object, set it as an outline: the field does not penetrate inside a closed outline. To obtain a solid dielectric insert, set an expression: it fills the area.

Thickness of a magnetic wall and an absorber. A MAGNETIC wall and an ABSORBER, for all primitives including CIRCLE_STAT and POLYGON_STAT, have a thickness of one grid cell (2×2 nodes). Since 26.10.2026 inclined sides (the sides of a polygon and the radial sides of a sector) are built solid, without diagonal gaps. Previously the “staircase” of an inclined side broke off roughly in the middle of the segment, and gaps remained at its corners.

Absorber in a dielectric and in plasma (since 29.10.2026). An ABSORBER may stand in a dielectric and in plasma: its load is computed from the medium of each of its nodes, from the Delta eps increment of the node (in the same way as the port load is computed from the W parameter, section 5.5), and in magnetized plasma from the dispersion with the field. Check: a waveguide in a dielectric with eps = 2 and eps = 4 gives |S11| = 0.0036 and 0.0017 against the theoretical 0.0038 and 0.0019. Previously the result was 0.16 and 0.32: the absorber boundary worked as a “dielectric to vacuum” boundary.

If the wave does not propagate on this grid in the medium of an absorber node (dense plasma, eps < 0), the node keeps its previous (vacuum) load, and the computation issues a warning (N is the number of such nodes):

WARNING: N absorber nodes are in a medium where the wave does not propagate ...

An absorber in such a medium does not absorb; move it out of the medium.

The value on a block boundary. At nodes lying on a block boundary the block value is halved, at a corner it is divided by four. The rule is the same for all quantities: ε, N, B, Y, σ (in detail: section 5.7.1). Since 29.10.2026 the rule is also the same for all primitives: the rectangle, the circle and the polygon.

Caution: METAL and MAGNETIC swap places. In src/Include/Tmcgrviw.h (lines 159–165) the definitions depend on the _MODEL_RTE__ macro: when it is defined, METAL and MAGNETIC swap roles (the E-plane model). In the standard H and X builds this macro is not defined, and the words mean what they say.

5.2. RECT_STAT: stationary rectangle

BLOCK <n>;
    RECT_STAT [[file_name]]<METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
    <X_min>; <X_max>;
    <Y_min>; <Y_max>;
END_B
No. Parameter Meaning
1 material / expression see section 5.1
2 X_min left bound in X
3 X_max right bound in X
4 Y_min lower bound in Y
5 Y_max upper bound in Y

The optional [file_name] in square brackets before the expression means save the computed ε distribution to the file file_name.eps, so that it can later be reused by the FILE primitive (section 5.6). This is needed for efficiency when computations over large areas are repeated.

Two additional conditions for MAGNETIC and ABSORBER:

  1. The differences X_max − X_min and Y_max − Y_min must exceed 2*DELTA: the thickness and height must be greater than two spatial discretes.
  2. The whole rectangle must lie in the box, and its boundary must be at least one grid step away from the box boundary.

Examples

Metal rectangle
Metal rectangle

Fig. 4.1. A stationary 30×10 mm rectangle bounded by metal.

BLOCK 1;
    RECT_STAT METAL; 0; 30; 0; 10;
END_B
Magnetic rectangle
Magnetic rectangle

Fig. 4.2. A 29×8 mm rectangle with open-circuit (magnetic) walls.

BLOCK 1;
    RECT_STAT MAGNETIC; -29; 0; -8; 0;
END_B
Absorber rectangle
Absorber rectangle

Fig. 4.3. A 27×9 mm rectangle with absorbing walls.

BLOCK 1;
    RECT_STAT ABSORBER; 0; 27; 0; 9;
END_B
Rectangle with eps=4
Rectangle with eps=4

Fig. 4.4. A 31×12 mm rectangle with ε = 4 (increment ε⁺ = 3).

BLOCK 1;
    RECT_STAT 3; 0; 31; 0; 12;
END_B
Rectangle with eps=0
Rectangle with eps=0

Fig. 4.5. A 31×12 mm rectangle with ε = 0 (increment ε⁺ = −1).

BLOCK 1;
    RECT_STAT -1; 0; 31; 0; 12;
END_B
Rectangle with a gradient
Rectangle with a gradient

Fig. 4.6. A 30×10 mm rectangle; ε decreases linearly along X from 1 at the left bound to −1 at the right (the increment varies from 0 to −2).

BLOCK 1;
    RECT_STAT -2*x/30; 0; 30; 0; 10;
END_B

5.3. CIRCLE_STAT: stationary sector

BLOCK <n>;
    CIRCLE_STAT <METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
    <R_min>; <R_max>;
    <F_min>; <F_max>;
END_B
No. Parameter Constraint
1 material / expression see section 5.1
2 R_min ≥ 0
3 R_max > R_min
4 F_min ≥ 0
5 F_max > F_min; a full circle: F_max up to 2π + 10⁻¹²

R_min, R_max are in LONG_UNIT units; F_min, F_max in ANGLE_UNIT units.

Full circle (since 26.10.2026). A circle is considered full if F_max is not greater than 2π + 10⁻¹². Therefore both the exact value 2π (for example, 2*3.141592653589 or 6.28318530718) and 360° (with ANGLE_UNIT gradus) give a full circle. Previously the exact value 2π could give an incomplete circle (a “ray”) or an empty block.

A magnetic circle at the edge of the domain (CIRCLE_STAT MAGNETIC) is handled in the same way as a magnetic polygon (POLYGON_STAT MAGNETIC).

Examples

Metal circle
Metal circle

Fig. 4.7. A metal circle of radius 30 mm.

BLOCK 1;
    CIRCLE_STAT METAL; 0; 30; 0; 2*3.141592653589;
END_B
Magnetic semicircle
Magnetic semicircle

Fig. 4.8. A magnetic semicircular arc of radius 29 mm.

BLOCK 1;
    CIRCLE_STAT MAGNETIC; 28.9; 29; 3.141592653589/2; 3*3.141592653589/2;
END_B
Absorber half-disc
Absorber half-disc

Fig. 4.9. An absorber half-disc of radius 27 mm.

BLOCK 1;
    CIRCLE_STAT ABSORBER; 0; 27; 0; 3.141592653589;
END_B
Circle with eps=9
Circle with eps=9

Fig. 4.10. A circle of radius 30 mm with ε = 9 (increment ε⁺ = 8).

BLOCK 1;
    CIRCLE_STAT 8; 0; 30; 0; 2*3.141592653589;
END_B
Sector
Sector

Fig. 4.11. A sector with ε = −1 (increment ε⁺ = −2).

BLOCK 1;
    CIRCLE_STAT -2; 10; 30; 3.141592653589/2; 3.141592653589;
END_B

5.4. POLYGON_STAT: stationary polygon

BLOCK <n>;
    POLYGON_STAT <METAL> | <MAGNETIC> | <ABSORBER> | <expression(x,y,r,f)>;
        L <expression>; <expression>;
        L <expression>; <expression>;
        L <expression>; <expression>;
        [L <expression>; <expression>;]
        …
END_B

The first line holds the material or expression. In the following lines, after the L character, the abscissa and ordinate of a vertex in the local coordinate system of the block are entered.

The behaviour depends on the first parameter; this is important:

First parameter Behaviour
expression (ε) The last point is always joined to the first, forming a closed region. The region must be simply connected and convex, and the vertices are traversed clockwise. The number of vertices must be greater than 3.
METAL A polyline is formed: the last point is not joined to the first automatically. This is intended: for example, you can set an open “square” into which the wave flows. To close a metal outline, repeat the first vertex as the last one (Fig. 4.12). The traversal direction and convexity need not be observed.
MAGNETIC, ABSORBER The last point is not joined to the first: a polyline is formed, not a closed region. The traversal direction and convexity need not be observed. The wall thickness is one cell (2×2 nodes), inclined sides are solid (section 5.1).

The program does not check whether the region is closed and simply connected, or whether the vertex traversal direction is correct. An error here is not diagnosed; it shows up as a wrong result.

Examples

Metal quadrilateral
Metal quadrilateral

Fig. 4.12. A metal quadrilateral (closed explicitly: the first point is repeated at the end).

BLOCK 1;
    POLYGON_STAT METAL;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B
Metal polyline
Metal polyline

Fig. 4.13. A metal polyline (the same entry without repeating the first point).

BLOCK 1;
    POLYGON_STAT METAL;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
END_B
Dielectric quadrilateral
Dielectric quadrilateral

Fig. 4.14. A dielectric quadrilateral with ε = 4 (increment ε⁺ = 3): the region closes by itself.

BLOCK 1;
    POLYGON_STAT 3;
        L -10; 0;
        L 0; 10;
        L 10; 0;
        L 0; -10;
END_B
Magnetic polyline
Magnetic polyline

Fig. 4.15. A polyline made of a magnetic wall.

BLOCK 1;
    POLYGON_STAT MAGNETIC;
        L -10; 0;
        L 0; 10;
        L 10; 0;
END_B
Absorber polyline
Absorber polyline

Fig. 4.16. A polyline made of an absorber.

BLOCK 1;
    POLYGON_STAT ABSORBER;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B
Dielectric triangle
Dielectric triangle

Fig. 4.17. A dielectric triangle with ε = 0.25 (increment ε⁺ = −0.75).

BLOCK 1;
    POLYGON_STAT -0.75;
        L 10; 0;
        L 0; -10;
        L -10; 0;
END_B

5.5. INPUT_X and INPUT_Y: ports (excitation transformers)

By their function, blocks are divided into two types: excitation transformers and internal regions. All the primitives above are internal regions.

Careful with the names: they do not mean what they seem to. INPUT_X is a port along the Y axis; it is placed on the left or right boundary of the box, and its dimensions are given in Y. INPUT_Y is a port along the X axis; it is placed on the bottom or top boundary of the box, and its dimensions are given in X. Which boundary the port ends up on is determined by the coordinates in #LINK_LIST.

BLOCK <n>;
    INPUT_X [<METAL> | <MAGNETIC>];
    <Y_min>; <Y_max>;
    <T_min>; <T_max>;
    [<Amplitude>]; [<Faza>];
    [<Eps>];
END_B
BLOCK <n>;
    INPUT_Y [<METAL> | <MAGNETIC>];
    <X_min>; <X_max>;
    <T_min>; <T_max>;
    [<Amplitude>]; [<Faza>];
    [<Eps>];
END_B

Parameters 1–5 (documented in the 2000 manual):

No. Parameter Meaning
1 type Mode of the incident wave (see the table below)
2 Y_min / X_min Lower (left) bound of the port
3 Y_max / X_max Upper (right) bound of the port, > min
4 T_min Start time of the excitation RF pulse
5 T_max End time of the excitation RF pulse, > T_min

The excitation mode is set by the first parameter:

Value Mode Requirement for the port width
MAGNETIC plane wave width less than half the wavelength of the input signal
METAL or empty the first mode of a rectangular waveguide (the H₁₀ wave) width greater than half but less than the full wavelength

These conditions must be observed so that a single-mode regime of excitation and matching is achieved in the port cross-section. The mode in which the reflected signal is observed corresponds to the incident one.

The frequency of the RF pulse is determined by the FREQ parameter of the parameter section.

A matched plane wave between MAGNETIC walls (according to the author's answer of 29.10.2026; Fig. 9.9 of K. N. Klimov's dissertation, 2007). Sample: samples\SAMPLE_R\TEST_MAG\EPS4\TEST025.TPL; the same arrangement is used in the example of section 3 (blocks 3 and 4):

  • an INPUT_X MAGNETIC port of width a (from -a/2 to a/2);
  • the lower MAGNETIC wall from -a/2-2·Delta to -a/2-Delta, that is, one step below the edge of the port;
  • the upper MAGNETIC wall from a/2 to a/2+Delta, that is, from the very edge of the port;
  • both walls run in X from port to port.

With this arrangement an empty channel reflects |S11| ~ 1e-7…1e-8, in both the H and the X kernel.

A wall must not “creep” onto the port. If the arrangement is different, move the lower and upper walls separately by Delta–2·Delta. The criterion of a correct arrangement is an undistorted field in FieldView and an |S11| of the empty channel close to 0.

How to set a port without an incident wave (receive only). If there is no incident wave at a port, T_min must be greater than the analysis time of the parameter section (TIME). This is exactly how the second port in the example of section 3 is made: TIME 0.; 5; with INPUT_X …; 200; 201;.

Parameters 6–8: an extension that is not in the 2000 manual.

Established from the source code (ReadInputX / ReadInputY in src/libs/TMCIndan/TmcRTH_BolckList.cpp; computation: dAmplitude, dFaza, CalculateYForInput in src/kernels/PlanarRT_H/TmcRTHNodeDiel.cpp):

No. Parameter Meaning If not set
6 Amplitude The signal amplitude: an expression of the variables t (current time) and f (frequency). Any value is allowed, including ≠ 1 (see below). Instead of an expression, a signal file can be given in square brackets [name]: multi-frequency mode (Multi-frequency computation) 1.0
7 Faza The signal phase: an expression of t and f, in ANGLE_UNIT units. A minus before the phase means a delay (this is intended) 0.0
8 Eps The ε increment in the port cross-section (affects the wave admittance of the port). A number or an expression; the variables t and f are not allowed in it (see below). In the code it is stored in the W field not applied

All three are optional, but parameter 7 is mandatory if parameter 6 is given (otherwise the error “Missing separator ';'” occurs). An empty value is allowed: … 0; 200; 1.; ; means an amplitude of 1.0 and the default phase; this is exactly how the first port is written in the current samples/SAMPLE_R/TEST_MAG/EPS4/TEST0.TPL.

The variables t and f make it possible to set a pulse envelope instead of a rectangular RF pulse, for example, a Gaussian one.

Examples

Waveguide port INPUT_X
Waveguide port INPUT_X

Fig. 4.18. A waveguide port (H₁₀) 20 mm wide, exciting the system with an RF pulse 10 ns long.

BLOCK 1;
    INPUT_X METAL; 0; 20; 0; 10;
END_B
Plane-wave port INPUT_X
Plane-wave port INPUT_X

Fig. 4.19. A plane-wave port 2 mm wide, an RF pulse 100 ns long.

BLOCK 1;
    INPUT_X MAGNETIC; 0; 2; 0; 100;
END_B
Waveguide port INPUT_Y
Waveguide port INPUT_Y

Fig. 4.20. A waveguide port (H₁₀) 20 mm wide along the X axis. The type is not given, which is equivalent to METAL.

BLOCK 1;
    INPUT_Y ; 0; 20; 0; 10;
END_B
Plane-wave port INPUT_Y
Plane-wave port INPUT_Y

Fig. 4.21. A plane-wave port 2 mm wide along the X axis.

BLOCK 1;
    INPUT_Y MAGNETIC; 0; 2; 0; 100;
END_B

5.6. FILE: reading an ε distribution from a file

BLOCK <n>;
    FILE <file_name>;
    <X_min>; <X_max>;
    <Y_min>; <Y_max>;
END_B

When an ε distribution is computed for large areas of rectangles, evaluating the formula at every node takes noticeable time. It can be done once, saving the result to a file (the [file_name] parameter of RECT_STAT, section 5.2), and the ready distribution can then be substituted.

No. Parameter Meaning
1 file_name Name of the distribution file. It must be located in the same directory as the task file
2–5 X_min, X_max, Y_min, Y_max Bounds of the rectangle

The values X_min, X_max, Y_min, Y_max must be the same as for the RECT_STAT from which the file was produced.

A distribution file is for a rectangle only. This is intended. A region of any shape is inscribed in a rectangle; everything outside the shape is zeros in the file.

For the X kernel, plasma quantities are read from a file in the same way: the FILE_N, FILE_B, FILE_Y primitives (section 5.7.4).

Distribution from a file
Distribution from a file

Fig. 4.22. A 30×10 mm rectangle; the increment ε⁺ is given by a function of the Cartesian coordinates.

First we save the distribution (the first step of the task):

BLOCK 1;
    RECT_STAT [distr]-(2*x/30)^2+(2*y/10)^3; 2; 30; 1; 10;
END_B

Then we use the result from distr.eps:

BLOCK 1;
    FILE distr; 2; 30; 1; 10;
END_B

5.7. X-mode primitives (plasma and losses)

In addition to those listed, the code accepts plasma variants of the primitives. They are not in the 2000 manual; they belong to the X-mode (tmc_rtx.exe) and set the parameters of magnetized plasma and the losses. The full list is defined in src/Include/Tmcgrviw.h (lines 136–157):

Suffix Primitives Quantity Unit
_N RECT_STAT_N, CIRCLE_STAT_N, POLYGON_STAT_N, FILE_N Electron density N m⁻³
_B RECT_STAT_B, CIRCLE_STAT_B, POLYGON_STAT_B, FILE_B Magnetic flux density B tesla
_Y RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y Grid losses Y dimensionless grid quantity
_S RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S Conductivity σ (losses in physical units) S/m

The parameters (coordinates) are the same as for the corresponding basic primitives; instead of a material or an expression for ε, the value (or an expression) of the quantity is written.

The units are fixed: N in m⁻³, B in T, σ in S/m. The unit lines of the #PARM section do not act on them; length units apply only to geometry (section 4.10).

The H kernel has no plasma primitives. For *_STAT_S and FILE_N / FILE_B / FILE_Y the H kernel issues the error “Unknow type block”.

Fixed on 26.10.2026: CIRCLE_STAT_B, CIRCLE_STAT_Y, POLYGON_STAT_B, POLYGON_STAT_Y are read into their own quantities B and Y. Previously they were silently taken as N blocks (plasma). For RECT_STAT_* this was fixed earlier (defect 15). All three forms of primitives (RECT, CIRCLE, POLYGON) are now on an equal footing.

5.7.1. The value on a block boundary

At nodes lying on a block boundary the block value is halved, at a block corner it is divided by four. The rule is the same for all quantities: ε, N, B, Y, σ.

The node weight is the same for all primitives (rectangle, circle, polygon; since 29.10.2026): a node inside the block has weight 1, on a side of the block 1/2, at a corner 1/4. For a circle and a polygon the node weight is determined by its four side neighbours, the nodes (x +- Delta, y) and (x, y +- Delta), that fall into the block:

Neighbours in the block Node weight
4 1
3 1/2
2 1/4 (and with two opposite neighbours, a block one node thick)
1 1

Previously, for a circle and a polygon the weight was computed from the diagonal points.

The boundary of a circle on the grid is a “staircase” of nodes. The area of a circle with R = 3 mm on the grid is 24.0 mm^2 with Delta = 0.5 mm and 26.1 mm^2 with Delta = 0.2 mm (the exact value is 28.3 mm^2): the effective radius is smaller than the given one by about half a step. For accurate geometry take a finer step.

Consequences for plasma in a magnetic field:

  • if B must be full at the plasma boundary, the *_STAT_B block is made wider than the plasma block, so that the plasma boundary lies inside the B block;
  • coinciding B and N blocks are allowed, but there will be B/2 on their common boundary, which gives a spurious resonance layer.
 BLOCK 20;
  RECT_STAT_N 1.24e18; 100; 140; 20; 60;   ! plasma: electron density, 1/m^3
 END_B
 BLOCK 21;
  RECT_STAT_B 0.2; 99; 141; 19; 61;        ! magnetic field, T (block wider than the plasma)
 END_B

5.7.2. Plasma, dielectric and magnetic field in one node

  • A positive ε increment and plasma N in one node: do not do this. The kernel issues a warning to the console and the status bar (WARNING: … nodes have a positive addition of epsilon and the plasma N at once …). Such a node is computed as plasma; the ε increment in it is correct only at the frequency FREQ. If the ε increment is greater than the plasma part, the equivalent density becomes negative and the computation of these nodes diverges; the warning says so separately. The dielectric and the plasma are placed in different nodes.
  • A negative ε increment without N is still an equivalent plasma.
  • The field B in a node with a positive ε increment (without N) is not used; the kernel also issues a warning (WARNING: … nodes have a positive addition of epsilon and the magnetic field B …). A B block without plasma does not affect the computation.

The warnings do not affect the result of the computation: the computation continues.

Losses without plasma (the author's answer of 29.10.2026). The losses Y (*_STAT_Y, FILE_Y, already the normalized grid conductance) and sigma (*_STAT_S, S/m) also act in nodes without plasma N: this is a lossy medium, and it is intended. The plasma model is collisionless.

5.7.3. Losses: *_STAT_Y and *_STAT_S

Block What is set How it acts
RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y Y, a grid loss quantity They work as before. Relation to the conductivity: σ = Y·ε₀/(2·dT), where dT is the time step, which depends on DELTA. Therefore, with DELTA halved, the same Y gives twice the attenuation
RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S (since 26.10.2026) σ, the conductivity, S/m The kernel converts σ into grid losses: Y = 2·dT·σ/ε₀. The same σ gives the same attenuation on any grid

The *_STAT_S format is the same as for *_STAT_Y, except that the value is σ in S/m:

RECT_STAT_S <σ>; <X_min>; <X_max>; <Y_min>; <Y_max>;
CIRCLE_STAT_S <σ>; <R_min>; <R_max>; <F_min>; <F_max>;
POLYGON_STAT_S <σ>;
    L <expression>; <expression>;
    …

Check: a layer with σ = 0.1 S/m at 72 GHz gives |T| = 0.347 with DELTA 0.2 mm and |T| = 0.349 with DELTA 0.1 mm; the theoretical value is 0.355.

5.7.4. Plasma from a file: FILE_N, FILE_B, FILE_Y

A distribution of N, B or Y can, like an ε distribution (section 5.6), be computed once, saved to a file and then read from the file (since 26.10.2026; previously FILE_N, FILE_B, FILE_Y did not work: they gave an error or the values silently went into ε).

  1. Write the file: a block with a file name prefix in square brackets:

    RECT_STAT_N [name]<expression>; <X_min>; <X_max>; <Y_min>; <Y_max>;
    

    Likewise RECT_STAT_B [name]… and RECT_STAT_Y [name]…. 2. Read the file: the block FILE_N name; (FILE_B name;, FILE_Y name;) with the same rectangle bounds as the block that wrote it:

    FILE_N <name>; <X_min>; <X_max>; <Y_min>; <Y_max>;
    

Rules:

  • FILE_N accepts a file written by a RECT_STAT_N block or an ordinary RECT_STAT file; likewise FILE_B and FILE_Y accept files of their own quantities or an ordinary RECT_STAT file;
  • a file of another quantity (for example, an N file in a FILE_B block) is an error stating the reason (bad type of the file {…} for block … : it holds {…}, the block needs {…} or {…});
  • the extension and folder are the same as for an ε file (section 5.6);
  • the H kernel has no such primitives.

5.7.5. Magnetized plasma (fixed on 26.10.2026)

The computation of plasma in a magnetic field B has been fixed: the sign of the coefficient of the “plasma in field B” node has been brought into line with formula (5.49) of the textbook. Previously the field B only weakened the plasma, and the extraordinary wave had no opacity windows. Now the opaque regions agree with cold-plasma theory, for example:

  • 72 GHz, N = 2·10¹⁹ m⁻³, B = 1.8…2.1 T;
  • 52 GHz at B = 1 T.

At B = 0 the result is unchanged. The values of N and B written to the .tt topology file (for FieldView) are restored correctly.

The code also defines primitives of moving blocks: RECT_MOVE, CIRCLE_MOVE, POLYGON_MOVE.


#LINK_LIST
    T <n>; <X0>; <Y0>;
    . . .
#END_LINK

The section specifies the geometric position of all blocks inside the “box”. The device “broken down” into blocks in #TOPOLOGY is assembled from them here, that is, the procedure of recomposition (combining) of the basic elements is performed.

The line T <n>; <X0>; <Y0>; means: place the coordinate origin of block <n> at the point of the “box” with abscissa <X0> and ordinate <Y0>.

The section is mandatory, and each block from #TOPOLOGY must have exactly one line.

Rules for overlapping blocks:

  1. Blocks may overlap and intersect each other.
  2. Ports must not intersect (INPUT_X, INPUT_Y). Ports must lie on the boundary of the box.
  3. If two or more blocks with an ε distribution overlap, the resulting increment in the overlap region equals the sum of the increments of each block.
  4. METAL, MAGNETIC, ABSORBER regions may overlap regions filled with a dielectric.
  5. When metal, magnetic wall and absorber intersect each other, the priority is determined by the order of the blocks in the topology section.
  6. At the nodes on a block boundary its value is halved, at a corner it is divided by four (for ε, N, B, Y, σ; section 5.7.1).
  7. Parts of a block extending beyond the bounds of the “box” are discarded (since 26.10.2026). Previously they were pressed against the outermost column of nodes and deformed the block.

7. The output section #OUTPUT

#OUTPUT
    . . .
#END_OUTPUT

Only the name of the output signal file (FILE) is mandatory.

7.1. FILE: name of the signal file (mandatory, first)

FILE <file_name>;

Sets the name of the file to which the incident and reflected waves are written for each time discrete. The file gets the .t extension and is written to the directory of the task file.

The line is mandatory and must be the first in the section. The name must not contain a dot: the code checks this explicitly and issues the error Unresolved simbol '.' in filename.

All other output files of the step are named from this name (see section 8).

7.2. TOPOLOGY: output of the geometry

TOPOLOGY;

Optional. If absent, the geometry file is not produced. The file gets the .tt extension.

When field output (FIELDS) is turned on, TOPOLOGY must be turned on as well; otherwise FieldView will not be able to show the picture.

7.3. FIELDS: output of the field distribution

FIELDS;

Optional. Turns on the output of the field intensity distribution.

It slows down the analysis considerably. When running a series of computations, this flag is better turned off.

If field output is on and the synchronization flag is set, the compute kernel will not compute the next time step until FieldView has drawn the current field distribution.

The file holds the field distribution for one time step (the current one). This is important if you process the file with third-party programs.

7.4. SMATRIX: output of the scattering matrix

SMATRIX <Sfile>; <expression>; <T_min>; <T_max>;
SMATRIX <Sfile>; <expression>;                     ! multi-frequency mode only
No. Parameter Meaning
1 Sfile Name of the S-matrix file (it gets the .s extension)
2 expression The frequency under which the point is recorded. In single-frequency mode it must equal the FREQ of the step
3 T_min Start of the window over which the result is computed. In single-frequency mode the window is mandatory
4 T_max End of the window

The scattering matrix is computed over the time window T_min … T_max. In single-frequency mode the window is set from the moment the steady state of the transient is reached. An S-matrix element is the ratio of the scattered wave to the incident wave Up of the excited port, S = Uo/Up (section 5.5).

Example: SMATRIX test1; 10; 4; 5; writes the S-matrix for the frequency of 10 GHz (with FREQ 10;) over the window from 4 to 5 ns.

SMATRIX frequency = FREQ (since 26.10.2026). If in single-frequency mode the frequency in the SMATRIX line differs from the FREQ of the step, this is a step parsing error with the hint SMATRIX name; <FREQ>; Tmin; Tmax;. Previously S was silently computed at the frequency FREQ and labelled in .s with the frequency from SMATRIX. A line without the T_min; T_max; window in single-frequency mode is also a parsing error. For example, samples/SAMPLE_R/STATIKA/TEST0.TPL (FREQ 0.0001 GHz, SMATRIX at 10 GHz) now gives this error.

Multi-frequency mode (a port with a signal file [name], see Multi-frequency computation):

  • the frequency in SMATRIX is not checked against FREQ; the frequencies are taken from the signal;
  • the window T_min … T_max is taken into account (since 26.10.2026);
  • the entry SMATRIX name; F; without a window means the full window 0 … T_max of the task; this is the default variant for multi-frequency mode;
  • if the pulse response has not decayed by the end of the window (more than 1 % of the peak in the last 5 % of the window) or the window begins while the incident pulse is still going, the kernel issues a warning (console, status bar). The S-matrix is still written.

An error at a step does not abort the sweep (since 26.10.2026). If a step ended with an error, an S-matrix of zeros is written to .s at its frequency, the message Error at step N (f): … is output to the console and the status bar, and the computation continues. At the end, exit code 2 and the list of steps with errors are given. In multi-frequency mode zeros are written only at the frequencies with an error (for example, at a frequency below the port cutoff); the other frequencies are computed. An S value that is not a number (NaN or Inf, a diverging field) is an error, not a NaN in the file.

One point per step. In single-frequency mode each #STEP gives one frequency point in .s. To obtain a frequency response you need a sweep: many steps with different FREQ writing to the same Sfile (see section 10), or a multi-frequency computation. If you make SMATRIX at one frequency, .s will contain one point and no curve will be drawn in TMCGROUT; this is not a program error.

7.5. FIELD_DISTRIBUTION and FIELD_DISTRIBUTION_M

FIELD_DISTRIBUTION <file_name>; <freq>; <T_min>; <T_max>;
FIELD_DISTRIBUTION_M <file_name>; <freq>; <T_min>; <T_max>;

An extension that is not in the 2000 manual. Defined in src/Include/TmcRTH_IndanOutput.h (lines 14–15), parsed in src/libs/TMCIndan/TmcRTH_IndanOutput.cpp. They save the complex field distribution at the given frequency (amplitude → .AMP, phase → .FAZ; the RP radiator file .DAT is built from them). FIELD_DISTRIBUTION_M is a variant with accumulation in memory (ReadFileDistrInMemory).

Used, for example, in samples/SAMPLE_R/1/TEST.TPL.

The radiation pattern window (parameters 3 and 4 are the time window over which the field distribution is accumulated):

  • the window length is rounded up to an integer number of periods of the frequency. If the number of periods is already an integer, no extra period is added (since 26.10.2026; previously one more period was added, and the window could go beyond the end of the analysis time TIME);
  • the window must end before TIME. A window ending exactly at TIME is not closed: there are no radiation pattern files, an error message is output, exit code 2.

The RP integration contour lies 10 grid steps from X_MIN and Y_MIN and 8 steps from X_MAX and Y_MAX (the asymmetry is due to the spare column, section 4.7). This asymmetry does not affect the RP: the contour is an array, each side of which radiates into its own half-plane (a Huygens element: Ez is an electric dipole, Hx, Hy are a magnetic current). There is no key for setting the contour in #OUTPUT.


8. Which files the kernel creates

The names are formed from the base name given by FILE in the #OUTPUT section. The list has been checked against the code (src/libs/TMCIndan/TmcRTH_IndanOutput.cpp, lines 194–204):

Extension Contents Viewed with
.t Time signals at the ports (incident and reflected waves) TMCROS
.s Scattering matrix TMCGROUT
.tt Device topology FieldView
.ex The field at each output step (FIELDS): in the H kernel Ez, in the X kernel Hz (a node of the X scheme stores Hz) FieldView
.AMP, .FAZ Amplitude and phase of the field distribution at the RP frequency (FIELD_DISTRIBUTION, FIELD_DISTRIBUTION_M) FieldView
.DAT Radiators of the RP contour (for a multi-frequency RP, <name>_<frequency>MHz.DAT for each tone) TMC_DN
.eps A saved ε distribution (from RECT_STAT [file_name]), and in the X kernel also N, B or Y (from RECT_STAT_N/_B/_Y [file_name]) kernel input/output

FieldView opens the formats *.tf, *.AMP, *.FAZ, *.ex (the IDR_FLDVIETYPE string in the resources). The .tf extension is historical (version 2.0p); the current code does not write it.

Checked against the code on 29.10.2026 (libs/tmcindan/tmcrth_indanoutput.cpp): the kernel composes the names .ey, .hz, .em, .ef, .q, .ix, .iy, but opens or writes none of them; these are remnants of earlier versions. Previously they were listed in this table by mistake.


9. The input language preprocessor

The preprocessor runs immediately before data input and makes it possible to define macros and perform macro substitutions, include the contents of other files and write data as mathematical expressions. Its functions are similar to those of the C and FORTRAN preprocessors.

First of all, it is needed to structure and parameterize the input data; this helps avoid errors during input and modification.

9.1. Mathematical expressions

Any numeric parameters may be written as expressions. Expressions may contain integer and real numbers, macro names, parentheses, operator signs and functions.

Arithmetic operations:

Sign Operation
+ addition
- subtraction
* multiplication
/ division
^ exponentiation

Mathematical functions:

Function Meaning Function Meaning
abs(x) absolute value sin(x) sine
exp(x) exponential cos(x) cosine
log(x) natural logarithm tan(x) tangent
log10(x) decimal logarithm sinh(x) hyperbolic sine
sqrt(x) square root cosh(x) hyperbolic cosine
asin(x) arcsine tanh(x) hyperbolic tangent
acos(x) arccosine atan(x) arctangent

The arguments of trigonometric functions are in degrees or radians, depending on ANGLE_UNIT.

The operator precedence is described in the 2000 manual as follows: “exponentiation, division, multiplication, subtraction and summation”. Note that division is listed before multiplication, and subtraction before addition, which differs from the generally accepted equal precedence. Do not rely on precedence: place parentheses explicitly. The expression in the innermost parentheses is evaluated first.

Numbers with an exponent and exponentiation (since 26.10.2026):

Rule Example Result
A number with an exponent is written without parentheses, including before an operation 1.24e+17*(…), 0.5e-1*2 evaluated as usual
An exponent without a sign is the same as with a plus 1e18 1·10¹⁸
Exponentiation is right-associative: a^b^c = a^(b^c) 2^3^2 512 (not 64)
A negative base with an integer exponent (-2)^3, (x-5)^2 −8; the square of the difference
A base ≤ 0 with a fractional exponent (-2)^0.5 error
0^0 0^0 error

Precision of coordinates and time. The coordinates x, y and the time t are passed to formulas with full precision (since 26.10.2026). Previously they were passed with 6 significant digits, and at large coordinates (for example, x ≈ 100 000 mm) the formula ε(x) became stepped.

Coordinate variables. When a distribution of the ε increment is set, the expression may contain:

Variable Meaning Unit
x, y Cartesian coordinates LONG_UNIT
r polar radius LONG_UNIT
f polar angle ANGLE_UNIT

The program itself substitutes the values of these variables for the points of the plane.

Port variables. In the Amplitude and Faza parameters of the INPUT_X / INPUT_Y primitives the variables t (current time) and f (frequency) are available; see section 5.5. In parameter 8 (Eps, the W field) the variables t and f are not allowed; this is a parsing error.

Note: f means the polar angle in expressions for ε, but the frequency in expressions for the port amplitude and phase.

9.2. Macro definitions #define

#define <name>  [par1; par2; ... ; par32;] @ text1(par1 - par32)\\
                                            text2(par1 - par32)\\
                                            text3(par1 - par32)
Element Meaning
#define marks the beginning of a macro definition
<name> the macro name
[par1; …] formal parameters (up to 32, optional)
@ separator
textN replacement text
\\ line continuation symbol

Naming rules. The name is separated by spaces on both sides and may contain up to 32 characters from the set: Latin letters A-Z, a-z, digits 0-9, the underscore _. All macro definitions in one task must have unique names.

The replacement text is separated from the name (or parameters) by a space, the @ sign and one more space. If the text contains several lines, the pair of characters \\ is added at the end of every line except the last. Text following \\ is considered a comment and is ignored.

All macro definitions must be placed before the place where they are used.

The main pitfall: a macro is substituted as text

#define  Length @ 38+12
#define  Width @ Length/2
 . . .
    RECT_STAT 3; 0; Length; 0; Width;

Result of the preprocessor:

    RECT_STAT 3; 0; 38+12; 0; 38+12/2;

The length will be 50, but the width 44, not 25! Because 38+12/2 = 38+6 = 44.

The correct way is to enclose the value in parentheses:

#define  Length @ (38+12)
#define  Width @ Length/2

Then Width expands to (38+12)/2 = 25. That is exactly why in all the author's tasks macro definitions are written as #define L1 @ ( 50.00 ), with parentheses.

Macros with parameters

#define  Stp  name1; name2; @ name1+name2
#define  Stm  param; @ param*param
. . .
    RECT_STAT 3; 0; (Stm  (Stp 10; 2;);); 0; 40;

Result:

    RECT_STAT 3; 0; 10+2*10+2; 0; 40;

That is, the length will be 32, not 144. This happens because the first and last parentheses enclosing the actual parameter are replaced by spaces.

If a macro used as an actual parameter has actual parameters of its own, it must be enclosed in parentheses.

9.3. File inclusion #include

#include <file_name>

Inserts the contents of the file <file_name> into the task text. The included file must be located in the directory of the input task.

This is the main structuring technique: constants are moved to one .h, the step description to another.

#include parm.h
 . . .
    BLOCK 1;
        RECT_STAT 3; 0; Length; 0; Width;

where parm.h contains:

#define  Length @ (38+12)
#define  Width @ Length/2

10. Frequency sweep: computation at several frequencies

To analyse a system at several frequencies, the procedure must be repeated at all frequencies of interest; this is done by adding new steps #STEP. It is most convenient to use macro definitions with parameters for this.

The author's technique: the whole step is wrapped in a macro in a separate .h file, and the .tpl consists of calls to this macro.

File STEP1.H: the macro of one step:

#define step1 Freq__; File__; SFile__; Tmin__; Tmax__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT GHz;\\
 LONG_UNIT mm;\\
 TIME_UNIT ns;\\
 DELTA W_delta;\\
 TIME 0.; 5;\\
 X_MIN  0.0;\\
 X_MAX L1+L2+L3;\\
 Y_MIN  0.0;\\
 Y_MAX W_waveg;\\
 FREQ  Freq__ ;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\
  INPUT_X   W_type ; -a1/2; a1/2; 0; 200;\\
 END_B\\
 BLOCK 7;\\
  INPUT_X    W_type ; -a1/2; a1/2; 200; 201;\\
 END_B\\
 BLOCK 2;\\
  RECT_STAT W_type ; 0.0; L1+L2+L3; -a1/2-2*W_delta; -a1/2-1*W_delta;\\
 END_B\\
 BLOCK 3;\\
  RECT_STAT W_type ; 0.0;L1+L2+L3; a1/2; a1/2+W_delta;\\
 END_B\\
 BLOCK 5;\\
  RECT_STAT [epsil1](W_eps-1); 0;L2; 0.0; W_waveg;\\
 END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
 T 1; 0.0; W_waveg/2;\\
 T 2; 0.0; W_waveg/2;\\
 T 3; 0.0; W_waveg/2;\\
 T 5; L1; 0.0;\\
 T 7; L1+L2+L3; W_waveg/2;\\
#END_LINK\\
#OUTPUT\\
 FILE File__;\\
 SMATRIX SFile__; Freq__; Tmin__; Tmax__;\\
! FIELDS;\\
! TOPOLOGY;\\
#END_OUTPUT\\
#END_STEP\\

Task file: a sweep from 10 to 12 GHz with a step of 0.1 GHz:

#TMC_RT_H
#define L1 @ (   50.00)
#define L2 @ (   50.00)
#define L3 @ (   50.00)
#define W_eps @ ( 4.00 )
#define W_waveg @ (  400.00 )
#define W_input @ (  2.00 )
#define W_delta @ (    0.5 )
!#define W_type @ METAL
#define W_type @ MAGNETIC
#define file_S @ test101
#define a1 @ ( W_input )
#include step1.h
step1 10.0; test100; file_S; 4; 5;
step1 10.1; test101; file_S; 4; 5;
step1 10.2; test102; file_S; 4; 5;
…
step1 12.0; test120; file_S; 4; 5;
#EOF

Note the techniques:

  • all steps write the S-matrix to one file file_S; this is how the frequency response is accumulated;
  • the frequency in SMATRIX and in FREQ is set by one parameter Freq__; in single-frequency mode they must match (section 7.4);
  • each step has its own signal file name (test100, test101, …); otherwise the steps would overwrite each other's files;
  • FIELDS and TOPOLOGY are commented out with the ! character; in a sweep, field output slows the run down drastically;
  • RECT_STAT [epsil1](W_eps-1): the ε distribution is computed once and saved to epsil1.eps;
  • the line !#define W_type @ METAL is a commented-out alternative; this is how spare variants are kept.

An error at one step does not abort the sweep (since 26.10.2026). At the frequency of a step with an error, zeros are written to .s (the whole S-matrix), the other steps are computed; at the end, exit code 2 and the list of steps with errors are given (section 7.4).

Expected discrepancy with the analytical solution. The frequency dependence computed on a grid is shifted with respect to the exact analytical solution, because the wavelength on the grid differs from the exact value. The program shows this error in the statistics window, and the shift corresponds to it. This is a property of the method, not an error.


11. Worked example: scattering by an inhomogeneous cylinder

The task is located in samples/SAMPLE_R/METAL/CIRCLE/RUPOR.TPL.

A system of three horns
A system of three horns

Fig. 6.1. A system of three horns for studying scattering by an inhomogeneous dielectric cylinder of radius 250 mm. The permittivity of the cylinder depends on the radius: it equals 1 at the boundary and −5 at the center.

The central horn radiates the signal; the two side horns receive.

Key places of the task:

#define W_eps @ ( -4 + 4*r/(W_waveg/2)+1 )
…
 BLOCK 104;
  CIRCLE_STAT (W_eps-1); 0; W_waveg/2; 0; 2*3.1415;
 END_B
…
 BLOCK 8;
  RECT_STAT ABSORBER; L_waveg-5*W_delta; L_waveg - 1*W_delta+0.00; 0.0; W_waveg-2*W_delta;
 END_B

Here:

  • W_eps is a function of the polar radius r: at the boundary (r = W_waveg/2) it gives 1, at the center (r = 0) it gives −4 + 1 = −3;
  • the block receives (W_eps-1), again the increment;
  • blocks 8, 9, 10 are absorbers along the edges of the box, so that the wave is not reflected from the walls. Note how their bounds are set back from the box bounds by several W_delta; this fulfils the requirement of section 5.2;
  • the horns are assembled from RECT_STAT METAL (walls) and POLYGON_STAT METAL (flares), and the same group of blocks is repeated three times with different numbers and placed in #LINK_LIST at different heights (W_waveg/2, W_waveg/4, 3*W_waveg/4).
ε distribution
ε distribution

Fig. 6.2. The permittivity distribution as shown by FieldView.


12. Keyword table

Notation: expression is a mathematical expression; expression(x,y,r,f) is an expression of the Cartesian or polar coordinates; n is an integer; < > is a mandatory parameter; [ ] is an optional one.

Keyword Format Purpose
#TMC_RT_H Beginning of the task file
#STEP Beginning of a task step
#PARM Beginning of the parameter section
ANGLE_UNIT <radian> \| <gradus>; Units of angles
FREQ_UNIT <GHz> \| <MHz> \| <kHz> \| <Hz>; Units of frequency
LONG_UNIT <mm> \| <cm> \| <m>; Units of length (geometry only)
TIME_UNIT <s> \| <ms> \| <mks> \| <ns> \| <ps>; Units of time
DELTA <expression>; Analysis accuracy: the size of the spatial discrete
TIME <expression>; <expression>; Analysis time T_min; T_max
X_MIN <expression>; Abscissa of the left edge of the “box”
X_MAX <expression>; Abscissa of the right edge of the “box”
Y_MIN <expression>; Ordinate of the bottom edge of the “box”
Y_MAX <expression>; Ordinate of the top edge of the “box”
FREQ <expression>; Frequency of the excitation signals
HEIGHT <expression>; Parsed, does not affect the computation (section 4.9)
DELTA_T_MECHANICAL <expression>; Parsed, does not affect the computation (section 4.9)
N_UNIT <m3>; Unit of the density N: only m3 (m^-3) is allowed, any other is an error (section 4.10)
B_UNIT <Tl>; Unit of the flux density B: only Tl (T) is allowed, any other is an error (section 4.10)
#END_PARM End of the parameter section
#TOPOLOGY Beginning of the geometry section
BLOCK <n>; Beginning of a block, n > 0
RECT_STAT [[file_name]]<METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; <X_min>; <X_max>; <Y_min>; <Y_max>; Stationary rectangle
CIRCLE_STAT <METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; <R_min>; <R_max>; <F_min>; <F_max>; Stationary sector (a full circle: F_max up to 2π + 10⁻¹²)
POLYGON_STAT <METAL> \| <MAGNETIC> \| <ABSORBER> \| <expression(x,y,r,f)>; Stationary polygon (with a material, a polyline)
L <expression>; <expression>; A polygon point X0; Y0;
INPUT_X [<METAL> \| <MAGNETIC>]; <Y_min>; <Y_max>; <T_min>; <T_max>; [<Amp>]; [<Faza>]; [<Eps>]; Port along the Y axis (on the left/right boundary)
INPUT_Y [<METAL> \| <MAGNETIC>]; <X_min>; <X_max>; <T_min>; <T_max>; [<Amp>]; [<Faza>]; [<Eps>]; Port along the X axis (on the bottom/top boundary)
FILE <file_name>; <X_min>; <X_max>; <Y_min>; <Y_max>; Reading an ε distribution from a file (rectangle only)
RECT_STAT_N, CIRCLE_STAT_N, POLYGON_STAT_N, FILE_N as for the basic primitive Plasma density N, m⁻³ (X-mode)
RECT_STAT_B, CIRCLE_STAT_B, POLYGON_STAT_B, FILE_B as for the basic primitive Flux density B, tesla (X-mode)
RECT_STAT_Y, CIRCLE_STAT_Y, POLYGON_STAT_Y, FILE_Y as for the basic primitive Grid losses Y (X-mode)
RECT_STAT_S, CIRCLE_STAT_S, POLYGON_STAT_S as for *_STAT_Y, the value is σ Conductivity σ, S/m (X-mode)
RECT_MOVE, CIRCLE_MOVE, POLYGON_MOVE not documented Moving blocks
END_B End of a block
#END_TOPOLOGY End of the geometry section
#LINK_LIST Beginning of the link graph section
T <n>; <expression>; <expression>; Place the coordinate origin of block n at the point X0; Y0;
#END_LINK End of the link graph section
#OUTPUT Beginning of the output section
FILE <file_name>; Port signals → file_name.t (mandatory, first)
TOPOLOGY Topology output → file_name.tt
FIELDS Output of the field distribution
SMATRIX <Sfile>; <expression>; <T_min>; <T_max>; S-matrix → Sfile.s. In single-frequency mode the frequency = FREQ and the window is mandatory; in multi-frequency mode the window may be omitted
FIELD_DISTRIBUTION <file_name>; <freq>; <expression>; <expression>; Complex field distribution
FIELD_DISTRIBUTION_M <file_name>; <freq>; <expression>; <expression>; The same, with accumulation in memory
#END_OUTPUT End of the output section
#END_STEP End of a task step
#EOF End of the input task
#define <name> [par1; …] @ <text> Macro definition (preprocessor)
#include <file_name> File inclusion (preprocessor)
! Comment (to the end of the line)

13. Typical errors

Symptom Cause
The width/length of a block is “wrong” A macro without parentheses: #define L @ 38+12 instead of #define L @ (38+12). See 9.2
Error “Missing file name” / Unresolved simbol '.' The name in FILE is empty or contains a dot. See 7.1
Empty .s, “Error when read” in TMCGROUT SMATRIX is set at one frequency (one point, so no curve is drawn) or the window T_min…T_max is outside the signal interval. See 7.4
A step parsing error at the SMATRIX line In single-frequency mode the SMATRIX frequency is not equal to the FREQ of the step, or the window T_min; T_max; is not set. See 7.4
Error {FREQ_UNIT MHz;}: the unit is written after its value ... A unit line stands below its value in the same #PARM section (an error since 29.10.2026). Units first, then values. See section 4
Error Section #PARM: missing X_MAX. Every step is an independent task: ... or Missing section #PARM in 2 step ... A mandatory parameter (X_MIN, X_MAX, Y_MIN, Y_MAX, DELTA, TIME, FREQ) is not set in the step, or there is no #PARM section. Each step is an independent problem: add the parameters. See section 4
Error the kernel calculates N only in m^-3 ... A unit other than m3 and Tl is set in N_UNIT or B_UNIT. See 4.10
Warning WARNING: N absorber nodes are in a medium where the wave does not propagate ... The absorber stands in a medium where the wave does not propagate (dense plasma, eps < 0), and does not absorb there. Move the absorber out of this medium. See 5.1
A plane wave between MAGNETIC walls: the empty channel reflects noticeably The walls are not arranged as in the TEST025.TPL sample or “creep” onto the port. See 5.5
FieldView shows nothing FIELDS is on, but TOPOLOGY is not. See 7.2
The computation takes very long DELTA is too fine (the time grows as the cube) or FIELDS is on during a sweep. See 4.5, 10
Wrong result for POLYGON_STAT with ε The region is non-convex or the vertices are traversed counter-clockwise; this is not diagnosed. See 5.4
A metal polygon is “not closed”, the wave flows inside POLYGON_STAT METAL is a polyline and does not close by itself (this is intended). Repeat the first vertex as the last. See 5.4
The frequency response is shifted relative to the analytical solution A property of the method (the wavelength on the grid). The error is shown in the statistics window. See 10
A block did not appear in the computation There is no T line for the block in #LINK_LIST. See 6
A spurious resonance layer at the plasma edge The B and N blocks coincide, so B/2 acts at the boundary. Make the B block wider than the plasma. See 5.7.1
Warning WARNING: … positive addition of epsilon and the plasma N …; the computation diverges Both a positive ε increment and plasma N are set in the same nodes. Separate the dielectric and the plasma into different nodes. See 5.7.2
Error bad type of the file … for block … A file of another quantity has been given to a FILE_N/FILE_B/FILE_Y block. See 5.7.4
Error “Unknow type block” in the H kernel The *_STAT_S, FILE_N/_B/_Y blocks exist only in the X kernel. Open the task in PlanarRT X. See 5.7
No radiation pattern files, an error, code 2 The FIELD_DISTRIBUTION window ends at TIME or later. The window must end before TIME. See 7.5
Zeros in .s at one of the sweep frequencies An error occurred at this step (the message Error at step N (f): …); the other frequencies have been computed. See 7.4

14. Sources

The document has been reconstructed from the author's materials in the archive Tamic\data Tamic\ and checked against the source code of TMC Suite.

Used:

Document What was taken
TMC\DISTR\MANUALS\RT_HPLANAR\rt_hplanar.doc (2.6 MB, 2000) The main source. A complete description of the input language, the method of composing a task, all figures of the primitives, examples
TMC\DISTR\MANUALS\RT_HPLANAR\FormEps.doc (1999) The ε distribution format
TMC\DISTR\TMC_I\TMC\DOC_SRC\S_FILE.DOC (1992) The S-file format (see docs/api/libs/sfile95.md)

The figures have been extracted from rt_hplanar.doc (vector WMF → PNG) and are kept in docs/screenshots/tpl/.

Checked and rejected as not related to TMC Suite:

Document Why it did not fit
TMC\DISTR\MANUALS\TAMICE_H.DOC (898 KB, 1999) An R&D report on the related product TAMIC-E/H. A different input language: #PARMS, FRQS, TOLERANCE, WIDTH, GRAPH_K. Useful as an explanation of the #PARM/#PARMS inconsistency (section 4)
TMC\DISTR\EMSTAR\MANUAL.DOC The EMSTAR product, a planar EM simulator with its own language (LAYER, MEDIA, PORT, EMFRQS). It has nothing to do with TMC Rt
TMC\DISTR\MANUALS\{E2R,H2R,I1R,I2E,I2R,M2E,M2R,W2R}\*.DOC Manuals of other analysers of the TAMIC family

  • docs/user-manual/planar_rt_h.md: user manual of the H kernel
  • docs/user-manual/planar_rt_x.md: user manual of the X kernel
  • docs/user-manual/multifreq.md: multi-frequency computation
  • docs/user-manual/fieldview.md: viewing fields and topology
  • docs/user-manual/tmcros.md: viewing .t signals
  • docs/user-manual/tmcgrout.md: viewing .s S-matrices
  • docs/user-manual/changelog.md: change history
  • docs/api/libs/prepr.md: preprocessor API
  • docs/api/libs/tmcindan.md: input language parser API
  • ISSUES.md: known defects