EME 🌈#

Bent Medium Frames#

Bent EME cells interpret material data through EMEModeSpec. Use bend_medium_frame="global" when the material axes are fixed in physical space, and bend_medium_frame="co_rotating" when the material profile should bend with the local waveguide cross-section.

This distinction matters most for anisotropic and custom media. In the global-frame interpretation, a constant-curvature anisotropic bend can require multiple EME cells because the local mode problem changes with absolute bend angle, so check convergence with respect to the number of EME cells when refining such bends. EME supports AnisotropicMedium and reciprocal FullyAnisotropicMedium; bent custom media, including CustomAnisotropicMedium, are currently supported only in the co-rotating interpretation.

For broadband studies, prefer listing the target frequencies directly in EMESimulation freqs and controlling reuse with EMEModeSpec interp_spec. EMEFreqSweep remains available for backward compatibility but is deprecated.

If a physically relevant mode is dropped because Im(n_eff) is only slightly negative, increase EMEModeSpec increasing_mode_tolerance by a small amount such as 1e-6.

Simulation#

Note

Bent-cell material interpretation is controlled by EMEModeSpec through bend_medium_frame. Use "global" for media fixed in physical space and "co_rotating" for media that should bend with the local cross-section. EME supports AnisotropicMedium and reciprocal FullyAnisotropicMedium. Bent custom media, including CustomAnisotropicMedium, are currently supported only with bend_medium_frame="co_rotating". For bent anisotropic media in the global-frame interpretation, num_reps / EMEPeriodicitySweep and some EMELengthSweep setups are rejected when reusing modes would require solving at a different local tensor orientation. If you instead resolve such bends with multiple cells, check convergence with respect to the number of EME cells.

tidy3d.EMESimulation

EigenMode Expansion (EME) simulation.

Grid Specification#

Bent Medium Frames#

For bent EME cells, EMEModeSpec provides a bend_medium_frame field to choose how media are interpreted:

  • "global" keeps the material axes fixed in physical space. This matches the global-frame convention used in FDTD and is appropriate for chip-defined anisotropy that should not rotate with the local bend frame.

  • "co_rotating" keeps the material profile attached to the local waveguide cross-section. This is appropriate for cases such as a bent fiber, or a CustomMedium sampled directly on the straight EME coordinates.

The choice affects both accuracy and validation. With bend_medium_frame="global", orientation-sensitive anisotropic bends often need multiple EME cells because the local mode basis can change with absolute bend angle, so repeating a single bent cell with num_reps is generally only exact when the medium is rotation-invariant about the bend axis. Check convergence with respect to the number of EME cells when refining such bends. This applies to both AnisotropicMedium and reciprocal FullyAnisotropicMedium. Bent custom media, including CustomAnisotropicMedium, are currently supported only with bend_medium_frame="co_rotating", because remapping custom-medium data into bent physical space is not implemented for the global-frame interpretation.

Rule of thumb: use "global" for chip-fixed anisotropy and "co_rotating" when the material profile is intended to stay attached to the bent cross-section.

The snippet below shows two distinct modeling choices for the same three-cell bend:

import tidy3d as td

straight = td.EMEModeSpec(num_modes=6)
chip_bend = td.EMEModeSpec(
    num_modes=6,
    bend_radius=40.0,
    bend_axis=1,
    bend_medium_frame="global",
)
fiber_bend = chip_bend.updated_copy(bend_medium_frame="co_rotating")

# Example 1: a patterned birefringent waveguide on a chip.
# Keep the material axes fixed in the global frame.
eme_grid_chip = td.EMEExplicitGrid(
    boundaries=[2.0, 6.0],
    mode_specs=[straight, chip_bend, straight],
)

# Example 2: a bent fiber or a pixelated custom profile.
# Let the material profile bend with the local section.
eme_grid_fiber = td.EMEExplicitGrid(
    boundaries=[2.0, 6.0],
    mode_specs=[straight, fiber_bend, straight],
)

Weakly Increasing Modes#

By default, EME drops modes whose effective index has a negative imaginary part because they grow exponentially along the propagation direction. In practice, a physically useful mode can sometimes pick up a tiny negative Im(n_eff) from numerical noise, especially in weakly confined or bent problems.

Use EMEModeSpec increasing_mode_tolerance to relax that filter slightly:

  • 0.0 preserves the historical behavior.

  • A mode is dropped only if Im(n_eff) < -increasing_mode_tolerance.

  • Start with a very small value such as 1e-6 and increase it only when a relevant mode is being spuriously removed.

This tolerance only affects EME’s post-solve propagation-basis filtering; it does not change the underlying mode solve itself.

import tidy3d as td

robust_bend = td.EMEModeSpec(
    num_modes=8,
    bend_radius=30.0,
    bend_axis=1,
    increasing_mode_tolerance=1e-6,
)

tidy3d.EMEUniformGrid

Specification for a uniform EME grid.

tidy3d.EMECompositeGrid

EME grid made out of multiple subgrids.

tidy3d.EMEExplicitGrid

EME grid with explicitly defined internal boundaries.

tidy3d.EMEGrid

EME grid.

tidy3d.EMEModeSpec

Mode specification for EME cells.

Monitors#

tidy3d.EMECoefficientMonitor

EME monitor for mode coefficients and related quantities.

tidy3d.EMEModeSolverMonitor

EME mode solver monitor.

tidy3d.EMEFieldMonitor

EME monitor for propagated electromagnetic field.

tidy3d.EMEMonitor

Abstract base class for EME monitors.

Propagation Sweeps#

Sweeps reuse previously computed EME mode data, so bent cells remain subject to the same mode-consistency checks as the base simulation. In particular, bent anisotropic media with bend_medium_frame="global" are rejected when repetition or length changes would make a reused mode see a different local tensor orientation, and bent custom media are only supported when no global-frame remapping of custom data is required. If you instead resolve global-frame anisotropic bends with multiple cells, check convergence with respect to the number of EME cells.

Warning

EMEFreqSweep is deprecated. For new simulations, list the desired frequencies in EMESimulation freqs and control the performance/accuracy tradeoff with EMEModeSpec interp_spec.

tidy3d.EMELengthSweep

Spec for sweeping EME cell lengths.

tidy3d.EMEModeSweep

Spec for sweeping number of modes in EME propagation step.

tidy3d.EMEPeriodicitySweep

Spec for sweeping number of repetitions of EME subgrids.

tidy3d.EMEFreqSweep

Deprecated spec for sweeping frequency in the EME propagation step.

Output Data#

Monitor Data#

Simulation Data#

tidy3d.EMESimulationData

Data associated with an EME simulation.

Datasets#

tidy3d.EMESMatrixDataset

Dataset storing the scattering matrix of an EME simulation.

tidy3d.EMECoefficientDataset

Dataset storing various coefficients related to the EME simulation.

tidy3d.EMEOverlapDataset

Dataset storing overlaps between EME modes.

tidy3d.EMEFieldDataset

Dataset storing scalar components of E and H fields from EME propagation.

tidy3d.EMEModeSolverDataset

Dataset storing the eigenmodes computed at each EME cell.