Плавный переход: eps формулой
Профиль eps от координат против резкой границы
| Параметр | Значение |
|---|---|
| Раздел библиотеки | Среды, плазма, ЭПР |
| Ядро | PlanarRT H (planarrt_h.exe) |
| Источник | неоднородная среда, профиль формулой |
| Сетка | 180 × 36 узлов, шаг 1 мм |
| Время счёта задания | 30 нс модельного времени, шагов: 32 |
| Длительность прогона | около 20 с на шестиядерном ПК, без вывода поля |
Постановка задачи
Переход из вакуума в плотный диэлектрик. Резкая граница отражает на всех частотах одинаково, а плавный — линейный по длине — профиль тем лучше, чем длиннее переход по сравнению с волной. Профиль задан формулой от x: так в ядро уходит любая неоднородная eps, а на холсте она видна градиентом.
Ядро на первом шаге сохранит посчитанный профиль в файл grad.eps — этот же файл можно потом подключить блоком FILE.
- Один профиль задан формулой от x: так в ядро уходит любая неоднородная eps. Градиент виден и на холсте.
Теоретические сведения
В этой группе среда неоднородна. Плоская волна при нормальном падении задаётся каналом с магнитными стенками: однородное поле распространяется в нём так же, как в свободном пространстве, а задача сводится к границам и слоям. Открытые задачи (рассеяние, линзы) считаются в области с контуром поглотителя, и волна входит через широкий порт слева. Порт плоской волны здесь стоит на границе области, как в микрополосковых образцах, поэтому в задании есть отражение порядка −15…−25 дБ, и результаты глубже этого уровня не показательны. Это свойство постановки, а не ядра.
Резкая граница вакуум — диэлектрик отражает одинаково на всех частотах:
Плавный профиль длиной не меньше волны убирает отражение, так как составляющие от слоёв приходят с разными фазами. Профиль задан формулой от ; так же в ядро уходит любая неоднородная среда.
Паспорт образца. Значения, которые TPL Designer вычисляет по формулам для параметров по умолчанию.
| Величина | Значение |
|---|---|
| Переход | eps от 1 до 6 на длине 60 мм (1 λ на 5 ГГц) |
| Резкая граница, точно | |S11| = -7.5 дБ на всех частотах |
| Плавный профиль | отражение падает с ростом частоты: переход длиннее волны |
| Файл профиля | grad.eps пишется ядром на первом шаге; готовый файл подключают блоком FILE — см. образец «Среда из файла .eps» |
Создание файла задания
Образец уже встроен в TPL Designer: скачивать ничего не нужно. Выполните шаги по порядку.
- Запустите TPL Designer. На стартовом экране в карточке «Взять образец» нажмите «Открыть библиотеку».
- Слева выберите раздел «Среды, плазма, ЭПР» и щёлкните в галерее плитку «Плавный переход: eps формулой». Справа откроется карточка образца с паспортом и параметрами.

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

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

- Нажмите «Создать файл задания» и выберите пустую папку. В ней появятся файлы:
grad.tpl,grad_step.h.
Запуск расчёта
- Запустите программу PlanarRT H (
planarrt_h.exe). - Нажмите
Открыть или Ctrl+Oи выберите файлgrad.tplв созданной папке. Если в строке состояния появилосьШаг:1;Error:no, задание прочитано верно. - Нажмите
Запуск или F5. Ядро посчитает все шаги задания (32), на шестиядерном ПК это занимает около 20 с. - Дождитесь надписи «Готово» в строке состояния.
Ядро дописывает файл
.s, а не перезаписывает его. Перед повторным запуском удалите старый файл.s, иначе старые точки смешаются с новыми.
Просмотр результатов
Матрица рассеяния. Нажмите
Показать S-матрицу: откроется TMCGROUT с кривой первого элемента. Он показывает КСВН; чтобы увидеть модули, нажмите Ctrl+H и выберите «Шкала Y» → «|S|», а другие элементы добавьте через Ctrl+D.

Сигналы на портах. Нажмите
Показать выходной сигнал: откроется TMCROS с файлом .t.

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




Числа расчёта: значения на краях диапазона, в середине и в точке наилучшего согласования.
резкая граница
| Частота, ГГц | |S11|, дБ | |S21|, дБ |
|---|---|---|
| 2,5 | -7,17 | -1,03 |
| 6,5 | -8,2 | -1,07 |
| 9 | -8,26 | -1,14 |
| 10 | -7,58 | -1,16 |
плавный профиль
| Частота, ГГц | |S11|, дБ | |S21|, дБ |
|---|---|---|
| 2,5 | -16,04 | -0,26 |
| 6,5 | -24,28 | -0,22 |
| 8,5 | -30,71 | -0,28 |
| 10 | -23,03 | -0,35 |
Анимация поля
Разбор результатов
Варианты показывают эффект наглядно. У резкой границы держится между −7,2 и −8,3 дБ на всём диапазоне, что сходится с точным −7,5 дБ. Плавный профиль даёт −16 дБ на 2,5 ГГц и −24…−31 дБ на верхних частотах, а прохождение улучшается с −1 дБ до −0,3 дБ. Выигрыш растёт с отношением длины перехода к длине волны, как и должен. Уровни глубже −25 дБ определяются постановкой порта.
Файл задания
Этот текст TPL Designer показывает в разделе «Проверка». Файл записан в кодировке CP1251.
grad.tpl
#TMC_RT_H
! Задание сгенерировано TPL Designer.
! Плавный переход из вакуума в диэлектрик eps = 6: профиль eps формулой против резкой границы.
! Ядро: tmc_rth (H-мода)
! Перед прогоном удалить grad_step.s и grad_taper.s -- дописывается, а не перезаписывается.
#include grad_step.h
! вариант: резкая граница
gradstep1 2.5; grad_step_f2p5; grad_step;
gradstep1 3.0; grad_step_f3; grad_step;
gradstep1 3.5; grad_step_f3p5; grad_step;
gradstep1 4.0; grad_step_f4; grad_step;
gradstep1 4.5; grad_step_f4p5; grad_step;
gradstep1 5.0; grad_step_f5; grad_step;
gradstep1 5.5; grad_step_f5p5; grad_step;
gradstep1 6.0; grad_step_f6; grad_step;
gradstep1 6.5; grad_step_f6p5; grad_step;
gradstep1 7.0; grad_step_f7; grad_step;
gradstep1 7.5; grad_step_f7p5; grad_step;
gradstep1 8.0; grad_step_f8; grad_step;
gradstep1 8.5; grad_step_f8p5; grad_step;
gradstep1 9.0; grad_step_f9; grad_step;
gradstep1 9.5; grad_step_f9p5; grad_step;
gradstep1 10.0; grad_step_f10; grad_step;
! ===== Шаг записан явно: здесь считается профиль eps, дальше берётся из файла =====
! вариант: плавный профиль
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA 1.0;
TIME 0.; 30.0;
X_MIN 0.0;
X_MAX 180.0;
Y_MIN 0.0;
Y_MAX 36.0;
FREQ 2.5;
#END_PARM
#TOPOLOGY
BLOCK 1; ! канал, низ
POLYGON_STAT MAGNETIC;
L 0.0; 3.0;
L 90.0; 3.0;
L 180.0; 3.0;
END_B
BLOCK 2; ! канал, верх
POLYGON_STAT MAGNETIC;
L 0.0; 33.0;
L 90.0; 33.0;
L 180.0; 33.0;
END_B
BLOCK 4; ! плавный профиль — профиль eps по формуле; результат сохраняется в grad.eps
RECT_STAT [grad](1+(5.0)*(x+30.0)/60.0)-1; -30.0; 30.0; -15.0; 15.0;
END_B
BLOCK 5; ! диэлектрик за переходом
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;
END_B
BLOCK 6; ! вход 1 (вакуум) — АКТИВНЫЙ
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;
END_B
BLOCK 7; ! вход 2 (в диэлектрике) — пассивный
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 4; 90.0; 18.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 180.0; 0.0;
#END_LINK
#OUTPUT
FILE grad_taper_f2p5;
SMATRIX grad_taper; 2.5; 22.5; 30.0;
#END_OUTPUT
#END_STEP
! вариант: плавный профиль
gradstep2 3.0; grad_taper_f3; grad_taper;
gradstep2 3.5; grad_taper_f3p5; grad_taper;
gradstep2 4.0; grad_taper_f4; grad_taper;
gradstep2 4.5; grad_taper_f4p5; grad_taper;
gradstep2 5.0; grad_taper_f5; grad_taper;
gradstep2 5.5; grad_taper_f5p5; grad_taper;
gradstep2 6.0; grad_taper_f6; grad_taper;
gradstep2 6.5; grad_taper_f6p5; grad_taper;
gradstep2 7.0; grad_taper_f7; grad_taper;
gradstep2 7.5; grad_taper_f7p5; grad_taper;
gradstep2 8.0; grad_taper_f8; grad_taper;
gradstep2 8.5; grad_taper_f8p5; grad_taper;
gradstep2 9.0; grad_taper_f9; grad_taper;
gradstep2 9.5; grad_taper_f9p5; grad_taper;
gradstep2 10.0; grad_taper_f10; grad_taper;
#EOFgrad_step.h
! ==========================================================================
! grad_step.h — макроопределения шагов расчёта.
! Подключается строкой #include grad_step.h и должен лежать РЯДОМ с .tpl
!
! ДВА бэкслеша в конце строки = "текст макроса продолжается ниже".
! У ПОСЛЕДНЕЙ строки макроса переноса НЕТ — это признак конца.
! ==========================================================================
! вариант: резкая граница
#define gradstep1 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
ANGLE_UNIT radian;\\
FREQ_UNIT GHz;\\
LONG_UNIT mm;\\
TIME_UNIT ns;\\
DELTA 1.0;\\
TIME 0.; 30.0;\\
X_MIN 0.0;\\
X_MAX 180.0;\\
Y_MIN 0.0;\\
Y_MAX 36.0;\\
FREQ Freq__;\\
#END_PARM\\
#TOPOLOGY\\
BLOCK 1;\\ ! канал, низ
POLYGON_STAT MAGNETIC;\\
L 0.0; 3.0;\\
L 90.0; 3.0;\\
L 180.0; 3.0;\\
END_B\\
BLOCK 2;\\ ! канал, верх
POLYGON_STAT MAGNETIC;\\
L 0.0; 33.0;\\
L 90.0; 33.0;\\
L 180.0; 33.0;\\
END_B\\
BLOCK 3;\\ ! резкая граница
RECT_STAT 5.0; 60.0; 120.0; 3.0; 33.0;\\
END_B\\
BLOCK 5;\\ ! диэлектрик за переходом
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;\\
END_B\\
BLOCK 6;\\ ! вход 1 (вакуум) — АКТИВНЫЙ
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;\\
END_B\\
BLOCK 7;\\ ! вход 2 (в диэлектрике) — пассивный
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;\\
END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
T 1; 0.0; 0.0;\\
T 2; 0.0; 0.0;\\
T 3; 0.0; 0.0;\\
T 5; 0.0; 0.0;\\
T 6; 0.0; 0.0;\\
T 7; 180.0; 0.0;\\
#END_LINK\\
#OUTPUT\\
FILE Tfile__;\\
SMATRIX Sfile__; Freq__; 22.5; 30.0;\\
#END_OUTPUT\\
#END_STEP
! вариант: плавный профиль
#define gradstep2 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
ANGLE_UNIT radian;\\
FREQ_UNIT GHz;\\
LONG_UNIT mm;\\
TIME_UNIT ns;\\
DELTA 1.0;\\
TIME 0.; 30.0;\\
X_MIN 0.0;\\
X_MAX 180.0;\\
Y_MIN 0.0;\\
Y_MAX 36.0;\\
FREQ Freq__;\\
#END_PARM\\
#TOPOLOGY\\
BLOCK 1;\\ ! канал, низ
POLYGON_STAT MAGNETIC;\\
L 0.0; 3.0;\\
L 90.0; 3.0;\\
L 180.0; 3.0;\\
END_B\\
BLOCK 2;\\ ! канал, верх
POLYGON_STAT MAGNETIC;\\
L 0.0; 33.0;\\
L 90.0; 33.0;\\
L 180.0; 33.0;\\
END_B\\
BLOCK 4;\\ ! плавный профиль — тот же профиль eps; файл уже записан на первом шаге
RECT_STAT (1+(5.0)*(x+30.0)/60.0)-1; -30.0; 30.0; -15.0; 15.0;\\
END_B\\
BLOCK 5;\\ ! диэлектрик за переходом
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;\\
END_B\\
BLOCK 6;\\ ! вход 1 (вакуум) — АКТИВНЫЙ
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;\\
END_B\\
BLOCK 7;\\ ! вход 2 (в диэлектрике) — пассивный
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;\\
END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
T 1; 0.0; 0.0;\\
T 2; 0.0; 0.0;\\
T 4; 90.0; 18.0;\\
T 5; 0.0; 0.0;\\
T 6; 0.0; 0.0;\\
T 7; 180.0; 0.0;\\
#END_LINK\\
#OUTPUT\\
FILE Tfile__;\\
SMATRIX Sfile__; Freq__; 22.5; 30.0;\\
#END_OUTPUT\\
#END_STEPSmooth transition: eps by formula
An eps profile of the coordinates versus a sharp boundary
| Parameter | Value |
|---|---|
| Library section | Media, plasma, RCS |
| Kernel | PlanarRT H (planarrt_h.exe) |
| Source | inhomogeneous medium, profile by formula |
| Mesh | 180 × 36 nodes, step 1 mm |
| Task time | 30 ns of model time, steps: 32 |
| Run duration | about 20 s on a six-core PC, without field output |
Problem statement
A transition from vacuum to a dense dielectric. A sharp boundary reflects equally at all frequencies, while a smooth profile, linear along the length, is the better the longer the transition is compared with the wavelength. The profile is given by a formula of x: this is how any inhomogeneous eps is passed to the kernel, and on the canvas it is shown as a gradient.
At the first step the kernel saves the computed profile to the file grad.eps; the same file can later be connected by a FILE block.
- One profile is given by a formula of x: this is how any inhomogeneous eps is passed to the kernel. The gradient is also visible on the canvas.
Theoretical background
The medium in this group is inhomogeneous. A plane wave at normal incidence is set up by a channel with magnetic walls: a uniform field propagates in it exactly as in free space, and the problem reduces to boundaries and layers. Open problems (scattering, lenses) are solved in a region bounded by an absorber contour, and the wave enters through a wide port on the left. The plane-wave port sits on the region boundary here, as in the microstrip samples, so the task has a reflection of about −15…−25 dB, and results below that level are not meaningful. This is a property of the setup, not of the kernel.
A sharp vacuum–dielectric boundary reflects equally at all frequencies:
A smooth profile no shorter than a wavelength removes the reflection, since the contributions of the layers arrive with different phases. The profile is given by a formula in ; any inhomogeneous medium reaches the kernel the same way.
Sample datasheet. The values that TPL Designer computes by formulas for the default parameters.
| Quantity | Value |
|---|---|
| Transition | eps from 1 to 6 over a length of 60 mm (1 lambda at 5 GHz) |
| Sharp boundary, exact | |S11| = -7.5 dB at all frequencies |
| Smooth profile | the reflection falls as the frequency grows: the transition is longer than the wavelength |
| Profile file | the kernel writes grad.eps at the first step; a ready file is connected by a FILE block, see the sample "Medium from an .eps file" |
Creating the task file
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 Media, plasma, RCS section on the left and click the Smooth transition: eps by formula tile in the gallery. The sample card with its datasheet and parameters opens on the right.

- Keep the default parameters: all the numbers on this page were obtained for them. Changed values can be reset with Restore defaults.
- 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:
grad.tpl,grad_step.h.
Running the calculation
- Start PlanarRT H (
planarrt_h.exe). - Click
Open or press Ctrl+Oand choosegrad.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 (32); on a six-core PC this takes about 20 s. - Wait for "Done" in the status bar.
The kernel appends to the
.sfile instead of overwriting it. Delete the old.sfile before a repeated run, or old points will mix with new ones.
Viewing the results
Scattering matrix. Click
View S-matrix: TMCGROUT opens with the curve of the first element. It shows VSWR; to see magnitudes press Ctrl+H and choose "Y-scale" → "|S|", and add other elements with Ctrl+D.

Port signals. Click
View output: TMCROS opens with the .t file.

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




Computed numbers: values at the range edges, mid-range and at the best match.
sharp boundary
| Frequency, GHz | |S11|, dB | |S21|, dB |
|---|---|---|
| 2.5 | -7.17 | -1.03 |
| 6.5 | -8.2 | -1.07 |
| 9 | -8.26 | -1.14 |
| 10 | -7.58 | -1.16 |
smooth profile
| Frequency, GHz | |S11|, dB | |S21|, dB |
|---|---|---|
| 2.5 | -16.04 | -0.26 |
| 6.5 | -24.28 | -0.22 |
| 8.5 | -30.71 | -0.28 |
| 10 | -23.03 | -0.35 |
Field animation
Discussion
The variants show the effect clearly. With the sharp boundary stays between −7.2 and −8.3 dB over the whole range, in agreement with the exact −7.5 dB. The smooth profile gives −16 dB at 2.5 GHz and −24…−31 dB at the upper frequencies, and transmission improves from −1 dB to −0.3 dB. The gain grows with the ratio of taper length to wavelength, as it should. Levels below −25 dB are set by the port setup.
Task file
TPL Designer shows this text in the Check section. The file is written in the CP1251 encoding.
grad.tpl
#TMC_RT_H
! Task generated by TPL Designer.
! Smooth transition from vacuum to dielectric eps = 6: an eps profile given by a formula versus a sharp boundary.
! Kernel: tmc_rth (H-mode)
! Delete grad_step.s and grad_taper.s before the run -- it is appended to, not overwritten.
#include grad_step.h
! variant: sharp boundary
gradstep1 2.5; grad_step_f2p5; grad_step;
gradstep1 3.0; grad_step_f3; grad_step;
gradstep1 3.5; grad_step_f3p5; grad_step;
gradstep1 4.0; grad_step_f4; grad_step;
gradstep1 4.5; grad_step_f4p5; grad_step;
gradstep1 5.0; grad_step_f5; grad_step;
gradstep1 5.5; grad_step_f5p5; grad_step;
gradstep1 6.0; grad_step_f6; grad_step;
gradstep1 6.5; grad_step_f6p5; grad_step;
gradstep1 7.0; grad_step_f7; grad_step;
gradstep1 7.5; grad_step_f7p5; grad_step;
gradstep1 8.0; grad_step_f8; grad_step;
gradstep1 8.5; grad_step_f8p5; grad_step;
gradstep1 9.0; grad_step_f9; grad_step;
gradstep1 9.5; grad_step_f9p5; grad_step;
gradstep1 10.0; grad_step_f10; grad_step;
! ===== Step written explicitly: the eps profile is computed here, later it is taken from the file =====
! variant: smooth profile
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA 1.0;
TIME 0.; 30.0;
X_MIN 0.0;
X_MAX 180.0;
Y_MIN 0.0;
Y_MAX 36.0;
FREQ 2.5;
#END_PARM
#TOPOLOGY
BLOCK 1; ! channel, bottom
POLYGON_STAT MAGNETIC;
L 0.0; 3.0;
L 90.0; 3.0;
L 180.0; 3.0;
END_B
BLOCK 2; ! channel, top
POLYGON_STAT MAGNETIC;
L 0.0; 33.0;
L 90.0; 33.0;
L 180.0; 33.0;
END_B
BLOCK 4;! smooth profile -- eps profile by formula; the result is saved to grad.eps
RECT_STAT [grad](1+(5.0)*(x+30.0)/60.0)-1; -30.0; 30.0; -15.0; 15.0;
END_B
BLOCK 5; ! dielectric beyond the transition
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;
END_B
BLOCK 6; ! port 1 (vacuum) -- ACTIVE
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;
END_B
BLOCK 7; ! port 2 (in the dielectric) -- passive
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 4; 90.0; 18.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 180.0; 0.0;
#END_LINK
#OUTPUT
FILE grad_taper_f2p5;
SMATRIX grad_taper; 2.5; 22.5; 30.0;
#END_OUTPUT
#END_STEP
! variant: smooth profile
gradstep2 3.0; grad_taper_f3; grad_taper;
gradstep2 3.5; grad_taper_f3p5; grad_taper;
gradstep2 4.0; grad_taper_f4; grad_taper;
gradstep2 4.5; grad_taper_f4p5; grad_taper;
gradstep2 5.0; grad_taper_f5; grad_taper;
gradstep2 5.5; grad_taper_f5p5; grad_taper;
gradstep2 6.0; grad_taper_f6; grad_taper;
gradstep2 6.5; grad_taper_f6p5; grad_taper;
gradstep2 7.0; grad_taper_f7; grad_taper;
gradstep2 7.5; grad_taper_f7p5; grad_taper;
gradstep2 8.0; grad_taper_f8; grad_taper;
gradstep2 8.5; grad_taper_f8p5; grad_taper;
gradstep2 9.0; grad_taper_f9; grad_taper;
gradstep2 9.5; grad_taper_f9p5; grad_taper;
gradstep2 10.0; grad_taper_f10; grad_taper;
#EOFgrad_step.h
! ==========================================================================
! grad_step.h -- macro definitions of the computation steps.
! Included with the line #include grad_step.h and must lie NEXT TO the .tpl
!
! TWO backslashes at the end of a line = "the macro text continues below".
! The LAST line of the macro has NO continuation -- that marks the end.
! ==========================================================================
! variant: sharp boundary
#define gradstep1 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
ANGLE_UNIT radian;\\
FREQ_UNIT GHz;\\
LONG_UNIT mm;\\
TIME_UNIT ns;\\
DELTA 1.0;\\
TIME 0.; 30.0;\\
X_MIN 0.0;\\
X_MAX 180.0;\\
Y_MIN 0.0;\\
Y_MAX 36.0;\\
FREQ Freq__;\\
#END_PARM\\
#TOPOLOGY\\
BLOCK 1;\\ ! channel, bottom
POLYGON_STAT MAGNETIC;\\
L 0.0; 3.0;\\
L 90.0; 3.0;\\
L 180.0; 3.0;\\
END_B\\
BLOCK 2;\\ ! channel, top
POLYGON_STAT MAGNETIC;\\
L 0.0; 33.0;\\
L 90.0; 33.0;\\
L 180.0; 33.0;\\
END_B\\
BLOCK 3;\\ ! sharp boundary
RECT_STAT 5.0; 60.0; 120.0; 3.0; 33.0;\\
END_B\\
BLOCK 5;\\ ! dielectric beyond the transition
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;\\
END_B\\
BLOCK 6;\\ ! port 1 (vacuum) -- ACTIVE
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;\\
END_B\\
BLOCK 7;\\ ! port 2 (in the dielectric) -- passive
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;\\
END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
T 1; 0.0; 0.0;\\
T 2; 0.0; 0.0;\\
T 3; 0.0; 0.0;\\
T 5; 0.0; 0.0;\\
T 6; 0.0; 0.0;\\
T 7; 180.0; 0.0;\\
#END_LINK\\
#OUTPUT\\
FILE Tfile__;\\
SMATRIX Sfile__; Freq__; 22.5; 30.0;\\
#END_OUTPUT\\
#END_STEP
! variant: smooth profile
#define gradstep2 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
ANGLE_UNIT radian;\\
FREQ_UNIT GHz;\\
LONG_UNIT mm;\\
TIME_UNIT ns;\\
DELTA 1.0;\\
TIME 0.; 30.0;\\
X_MIN 0.0;\\
X_MAX 180.0;\\
Y_MIN 0.0;\\
Y_MAX 36.0;\\
FREQ Freq__;\\
#END_PARM\\
#TOPOLOGY\\
BLOCK 1;\\ ! channel, bottom
POLYGON_STAT MAGNETIC;\\
L 0.0; 3.0;\\
L 90.0; 3.0;\\
L 180.0; 3.0;\\
END_B\\
BLOCK 2;\\ ! channel, top
POLYGON_STAT MAGNETIC;\\
L 0.0; 33.0;\\
L 90.0; 33.0;\\
L 180.0; 33.0;\\
END_B\\
BLOCK 4;\\ ! smooth profile -- the same eps profile; the file was already written at the first step
RECT_STAT (1+(5.0)*(x+30.0)/60.0)-1; -30.0; 30.0; -15.0; 15.0;\\
END_B\\
BLOCK 5;\\ ! dielectric beyond the transition
RECT_STAT 5.0; 120.0; 180.0; 3.0; 33.0;\\
END_B\\
BLOCK 6;\\ ! port 1 (vacuum) -- ACTIVE
INPUT_X MAGNETIC; 3.0; 33.0; 0; 30; 1; 0;\\
END_B\\
BLOCK 7;\\ ! port 2 (in the dielectric) -- passive
INPUT_X MAGNETIC; 3.0; 33.0; 60; 90; 0; 0; 5.0;\\
END_B\\
#END_TOPOLOGY\\
#LINK_LIST\\
T 1; 0.0; 0.0;\\
T 2; 0.0; 0.0;\\
T 4; 90.0; 18.0;\\
T 5; 0.0; 0.0;\\
T 6; 0.0; 0.0;\\
T 7; 180.0; 0.0;\\
#END_LINK\\
#OUTPUT\\
FILE Tfile__;\\
SMATRIX Sfile__; Freq__; 22.5; 30.0;\\
#END_OUTPUT\\
#END_STEP