<!-- TE10 Studio documentation: /docs/app/ports-boundaries -->
# Ports and boundaries

A model needs three things before it can be solved: something at its outer surface (a **boundary**),
something that drives it (a **port** or **source**), and a [solver setup](/docs/app/solving). These are on
the **Simulation** tab and in the **Boundaries** menu.

**Any outer face with nothing assigned is a perfect electric conductor (PEC).** A closed metal box needs
nothing more. A model that radiates needs open space around it.

## Open space

There are two ways to put open space around a model. Pick whichever suits you.

### Air Box

**Air Box** (Simulation tab, Open Space group) builds a box of air around the model and makes its outside
an absorbing boundary.

![Create Open Region](/docs/img/app/dlg-air-box.webp)

- **Center frequency** sets the wavelength; the padding defaults to a quarter of it.
- **Uniform** padding on every side, or **Independent** padding per direction (±X, ±Y, ±Z).
- **Boundary type**: Radiation (absorbing), PEC or PMC; **Interior material**: Vacuum or Air.

### Box Boundaries

**Box Boundaries...** sets a boundary for each of the six sides of the model's bounding box. TE10 builds
a **Background** box around the model, padded on the sides that are open with space added, and gives each
face its boundary.

![Boundary Conditions per side](/docs/img/app/dlg-box-boundaries.webp){: .half }

| Side setting | Becomes |
|---|---|
| Electric (Et = 0) | PEC wall |
| Magnetic (Ht = 0) | PMC wall |
| Open | Absorbing boundary on the model's own bounding box |
| Open (add space) | Absorbing boundary, with space added (the distance below) |
| Conducting wall | A lossy metal wall of the given conductivity |
| Periodic | A periodic pair with the opposite side |

**Space added on open sides** defaults to a quarter wavelength at the highest frequency. **Background
material** is the medium the box is filled with. **Surrounding Medium...** sets it from typed εr, μr and
tan δ, and a distance per side. Running Box Boundaries again replaces the previous background and its
boundaries; the window reopens with the settings you chose.

**Symmetry Planes...** puts an electric or magnetic wall on the planes x = 0, y = 0 or z = 0; only the
+ side is solved, so a symmetric model takes half (or a quarter, or an eighth) of the time and memory.
Use an electric wall where the field is normal to the plane, a magnetic wall where it lies along it.

!!! note "How far is far enough?"
    Absorbing boundaries work best at least λ/4 from anything that radiates, and λ/2 or more for
    accurate far fields. For radar cross-section, keep them at least one wavelength away.

## Boundaries

Select faces (<kbd>F</kbd>), then **Boundaries › Assign Boundary** or **Face Boundary ▾** on the
Simulation tab. Right-clicking faces gives the same list.

| Boundary | Use |
|---|---|
| **Air Box...** | As above, around the selection |
| **Perfect Conductor (PEC)** | Ideal metal |
| **Perfect Magnetic Conductor (PMC)** | Magnetic wall; a symmetry plane for H |
| **Conductivity (Lossy Metal)…** | Metal with a conductivity, an optional thickness, and [surface roughness](/docs/app/roughness) |
| **Surface Impedance…** | A sheet with Rs, Ls, Cs per square |
| **Lumped RLC…** | A lumped resistor, inductor and capacitor across a sheet |
| **Absorbing (Radiation)…** | Open space (first-order absorbing boundary) |
| **Symmetry Plane** | E-Wall (PEC) or H-Wall (PMC) |
| **Periodic Pair (Primary / Secondary)…** | Two opposite faces of a unit cell, with a phase delay |
| **Ground (0 V)**, **Zero Charge** | For electrostatic solves |

Boundaries appear under **Boundaries** in the tree. Click one to edit it in **Properties**; double-click
for its window.

## Ports

Ports drive the model and give the S-parameters. **Every port is excited by default**: one solve per
port gives the full S-matrix. Untick **Port Active (Excited)** to leave a port as a matched load only.

| Port | Where | Use |
|---|---|---|
| **Wave Port** | A face on the model's outer boundary | Transmission lines and waveguides: the port solves the line's own modes, so it is matched exactly |
| **Internal Wave Port (Metal-Backed)** | A face inside the model, backed by metal | A wave port that isn't on the outside |
| **Lumped Port** | A sheet between two conductors | Small gaps: a 50 Ω source between a trace and ground |
| **Point Port** | Between two picked points | A lumped port on a narrow strip, drawn for you |
| **Floquet Port** | The top or bottom of a periodic unit cell | Arrays and frequency-selective surfaces |
| **Plane Wave** | The whole model | Scattering and radar cross-section |

Select the face (or faces: for a microstrip, the substrate face and the air face above it together), then
choose the port from **Ports ▾** on the Simulation tab or **Boundaries › Ports and Sources**.

![A wave port selected; its settings in Properties](/docs/img/app/main-port-selected.webp)

### Wave port settings

| Setting | Meaning |
|---|---|
| **Number of Propagating Modes** | How many modes the port solves and reports (one per signal conductor for a multi-conductor port) |
| **Target Impedance (Z₀)** | The reference impedance for terminal results |
| **Conductors** | The conductors touching the port. Tick the ground (reference) ones; the rest are signals. This sets the integration line, so the port reports its impedance and the mode's sign is fixed |
| **Integration line from points** | Instead of the conductors: a line from the signal to the ground |
| **De-embed** | Moves the reference plane into the model by a distance, with the mode's own propagation constant |
| **Renormalize to** | Gives results referenced to an impedance (needs an integration line) |
| **Terminal S-parameters** | One S-parameter port per terminal, numbered port by port (`P1_T1`, `P1_T2`, `P2_T1`...), instead of one per mode |

De-embedding and renormalisation apply wherever S-parameters are shown, exported or scripted.

### Wave Port Wizard

For a trace on a board, **Tools › Macros › Ports › Wave Port Wizard...** sizes the port for you. Pick the
trace and the line type (microstrip, stripline, CPW or grounded CPW). The wizard reads the trace width and
thickness, the substrate height and εr from the model, sizes the port by the usual rules (for microstrip:
about 10 trace widths wide and 6–10 substrate heights tall), adds air above the board if there is none,
and puts the port on the trace end that lies on the outer boundary.

![Wave Port Wizard](/docs/img/app/dlg-wave-port-wizard.webp)

The **Lumped Port Wizard** adds a lumped port from the ground up to the trace at either end. Both are
described in [RF tools](/docs/app/rf-tools#ports).

### Lumped and point ports

A **lumped port** has a resistance, an optional inductance and capacitance, and a current direction
(±X, ±Y, ±Z or any vector). Keep it small compared with the wavelength.

A **point port** (**Point Port...**) is the quickest way to feed a gap: pick two points (the start and end
of the current), and TE10 draws a narrow strip between them (a tenth of the gap wide unless you set it)
with a lumped port on it.

### Floquet ports and periodic cells

For a unit cell of an infinite array: make the four sides a periodic pair each (**Box Boundaries**:
Periodic, or the **Periodic structure** template) and put a **Floquet Port** on the top and bottom.
Set the polarisation (TE or TM), the highest diffraction order, and the incidence angles θ and φ; the
excited port's incidence holds at the reference frequency (by default the middle of the sweep). Results
are per diffraction order: **Results › Floquet Port Results...**

### Plane waves

**Plane Wave...** lights the model with a uniform plane wave from a direction (θ from +Z, φ from +X, in
degrees) with E along θ̂ or φ̂ or at an angle between them; or give the propagation direction and the
polarisation as vectors. It needs an absorbing boundary all round, at least half a wavelength away (one
wavelength for RCS within about 0.5 dB). Ports in the same model act as receivers. Results:
**Results › Scattering (RCS) Results...**

![Plane Wave](/docs/img/app/dlg-plane-wave.webp)

## Lumped elements

**Lumped Element (R, L, C)...** puts a resistor, inductor and capacitor (in parallel) on a sheet between
two conductors, without exciting it. Use it for chip components, terminations and tuning elements.

![Lumped element](/docs/img/app/dlg-lumped-element.webp){: .half }

## Monitors

Monitors record fields during the solve, at every frequency of the sweep:

| Monitor | Records |
|---|---|
| **Saved Field...** | The full 3D field at one frequency (the nearest sweep point), for field plots |
| **Probe...** | E or H at a point |
| **Voltage Monitor...** | ∫E·dl along a straight line from one point to another |
| **Current Monitor...** | ∮H·dl around a circle (keep it in non-magnetic material) |

![Voltage Monitor](/docs/img/app/dlg-voltage-monitor.webp)

Results: **Results › Monitor Results...**, with CSV export. Voltages and E probes are accurate to about
0.5 %. Current monitors need element order 3 (or a finer mesh) for about 1 %; at order 2 they read
a few per cent high, because the solver represents H one order lower than E.

## Far field

**Far Field...** (Monitors group) adds a far-field setup: the θ and φ ranges and steps of the pattern.
It needs an absorbing boundary or air box around the model. See [Far field](/docs/app/results#far-field).

![Far Field Setup](/docs/img/app/dlg-far-field-setup.webp){: .half }
