Ступенька по ширине

Стык двух волноводов разной ширины

Параметр Значение
Раздел библиотеки Волноводы и узлы
Ядро PlanarRT H (planarrt_h.exe)
Источник EIA RS-261, IEC 60153-2, ГОСТ 20900-75
Сетка 258 × 46 узлов, шаг 0,5715 мм
Время счёта задания 20 нс модельного времени, шагов: 42
Длительность прогона около 37 с на шестиядерном ПК, без вывода поля

Постановка задачи

Симметричный стык двух волноводов разной ширины. Отсечки у половин разные, поэтому свип идёт только там, где обе половины одномодовые: программа вычисляет эту полосу сама. Оба входа возбуждаются по очереди — получается полная матрица 2x2.

  • Возбуждаются оба входа по очереди — в .s полная матрица 2x2. Входы разной ширины, поэтому S11 и S22 разные.

Теоретические сведения

В прямоугольном волноводе шириной a основная волна H10 не зависит от координаты вдоль узкой стенки, поэтому задача двумерна и решается в плоскости H ядром PlanarRT H. Поле существует выше критической частоты, а длина волны в волноводе и волновое сопротивление зависят от частоты:

fc=c2a,λg=λ1−(fc/f)2,ZH=η01−(fc/f)2

Результат расчёта — матрица рассеяния Sij=bi/aj, где aj и bi — амплитуды падающей и отражённой волн на входах. Для устройства без потерь столбец матрицы нормирован: ∑i|Sij|2=1. Это первая проверка любого волноводного расчёта.

Стык двух волноводов разной ширины a1=22,86 мм и a2=19,43 мм имеет разные критические частоты (6,557 и 7,714 ГГц), поэтому расчёт ведётся только в полосе 8,49–12,4 ГГц, где обе половины одномодовые. В первом приближении стык — это скачок волнового сопротивления, а высшие волны у ступеньки дают дополнительную реактивность.

Паспорт образца. Значения, которые TPL Designer вычисляет по формулам для параметров по умолчанию.

Величина Значение
Стандарт WR-90 / R100 (EIA / IEC)
Сечение a x b 22.86 x 10.16 мм
Рабочая полоса 8.2 - 12.4 ГГц
Отсечка H10 / H20 6.557 / 13.11 ГГц
Ширины a1 -> a2 22.86 -> 19.431 мм
Отсечки H10 6.557 / 7.714 ГГц
Полоса расчёта 8.49 - 12.4 ГГц (обе половины одномодовые)

Создание файла задания

Образец уже встроен в TPL Designer: скачивать ничего не нужно. Выполните шаги по порядку.

  1. Запустите TPL Designer. На стартовом экране в карточке «Взять образец» нажмите «Открыть библиотеку».
  2. Слева выберите раздел «Волноводы и узлы» и щёлкните в галерее плитку «Ступенька по ширине». Справа откроется карточка образца с паспортом и параметрами.
Карточка образца в библиотеке TPL Designer
Карточка образца в библиотеке TPL Designer
  1. Параметры оставьте по умолчанию: все числа на этой странице получены именно для них. Изменённые значения можно сбросить кнопкой «Вернуть умолчания».
  2. Нажмите «Открыть в редакторе». Задание откроется в мастере из пяти разделов, список которых находится слева.
  3. Откройте раздел «Геометрия». На холсте показано то, что посчитает ядро: металлические стенки, порты, диэлектрик или плазма. Зелёный значок отмечает активный порт, красный — пассивный. Двойной щелчок по объекту откроет его свойства.
Раздел «Геометрия» мастера TPL Designer
Раздел «Геометрия» мастера TPL Designer
  1. Если хотите посмотреть поле в FieldView, откройте раздел «Вывод данных» и отметьте «Выгружать топологию (файл .tt)» и «Выгружать поля (файлы .ex, .ey, .hz)», вариант «только на первом шаге». Запись поля замедляет счёт в разы, поэтому в образцах она выключена, если задание не требует её само.
  2. Откройте раздел «Проверка». Слева показана сводка расчёта, справа текст файла задания, а полоса внизу сообщает, что замечаний нет.
Раздел «Проверка» мастера TPL Designer
Раздел «Проверка» мастера TPL Designer
  1. Нажмите «Создать файл задания» и выберите пустую папку. В ней появятся файлы: step.tpl, step_step.h.

Запуск расчёта

  1. Запустите программу PlanarRT H (planarrt_h.exe).
  2. Нажмите Открыть Открыть или Ctrl+O и выберите файл step.tpl в созданной папке. Если в строке состояния появилось Шаг:1;Error:no, задание прочитано верно.
  3. Нажмите Запуск Запуск или F5. Ядро посчитает все шаги задания (42), на шестиядерном ПК это занимает около 37 с.
  4. Дождитесь надписи «Готово» в строке состояния.

Ядро дописывает файл .s, а не перезаписывает его. Перед повторным запуском удалите старый файл .s, иначе старые точки смешаются с новыми.

Просмотр результатов

Матрица рассеяния. Нажмите Показать S-матрицу Показать S-матрицу: откроется TMCGROUT с кривой первого элемента. Он показывает КСВН; чтобы увидеть модули, нажмите Ctrl+H и выберите «Шкала Y» → «|S|», а другие элементы добавьте через Ctrl+D.

Окно TMCGROUT сразу после открытия файла .s
Окно TMCGROUT сразу после открытия файла .s

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

Окно TMCROS с сигналом на порту
Окно TMCROS с сигналом на порту

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

Результаты

Частотная характеристика: модули элементов матрицы рассеяния, рассчитанные ядром
Частотная характеристика: модули элементов матрицы рассеяния, рассчитанные ядром
Развёрнутая фаза прохождения S21
Развёрнутая фаза прохождения S21
Баланс мощности: сумма квадратов модулей первого столбца матрицы
Баланс мощности: сумма квадратов модулей первого столбца матрицы
Сигналы на портах во времени
Сигналы на портах во времени

Числа расчёта: значения на краях диапазона, в середине и в точке наилучшего согласования.

Частота, ГГц |S11|, дБ |S21|, дБ |S12|, дБ |S22|, дБ
8,49 -13,71 -0,19 -0,19 -13,7
10,44 -22,89 -0,02 -0,02 -22,89
12,4 -27,89 -0,01 -0,01 -27,88

Анимация поля

Поле, рассчитанное ядром на частоте 10,445 ГГц: 320 кадров через 5 тактов, до 2,25 нс. Шкала «Волна», как в FieldView

Разбор результатов

Отражение убывает от −13,7 дБ на нижней границе до −27,9 дБ на верхней: чем дальше от отсечки узкого плеча, тем ближе волновые сопротивления половин. |S21| при этом не хуже −0,2 дБ. Оба входа возбуждаются по очереди, поэтому в файле .s полная матрица 2×2. Её взаимность видна на графике: |S12| и |S21| совпадают. Кривые |S11| и |S22| здесь тоже совпадают, как и должно быть у стыка без потерь.

Файл задания

Этот текст TPL Designer показывает в разделе «Проверка». Файл записан в кодировке CP1251.

step.tpl
#TMC_RT_H
! Задание сгенерировано TPL Designer.
! Ступенька по ширине волновода. Волновод WR-90 / R100, a = 22.86 мм, H10.
! Ядро: tmc_rth (H-мода)
! Перед прогоном удалить step.s -- дописывается, а не перезаписывается.

#include step_step.h

! возбуждён вход 1
stepstep1 8.49; step_p1_f8p49; step;
stepstep1 8.686; step_p1_f8p686; step;
stepstep1 8.881; step_p1_f8p881; step;
stepstep1 9.077; step_p1_f9p077; step;
stepstep1 9.272; step_p1_f9p272; step;
stepstep1 9.468; step_p1_f9p468; step;
stepstep1 9.663; step_p1_f9p663; step;
stepstep1 9.859; step_p1_f9p859; step;
stepstep1 10.054; step_p1_f10p054; step;
stepstep1 10.25; step_p1_f10p25; step;
stepstep1 10.445; step_p1_f10p445; step;
stepstep1 10.641; step_p1_f10p641; step;
stepstep1 10.836; step_p1_f10p836; step;
stepstep1 11.032; step_p1_f11p032; step;
stepstep1 11.227; step_p1_f11p227; step;
stepstep1 11.423; step_p1_f11p423; step;
stepstep1 11.618; step_p1_f11p618; step;
stepstep1 11.814; step_p1_f11p814; step;
stepstep1 12.009; step_p1_f12p009; step;
stepstep1 12.205; step_p1_f12p205; step;
stepstep1 12.4; step_p1_f12p4; step;

! возбуждён вход 2
stepstep2 8.49; step_p2_f8p49; step;
stepstep2 8.686; step_p2_f8p686; step;
stepstep2 8.881; step_p2_f8p881; step;
stepstep2 9.077; step_p2_f9p077; step;
stepstep2 9.272; step_p2_f9p272; step;
stepstep2 9.468; step_p2_f9p468; step;
stepstep2 9.663; step_p2_f9p663; step;
stepstep2 9.859; step_p2_f9p859; step;
stepstep2 10.054; step_p2_f10p054; step;
stepstep2 10.25; step_p2_f10p25; step;
stepstep2 10.445; step_p2_f10p445; step;
stepstep2 10.641; step_p2_f10p641; step;
stepstep2 10.836; step_p2_f10p836; step;
stepstep2 11.032; step_p2_f11p032; step;
stepstep2 11.227; step_p2_f11p227; step;
stepstep2 11.423; step_p2_f11p423; step;
stepstep2 11.618; step_p2_f11p618; step;
stepstep2 11.814; step_p2_f11p814; step;
stepstep2 12.009; step_p2_f12p009; step;
stepstep2 12.205; step_p2_f12p205; step;
stepstep2 12.4; step_p2_f12p4; step;

#EOF
step_step.h
! ==========================================================================
! step_step.h — макроопределения шагов расчёта.
! Подключается строкой  #include step_step.h  и должен лежать РЯДОМ с .tpl
!
! ДВА бэкслеша в конце строки = "текст макроса продолжается ниже".
! У ПОСЛЕДНЕЙ строки макроса переноса НЕТ — это признак конца.
! ==========================================================================
! возбуждён вход 1
#define stepstep1 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT  GHz;\\
 LONG_UNIT  mm;\\
 TIME_UNIT  ns;\\
 DELTA  0.5715;\\
 TIME   0.; 20.0;\\
 X_MIN  0.0;\\
 X_MAX  147.447;\\
 Y_MIN  0.0;\\
 Y_MAX  26.289;\\
 FREQ   Freq__;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\   ! нижняя стенка
  POLYGON_STAT METAL;\\
   L 0.0; 1.7145;\\
   L 73.7235; 1.7145;\\
   L 73.7235; 3.429;\\
   L 147.447; 3.429;\\
 END_B\\
 BLOCK 2;\\   ! верхняя стенка
  POLYGON_STAT METAL;\\
   L 0.0; 24.5745;\\
   L 73.7235; 24.5745;\\
   L 73.7235; 22.86;\\
   L 147.447; 22.86;\\
 END_B\\
 BLOCK 3;\\   ! вход 1 (a1) — АКТИВНЫЙ
  INPUT_X ; 1.7145; 24.5745; 0; 20; 1; 0;\\
 END_B\\
 BLOCK 4;\\   ! вход 2 (a2) — пассивный
  INPUT_X ; 3.429; 22.86; 40; 60; 0; 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 4; 147.447; 0.0;\\
#END_LINK\\
#OUTPUT\\
 FILE Tfile__;\\
 SMATRIX Sfile__; Freq__; 15.0; 20.0;\\
#END_OUTPUT\\
#END_STEP

! возбуждён вход 2
#define stepstep2 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT  GHz;\\
 LONG_UNIT  mm;\\
 TIME_UNIT  ns;\\
 DELTA  0.5715;\\
 TIME   0.; 20.0;\\
 X_MIN  0.0;\\
 X_MAX  147.447;\\
 Y_MIN  0.0;\\
 Y_MAX  26.289;\\
 FREQ   Freq__;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\   ! нижняя стенка
  POLYGON_STAT METAL;\\
   L 0.0; 1.7145;\\
   L 73.7235; 1.7145;\\
   L 73.7235; 3.429;\\
   L 147.447; 3.429;\\
 END_B\\
 BLOCK 2;\\   ! верхняя стенка
  POLYGON_STAT METAL;\\
   L 0.0; 24.5745;\\
   L 73.7235; 24.5745;\\
   L 73.7235; 22.86;\\
   L 147.447; 22.86;\\
 END_B\\
 BLOCK 3;\\   ! вход 1 (a1) — пассивный
  INPUT_X ; 1.7145; 24.5745; 40; 60; 0; 0;\\
 END_B\\
 BLOCK 4;\\   ! вход 2 (a2) — АКТИВНЫЙ
  INPUT_X ; 3.429; 22.86; 0; 20; 1; 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 4; 147.447; 0.0;\\
#END_LINK\\
#OUTPUT\\
 FILE Tfile__;\\
 SMATRIX Sfile__; Freq__; 15.0; 20.0;\\
#END_OUTPUT\\
#END_STEP

Step in width

Junction of two waveguides of different width

Parameter Value
Library section Waveguides and components
Kernel PlanarRT H (planarrt_h.exe)
Source EIA RS-261, IEC 60153-2, GOST 20900-75
Mesh 258 × 46 nodes, step 0.5715 mm
Task time 20 ns of model time, steps: 42
Run duration about 37 s on a six-core PC, without field output

Problem statement

A symmetric junction of two waveguides of different width. The halves have different cutoffs, so the sweep covers only the band where both halves are single-mode; the program computes this band itself. Both ports are excited in turn, giving the full 2x2 matrix.

  • Both ports are excited in turn, so the .s file holds the full 2x2 matrix. The ports have different widths, so S11 and S22 differ.

Theoretical background

In a rectangular waveguide of width a the dominant H10 wave does not vary along the narrow wall, so the problem is two-dimensional and is solved in the H-plane by the PlanarRT H kernel. The field propagates above the cutoff frequency, and the guide wavelength and the wave impedance depend on frequency:

fc=c2a,λg=λ1−(fc/f)2,ZH=η01−(fc/f)2

The result of the calculation is the scattering matrix Sij=bi/aj, where aj and bi are the amplitudes of the incident and outgoing waves at the ports. For a lossless device each column is normalised: ∑i|Sij|2=1. This is the first check of any waveguide calculation.

The junction of two waveguides of widths a1=22.86 mm and a2=19.43 mm has different cutoff frequencies (6.557 and 7.714 GHz), so the calculation covers only the 8.49–12.4 GHz band where both halves are single-mode. To a first approximation the junction is a jump in wave impedance, and higher-order modes at the step add a reactance.

Sample datasheet. The values that TPL Designer computes by formulas for the default parameters.

Quantity Value
Standard WR-90 / R100 (EIA / IEC)
Cross-section a x b 22.86 x 10.16 mm
Operating band 8.2 - 12.4 GHz
Cutoff H10 / H20 6.557 / 13.11 GHz
Widths a1 -> a2 22.86 -> 19.431 mm
Cutoffs H10 6.557 / 7.714 GHz
Calculation band 8.49 - 12.4 GHz (both halves single-mode)

Creating the task file

The sample is built into TPL Designer, so there is nothing to download. Follow the steps in order.

  1. Start TPL Designer. On the start screen, in the Take a sample card, click Open library.
  2. Choose the Waveguides and components section on the left and click the Step in width tile in the gallery. The sample card with its datasheet and parameters opens on the right.
The sample card in the TPL Designer library
The sample card in the TPL Designer library
  1. Keep the default parameters: all the numbers on this page were obtained for them. Changed values can be reset with Restore defaults.
  2. Click Open in editor. The task opens in the five-section wizard; the section list is on the left.
  3. 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.
The Geometry section of the TPL Designer wizard
The Geometry section of the TPL Designer wizard
  1. 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.
  2. 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.
The Check section of the TPL Designer wizard
The Check section of the TPL Designer wizard
  1. Click Create task file and choose an empty folder. It will contain these files: step.tpl, step_step.h.

Running the calculation

  1. Start PlanarRT H (planarrt_h.exe).
  2. Click Open Open or press Ctrl+O and choose step.tpl in the folder you created. If the status bar shows Step:1;Error:no, the task was read correctly.
  3. Click Run Run or press F5. The kernel computes all task steps (42); on a six-core PC this takes about 37 s.
  4. Wait for "Done" in the status bar.

The kernel appends to the .s file instead of overwriting it. Delete the old .s file before a repeated run, or old points will mix with new ones.

Viewing the results

Scattering matrix. Click View S-matrix 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.

The TMCGROUT window right after opening the .s file
The TMCGROUT window right after opening the .s file

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

The TMCROS window with a port signal
The TMCROS window with a port signal

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

Results

Frequency response: magnitudes of the scattering-matrix elements computed by the kernel
Frequency response: magnitudes of the scattering-matrix elements computed by the kernel
Unwrapped transmission phase S21
Unwrapped transmission phase S21
Power balance: sum of squared magnitudes of the first matrix column
Power balance: sum of squared magnitudes of the first matrix column
Port signals over time
Port signals over time

Computed numbers: values at the range edges, mid-range and at the best match.

Frequency, GHz |S11|, dB |S21|, dB |S12|, dB |S22|, dB
8.49 -13.71 -0.19 -0.19 -13.7
10.44 -22.89 -0.02 -0.02 -22.89
12.4 -27.89 -0.01 -0.01 -27.88

Field animation

Field computed by the kernel at 10.445 GHz: 320 frames every 5 ticks, up to 2.25 ns. The Wave scale, as in FieldView

Discussion

Reflection falls from −13.7 dB at the lower band edge to −27.9 dB at the upper edge: the farther from the cutoff of the narrow arm, the closer the wave impedances of the two halves. |S21| is no worse than −0.2 dB. Both ports are excited in turn, so the .s file holds the full 2×2 matrix. Its reciprocity is visible on the plot: |S12| and |S21| coincide. The curves |S11| and |S22| coincide here as well, as they should for a lossless junction.

Task file

TPL Designer shows this text in the Check section. The file is written in the CP1251 encoding.

step.tpl
#TMC_RT_H
! Task generated by TPL Designer.
! Step in waveguide width. Waveguide WR-90 / R100, a = 22.86 mm, H10.
! Kernel: tmc_rth (H-mode)
! Delete step.s before the run -- it is appended to, not overwritten.

#include step_step.h

! excited port 1
stepstep1 8.49; step_p1_f8p49; step;
stepstep1 8.686; step_p1_f8p686; step;
stepstep1 8.881; step_p1_f8p881; step;
stepstep1 9.077; step_p1_f9p077; step;
stepstep1 9.272; step_p1_f9p272; step;
stepstep1 9.468; step_p1_f9p468; step;
stepstep1 9.663; step_p1_f9p663; step;
stepstep1 9.859; step_p1_f9p859; step;
stepstep1 10.054; step_p1_f10p054; step;
stepstep1 10.25; step_p1_f10p25; step;
stepstep1 10.445; step_p1_f10p445; step;
stepstep1 10.641; step_p1_f10p641; step;
stepstep1 10.836; step_p1_f10p836; step;
stepstep1 11.032; step_p1_f11p032; step;
stepstep1 11.227; step_p1_f11p227; step;
stepstep1 11.423; step_p1_f11p423; step;
stepstep1 11.618; step_p1_f11p618; step;
stepstep1 11.814; step_p1_f11p814; step;
stepstep1 12.009; step_p1_f12p009; step;
stepstep1 12.205; step_p1_f12p205; step;
stepstep1 12.4; step_p1_f12p4; step;

! excited port 2
stepstep2 8.49; step_p2_f8p49; step;
stepstep2 8.686; step_p2_f8p686; step;
stepstep2 8.881; step_p2_f8p881; step;
stepstep2 9.077; step_p2_f9p077; step;
stepstep2 9.272; step_p2_f9p272; step;
stepstep2 9.468; step_p2_f9p468; step;
stepstep2 9.663; step_p2_f9p663; step;
stepstep2 9.859; step_p2_f9p859; step;
stepstep2 10.054; step_p2_f10p054; step;
stepstep2 10.25; step_p2_f10p25; step;
stepstep2 10.445; step_p2_f10p445; step;
stepstep2 10.641; step_p2_f10p641; step;
stepstep2 10.836; step_p2_f10p836; step;
stepstep2 11.032; step_p2_f11p032; step;
stepstep2 11.227; step_p2_f11p227; step;
stepstep2 11.423; step_p2_f11p423; step;
stepstep2 11.618; step_p2_f11p618; step;
stepstep2 11.814; step_p2_f11p814; step;
stepstep2 12.009; step_p2_f12p009; step;
stepstep2 12.205; step_p2_f12p205; step;
stepstep2 12.4; step_p2_f12p4; step;

#EOF
step_step.h
! ==========================================================================
! step_step.h -- macro definitions of the computation steps.
! Included with the line  #include step_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.
! ==========================================================================
! excited port 1
#define stepstep1 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT  GHz;\\
 LONG_UNIT  mm;\\
 TIME_UNIT  ns;\\
 DELTA  0.5715;\\
 TIME   0.; 20.0;\\
 X_MIN  0.0;\\
 X_MAX  147.447;\\
 Y_MIN  0.0;\\
 Y_MAX  26.289;\\
 FREQ   Freq__;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\   ! bottom wall
  POLYGON_STAT METAL;\\
   L 0.0; 1.7145;\\
   L 73.7235; 1.7145;\\
   L 73.7235; 3.429;\\
   L 147.447; 3.429;\\
 END_B\\
 BLOCK 2;\\   ! top wall
  POLYGON_STAT METAL;\\
   L 0.0; 24.5745;\\
   L 73.7235; 24.5745;\\
   L 73.7235; 22.86;\\
   L 147.447; 22.86;\\
 END_B\\
 BLOCK 3;\\   ! port 1 (a1) -- ACTIVE
  INPUT_X ; 1.7145; 24.5745; 0; 20; 1; 0;\\
 END_B\\
 BLOCK 4;\\   ! port 2 (a2) -- passive
  INPUT_X ; 3.429; 22.86; 40; 60; 0; 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 4; 147.447; 0.0;\\
#END_LINK\\
#OUTPUT\\
 FILE Tfile__;\\
 SMATRIX Sfile__; Freq__; 15.0; 20.0;\\
#END_OUTPUT\\
#END_STEP

! excited port 2
#define stepstep2 Freq__; Tfile__; Sfile__; @\\
#STEP\\
#PARM\\
 ANGLE_UNIT radian;\\
 FREQ_UNIT  GHz;\\
 LONG_UNIT  mm;\\
 TIME_UNIT  ns;\\
 DELTA  0.5715;\\
 TIME   0.; 20.0;\\
 X_MIN  0.0;\\
 X_MAX  147.447;\\
 Y_MIN  0.0;\\
 Y_MAX  26.289;\\
 FREQ   Freq__;\\
#END_PARM\\
#TOPOLOGY\\
 BLOCK 1;\\   ! bottom wall
  POLYGON_STAT METAL;\\
   L 0.0; 1.7145;\\
   L 73.7235; 1.7145;\\
   L 73.7235; 3.429;\\
   L 147.447; 3.429;\\
 END_B\\
 BLOCK 2;\\   ! top wall
  POLYGON_STAT METAL;\\
   L 0.0; 24.5745;\\
   L 73.7235; 24.5745;\\
   L 73.7235; 22.86;\\
   L 147.447; 22.86;\\
 END_B\\
 BLOCK 3;\\   ! port 1 (a1) -- passive
  INPUT_X ; 1.7145; 24.5745; 40; 60; 0; 0;\\
 END_B\\
 BLOCK 4;\\   ! port 2 (a2) -- ACTIVE
  INPUT_X ; 3.429; 22.86; 0; 20; 1; 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 4; 147.447; 0.0;\\
#END_LINK\\
#OUTPUT\\
 FILE Tfile__;\\
 SMATRIX Sfile__; Freq__; 15.0; 20.0;\\
#END_OUTPUT\\
#END_STEP