EME 🌈#
Eigenmode expansion (EME) computes the scattering matrix of a structure by
solving for local eigenmodes in each cell of an EMESimulation and
propagating them through the device. It is a frequency-domain, modal
technique well-suited to guided-wave structures that are translation-invariant
or slowly varying along a single propagation axis — tapers, mode converters,
adiabatic bends, directional couplers, DBRs, and long periodic stacks. For
strongly radiating, broadband-transient, or nonlinear problems, prefer FDTD.
The primary entry point is web.run():
import tidy3d as td
import tidy3d.web as web
sim = td.EMESimulation(
size=(2.0, 2.0, 10.0),
structures=[my_waveguide],
freqs=[td.C_0 / 1.55],
axis=2,
eme_grid_spec=td.EMEUniformGrid(
num_cells=5,
mode_spec=td.EMEModeSpec(num_modes=4),
),
)
sim_data = web.run(sim, task_name="my_eme")
smatrix = sim_data.smatrix
The reference pages below cover the simulation object and its monitors, grid specification, propagation sweeps, and output data. The Local Propagation page documents an advanced workflow for running EME end-to-end on a local machine. For usage guidance (setup, convergence testing, bent waveguides, periodic structures, port / S-matrix basis), see the EME FAQ.
Simulation#
An EMESimulation is the top-level object for EME: it defines the
simulation domain, the EME cells along the propagation axis, and the
frequencies of interest. It is excitation-free — the solver always produces
the full bidirectional scattering matrix between the two ports.
EigenMode Expansion (EME) simulation. |
Monitors#
EME simulations always produce a device scattering matrix; monitors record
additional diagnostic data alongside it. EMEModeSolverMonitor
returns the eigenmodes at each cell, EMEFieldMonitor returns the
propagated E and H fields on a plane, and EMECoefficientMonitor
returns the forward / backward modal coefficients per cell.
EME monitor for mode coefficients and related quantities. |
|
EME mode solver monitor. |
|
EME monitor for propagated electromagnetic field. |
|
Abstract base class for EME monitors. |
Grid Specification#
An EME grid divides the simulation along its propagation axis into cells where
modes are solved locally, then matched at the cell interfaces. Pick
EMEUniformGrid for evenly spaced cells that share a single
EMEModeSpec, EMEExplicitGrid to place cell boundaries at
known structural features with a per-cell mode spec, or
EMECompositeGrid to combine both within one simulation.
Specification for a uniform EME grid. |
|
EME grid made out of multiple subgrids. |
|
EME grid with explicitly defined internal boundaries. |
|
EME grid. |
|
Mode specification for EME cells. |
Propagation Sweeps#
An EME sweep reuses previously computed mode data to evaluate the device at
multiple parameter points without re-solving the modes. The sweep axis is
exposed as a sweep_index coordinate on the resulting S-matrix. Broadband
frequency studies do not use a sweep type — list the desired frequencies in
EMESimulation freqs directly and control interpolation with
EMEModeSpec interp_spec.
Warning
EMEFreqSweep is deprecated. For new simulations, list the desired frequencies in
EMESimulation freqs and control the performance/accuracy tradeoff with
EMEModeSpec interp_spec.
Spec for sweeping EME cell lengths. |
|
Spec for sweeping number of modes in EME propagation step. |
|
Spec for sweeping number of repetitions of EME subgrids. |
|
Deprecated spec for sweeping frequency in the EME propagation step. |
Output Data#
Monitor Data#
Data associated with an |
|
Data associated with an |
|
Data associated with an |
Simulation Data#
Data associated with an EME simulation. |
Datasets#
Dataset storing the scattering matrix of an EME simulation. |
|
Dataset storing various coefficients related to the EME simulation. |
|
Dataset storing overlaps between EME modes. |
|
Dataset storing scalar components of E and H fields from EME propagation. |
|
Dataset storing the eigenmodes computed at each EME cell. |
Pipeline Stages#
Intermediate artifacts produced by the local propagation pipeline (see
EMESimulation.propagate()). All five classes support HDF5 round-trip,
so they can be checkpointed to disk and reused across design iterations.
Mode solver result for one EME cell. |
|
Self-overlap and metadata for one EME cell. |
|
Cross-cell overlap for one EME interface. |
|
Homogeneous propagation S-matrix for one EME cell at one sweep point. |
|
Interface S-matrix for one EME interface at one sweep point. |
Local Propagation#
EMESimulation exposes a pipeline for running EME end-to-end on a
local machine, combining the local mode solver with a set of per-element
stage methods for propagation. The convenience entry point is
EMESimulation.propagate(); the staged methods give finer control for
iterative design, caching intermediates to HDF5, or cloud-parallelizing mode
solves. The propagation methods require the optional tidy3d-extras
package with the local_eme feature; see the EME FAQ
for recipes and prerequisites.
Note
The local pipeline returns only the device S-matrix. Any
EMESimulation monitors — EMEFieldMonitor,
EMEModeSolverMonitor, EMECoefficientMonitor, etc. — are
dropped with a warning; run the simulation through the remote backend if
you need monitor data. EMEFreqSweep and anisotropic media in
bent cells with bend_medium_frame="global" are also unsupported on this
path.
One |
|
|
Propagate modes through the device to compute the full S-matrix. |
|
Express a locally propagated S-matrix in another modal basis. |
|
Stage modes and compute all per-cell and per-interface overlaps. |
Propagate to the device S-matrix using pre-computed overlaps. |
|
|
Validate, filter, and stamp mode data for one cell. |
|
Compute self-overlap, complex refractive index, and flux for one cell. |
Compute cross-cell overlaps for one interface. |
|
|
Compute homogeneous propagation S-matrix for one cell at one sweep point. |
Compute interface S-matrix for one interface at one sweep point. |
|
|
Stack cell and interface S-matrices into the final device S-matrix. |