# Cells & Modes

The Cells & Modes section defines the EME grid (eme_grid_spec): the division of the simulation domain into cells along the propagation axis. Mode solving is performed in each cell, and then propagation between cells is performed to determine the complete solution.

The EME grid is distinct from the Grid Specification, which defines the Yee grid used to discretize the cross-section in the two transverse directions.

The EME cell boundaries can be displayed in the viewer using the eye toggle next to the Cells & Modes item in the model tree.

# Grid Type

Grid type: Layout of the EME cells along the propagation axis.

Options:

  • Uniform: the simulation domain is evenly divided into a given number of cells, all sharing the same mode specification.
  • Explicit: the cell boundaries are placed explicitly by the user, and each cell has its own mode specification.
  • Composite: a sequence of named uniform subgrids, each with its own cell count, repetitions, and mode specification.

Default: Uniform

Tips for choosing the EME grid:

  • Uniform sections (e.g., straight waveguides) only need one cell because the cross-section does not change.
  • Varying sections (e.g., tapers) need enough cells that the cross-section is approximately uniform within each cell. Use more cells where the cross-section changes rapidly.
  • Always perform a convergence test by increasing the number of cells and checking that the results (e.g., the scattering matrix) have stabilized. The Mode Count Sweep can be used to check convergence with respect to the number of modes.

# Advanced

# Number of Repetitions

num_reps: Number of periodic repetitions of the entire EME grid. Useful for efficiently simulating long periodic structures like Bragg gratings: instead of explicitly repeating the cells, the EME solver reuses the modes and the cell interface scattering matrices.

Type: integer

  • Unit: unitless
  • Constraint: greater than 0
  • Default: 1

# Grid Name

name: Optional name for the EME grid. Named grids and subgrids are referenced by the Periodicity Sweep.

Default: None