Демо: плоский волновод (X)
Тот же пример для ядра X-моды
| Параметр | Значение |
|---|---|
| Раздел библиотеки | Учебные задания |
| Ядро | PlanarRT X (planarrt_x.exe) |
| Источник | TMC Suite, samples/demo_x.tpl |
| Сетка | 200 × 100 узлов, шаг 1 мм |
| Время счёта задания | 3 нс модельного времени, шагов: 1 |
| Длительность прогона | около 1 с на шестиядерном ПК, без вывода поля |
Постановка задачи
Учебный пример из поставки TMC Suite для ядра X-моды. Формат файла и заголовок #TMC_RT_H у обеих мод одинаковые — отдельного #TMC_RT_X не существует.
Теоретические сведения
Это авторские задания лабораторных работ и демонстрационного набора пакета. TPL Designer читает их так же, как «Открыть готовое»: при сохранении макросы-константы автора раскрываются в числа, а смысл задания не меняется.
Тот же учебный пример для ядра X-моды. Файл задания начинается с того же заголовка #TMC_RT_H, что и у H-моды: отдельного заголовка #TMC_RT_X в языке нет, а ядро определяется тем, какой программой открыто задание.
Паспорт образца. Значения, которые TPL Designer вычисляет по формулам для параметров по умолчанию.
| Величина | Значение |
|---|---|
| Шагов расчёта | 1 |
| Фигур / входов | 6 / 1 |
Создание файла задания
В выпуске 5.0 рамка поглотителя этого образца перекрывает канал сразу за портом, и волна в него не заходит. Перед записью исправьте её: в разделе «Геометрия» удалите «фигура 4» и нарисуйте вместо неё два прямоугольника с материалом «поглотитель»: x от 2 до 5 мм при y от 2 до 37 мм и x от 2 до 5 мм при y от 63 до 98 мм. Все результаты на этой странице получены с такой правкой.
Образец уже встроен в TPL Designer: скачивать ничего не нужно. Выполните шаги по порядку.
- Запустите TPL Designer. На стартовом экране в карточке «Взять образец» нажмите «Открыть библиотеку».
- Слева выберите раздел «Учебные задания» и щёлкните в галерее плитку «Демо: плоский волновод (X)». Справа откроется карточка образца с паспортом и параметрами.

- Параметров у этого образца нет: это авторское задание, оно открывается как есть.
- Нажмите «Открыть в редакторе». Задание откроется в мастере из пяти разделов, список которых находится слева.
- Откройте раздел «Геометрия». На холсте показано то, что посчитает ядро: металлические стенки, порты, диэлектрик или плазма. Зелёный значок отмечает активный порт, красный — пассивный. Двойной щелчок по объекту откроет его свойства.

- Если хотите посмотреть поле в FieldView, откройте раздел «Вывод данных» и отметьте «Выгружать топологию (файл .tt)» и «Выгружать поля (файлы .ex, .ey, .hz)», вариант «только на первом шаге». Запись поля замедляет счёт в разы, поэтому в образцах она выключена, если задание не требует её само.
- Откройте раздел «Проверка». Слева показана сводка расчёта, справа текст файла задания, а полоса внизу сообщает, что замечаний нет.

- Нажмите «Создать файл задания» и выберите пустую папку. В ней появятся файлы:
demo_x.tpl.
Запуск расчёта
- Запустите программу PlanarRT X (
planarrt_x.exe). - Нажмите
Открыть или Ctrl+Oи выберите файлdemo_x.tplв созданной папке. Если в строке состояния появилосьШаг:1;Error:no, задание прочитано верно. - Нажмите
Запуск или F5. Ядро посчитает все шаги задания (1), на шестиядерном ПК это занимает около 1 с. - Дождитесь надписи «Готово» в строке состояния.
Просмотр результатов
Сигналы на портах. Нажмите
Показать выходной сигнал: откроется TMCROS с файлом .t.

Диаграмма направленности. Нажмите
Показать диаграмму направленности: откроется TMC_DN с файлом .DAT. В легенде справа показан двумерный КНД.

Поле. Если вы включили вывод поля на шаге 6, нажмите
Показать поле и топологию: откроется FieldView. Анимацию он сохраняет командой экспорта.
Результаты

Анимация поля
Разбор результатов
Картина та же, что и в образце для H-моды: после разрыва рамки у входа волна идёт по каналу и излучается из его конца. Это удобная проверка запуска ядра X-моды. Без правки поглотитель перекрывал канал сразу за портом, и поле оставалось у левой границы.
Файл задания
Этот текст TPL Designer показывает в разделе «Проверка». Файл записан в кодировке CP1251.
demo_x.tpl
#TMC_RT_H
! Задание сгенерировано TPL Designer.
! Self-contained learning template for the X-mode kernel (tmc_rtx.exe).
! The .tpl format and the #TMC_RT_H signature are identical to the H kernel
! (there is no separate #TMC_RT_X signature), so this same file also opens
! in the H kernel. Geometry: a parallel-plate channel with a left port,
! framed by absorbers. Small grid for a quick run.
! X-mode specific features (moving blocks RECT_MOVE / CIRCLE_MOVE /
! POLYGON_MOVE, the second port INPUT_Y, and dielectric distributions given
! as an expression E(x,y)) are shown below as COMMENTED examples - remove the
! leading '!' on a block to experiment. They are left disabled so the file is
! guaranteed to compute as-is.
! Ядро: tmc_rtx (X-мода)
! ===== Шаг: FREQ = 30.0 ГГц =====
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA 1.0;
TIME 0.; 3.0;
X_MIN 0.0;
X_MAX 200.0;
Y_MIN 0.0;
Y_MAX 100.0;
FREQ 30.0;
#END_PARM
#TOPOLOGY
BLOCK 1; ! фигура 1
RECT_STAT METAL; 0.0; 120.0; 39.0; 40.0;
END_B
BLOCK 2; ! фигура 2
RECT_STAT METAL; 0.0; 120.0; 60.0; 61.0;
END_B
BLOCK 4; ! фигура 4
RECT_STAT ABSORBER; 2.0; 5.0; 2.0; 37.0;
END_B
BLOCK 21;
RECT_STAT ABSORBER; 2.0; 5.0; 63.0; 98.0;
END_B
BLOCK 5; ! фигура 5
RECT_STAT ABSORBER; 195.0; 198.0; 2.0; 98.0;
END_B
BLOCK 6; ! фигура 6
RECT_STAT ABSORBER; 2.0; 198.0; 2.0; 5.0;
END_B
BLOCK 7; ! фигура 7
RECT_STAT ABSORBER; 2.0; 198.0; 95.0; 98.0;
END_B
BLOCK 3; ! вход 1 — АКТИВНЫЙ
INPUT_X ; 40.0; 60.0; 0; 3; 1; 0;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 4; 0.0; 0.0;
T 21; 0.0; 0.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 0.0; 0.0;
T 3; 0.0; 0.0;
#END_LINK
#OUTPUT
FILE demo_x;
FIELD_DISTRIBUTION_M demo_x; 30.0; 2.25; 2.96;
#END_OUTPUT
#END_STEP
#EOFDemo: parallel-plate waveguide (X)
The same example for the X-mode kernel
| Parameter | Value |
|---|---|
| Library section | Training tasks |
| Kernel | PlanarRT X (planarrt_x.exe) |
| Source | TMC Suite, samples/demo_x.tpl |
| Mesh | 200 × 100 nodes, step 1 mm |
| Task time | 3 ns of model time, steps: 1 |
| Run duration | about 1 s on a six-core PC, without field output |
Problem statement
Training example shipped with TMC Suite for the X-mode kernel. The file format and the #TMC_RT_H header are the same for both modes; a separate #TMC_RT_X does not exist.
Theoretical background
These are the author's laboratory tasks and tasks from the demonstration set of the package. TPL Designer reads them the same way as "Open existing": on saving, the author's constant macros expand to numbers, and the meaning of the task does not change.
The same teaching example for the X-mode kernel. The task file starts with the same #TMC_RT_H header as for the H-mode: the language has no separate #TMC_RT_X header, and the kernel is determined by the program that opens the task.
Sample datasheet. The values that TPL Designer computes by formulas for the default parameters.
| Quantity | Value |
|---|---|
| Calculation steps | 1 |
| Shapes / ports | 6 / 1 |
Creating the task file
In release 5.0 the absorber frame of this sample blocks the channel right after the port, so the wave does not enter it. Fix it before writing the file: in the Geometry section delete figure 4 and draw two rectangles of the absorber material instead: x from 2 to 5 mm with y from 2 to 37 mm, and x from 2 to 5 mm with y from 63 to 98 mm. All results on this page were obtained with this fix.
The sample is built into TPL Designer, so there is nothing to download. Follow the steps in order.
- Start TPL Designer. On the start screen, in the Take a sample card, click Open library.
- Choose the Training tasks section on the left and click the Demo: parallel-plate waveguide (X) tile in the gallery. The sample card with its datasheet and parameters opens on the right.

- This sample has no parameters: it is an author's task and opens as it is.
- Click Open in editor. The task opens in the five-section wizard; the section list is on the left.
- Open the Geometry section. The canvas shows what the kernel will compute: metal walls, ports, dielectric or plasma. A green icon marks the active port and a red one the passive port. Double-click an object to open its properties.

- If you want to view the field in FieldView, open the Output section and tick Export topology (.tt file) and Export fields (.ex, .ey, .hz files), option only at the first step. Field output slows the calculation several times, so it is off in the samples unless a task requires it.
- Open the Check section. The left side shows the summary, the right side shows the task file text, and the strip at the bottom reports that there are no issues.

- Click Create task file and choose an empty folder. It will contain these files:
demo_x.tpl.
Running the calculation
- Start PlanarRT X (
planarrt_x.exe). - Click
Open or press Ctrl+Oand choosedemo_x.tplin the folder you created. If the status bar showsStep:1;Error:no, the task was read correctly. - Click
Run or press F5. The kernel computes all task steps (1); on a six-core PC this takes about 1 s. - Wait for "Done" in the status bar.
Viewing the results
Port signals. Click
View output: TMCROS opens with the .t file.

Radiation pattern. Click
View Directional Pattern: TMC_DN opens with the .DAT file. The legend on the right shows the two-dimensional directivity.

Field. If you enabled field output in step 6, click
View field and topology: FieldView opens. It saves animations with the export command.
Results

Field animation
Discussion
The picture is the same as in the H-mode sample: with the frame open at the port, the wave travels along the channel and radiates from its end. This is a convenient check that the X-mode kernel starts. Without the fix the absorber blocked the channel right after the port, and the field stayed at the left boundary.
Task file
TPL Designer shows this text in the Check section. The file is written in the CP1251 encoding.
demo_x.tpl
#TMC_RT_H
! Task generated by TPL Designer.
! Self-contained learning template for the X-mode kernel (tmc_rtx.exe).
! The .tpl format and the #TMC_RT_H signature are identical to the H kernel
! (there is no separate #TMC_RT_X signature), so this same file also opens
! in the H kernel. Geometry: a parallel-plate channel with a left port,
! framed by absorbers. Small grid for a quick run.
! X-mode specific features (moving blocks RECT_MOVE / CIRCLE_MOVE /
! POLYGON_MOVE, the second port INPUT_Y, and dielectric distributions given
! as an expression E(x,y)) are shown below as COMMENTED examples - remove the
! leading '!' on a block to experiment. They are left disabled so the file is
! guaranteed to compute as-is.
! Kernel: tmc_rtx (X-mode)
! ===== Step: FREQ = 30.0 GHz =====
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA 1.0;
TIME 0.; 3.0;
X_MIN 0.0;
X_MAX 200.0;
Y_MIN 0.0;
Y_MAX 100.0;
FREQ 30.0;
#END_PARM
#TOPOLOGY
BLOCK 1; ! shape 1
RECT_STAT METAL; 0.0; 120.0; 39.0; 40.0;
END_B
BLOCK 2; ! shape 2
RECT_STAT METAL; 0.0; 120.0; 60.0; 61.0;
END_B
BLOCK 4; ! shape 4
RECT_STAT ABSORBER; 2.0; 5.0; 2.0; 37.0;
END_B
BLOCK 21;
RECT_STAT ABSORBER; 2.0; 5.0; 63.0; 98.0;
END_B
BLOCK 5; ! shape 5
RECT_STAT ABSORBER; 195.0; 198.0; 2.0; 98.0;
END_B
BLOCK 6; ! shape 6
RECT_STAT ABSORBER; 2.0; 198.0; 2.0; 5.0;
END_B
BLOCK 7; ! shape 7
RECT_STAT ABSORBER; 2.0; 198.0; 95.0; 98.0;
END_B
BLOCK 3; ! port 1 -- ACTIVE
INPUT_X ; 40.0; 60.0; 0; 3; 1; 0;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 4; 0.0; 0.0;
T 21; 0.0; 0.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 0.0; 0.0;
T 3; 0.0; 0.0;
#END_LINK
#OUTPUT
FILE demo_x;
FIELD_DISTRIBUTION_M demo_x; 30.0; 2.25; 2.96;
#END_OUTPUT
#END_STEP
#EOF