# EME Troubleshooting

Editor: messages after Check Simulation, and the results of an EME project · Python: td.EMESimulation

Each entry starts with what the editor shows. The messages come from the check that Check Simulation runs (see Run and Cost). In the error list, a message can start with the place of the error, for example monitors>0: for the first monitor.

# Not ready to run (why?)

Cause: The check found at least one error. The simulation cannot run until you fix it. An item with an error can show a red mark in the tree.

Fix: Click the text to read the errors. Fix each one, then click Check Simulation again.

# "Monitor '…' at 'monitors[0]' is an 'EMEFieldMonitor', which is not compatible with 'EMELengthSweep'."

Cause: A Length sweep changes the length of the cells, so an EME Field Monitor cannot record one field for all sweep values. A Periodicity sweep gives the same message with 'EMEPeriodicitySweep'.

Fix: Delete the EME Field Monitor, or set Sweep Type to None. To see the field, run once without the sweep, at the length you chose.

Related: EME Sweep

# "Symmetry in the propagation direction is not currently supported."

Cause: Setup › Configuration › Symmetry sets a symmetry along the propagation axis. The editor offers it, but EME supports symmetry only across the two other axes.

Fix: Set the propagation axis to No symmetry. The propagation axis is in Setup › EME Specifications › Ports.

Related: Ports

# "Input should be greater than or equal to 0"

Cause: In Ports, the two Port offsets add up to more than the domain size along the propagation axis. The region between the ports then has a negative length.

Fix: Make the offsets smaller, or make the domain longer.

Related: Ports

# "The first EME cell center must be further from the boundary than the first Yee cell center, …"

Cause: The first EME cell is shorter than about one grid cell (Yee cell). This happens when the domain is very short, or when an Explicit grid has a boundary very close to the end of the domain. The last cell gives the same message with "last".

Fix: Move the cell boundary away from the end of the domain, or make the domain longer along the propagation axis.

Related: Cells & Modes

# "Simulation 'sweep_spec' is an 'EMEModeSweep'. The number of modes should not exceed the maximum number of modes in any EME cell. …"

Cause: A Mode count sweep asks for more modes than Number of modes in Cells & Modes.

Fix: Lower the largest value under Mode Counts, or raise Number of modes.

Related: Mode Count Sweep

# "Monitor has 'num_sweep=…', which exceeds the number of sweep indices in the simulation 'sweep_spec', which is '…'."

Cause: A monitor's Number of sweep indices (in Downsampling) is larger than the number of sweep values.

Fix: Lower Number of sweep indices, or leave it empty to record every sweep index.

Related: EME Sweep

# "The simulation has 'constraint=passive', and the maximum number of EME modes in the simulation is '…'. Using more than '50' modes together with a constraint can significantly slow down the simulation. …"

Cause: A cell has more than 50 modes. With a Constraint (Setup › Configuration › Advanced), the solver is slower for many modes.

Fix: Use fewer modes. Set Target effective index close to the modes you need.

# "Simulation has … frequency sampling points. Mode solving is repeated at each sampling point, …"

Cause: The project has more than 20 wavelengths, and Frequency Interpolation is off. The solver then finds the modes again at every wavelength.

Fix: In Cells & Modes › See more › Frequency Interpolation, set Sampling Specification to ChebSampling (the default), or use fewer wavelengths.

Related: Frequency Interpolation

# The result changes when you change the number of cells or modes

Cause: The result is not converged. Each cell has one fixed cross-section, so a taper with too few cells becomes a staircase. With too few modes, light that couples into higher modes is lost.

Fix: Increase Number of cells until the result stops changing. Then do the same with Number of modes, or use a Mode count sweep. In Sweep the Length of a Waveguide Taper, 10 cells give a transmission of 0.93 and 40 cells give 0.995.

Related: Cells & Modes