tidy3d.EMEUniformGrid#
- class EMEUniformGrid[source]#
Bases:
EMEGridSpecSpecification for a uniform EME grid.
- Parameters:
num_reps (PositiveInt = 1) – Number of periodic repetitions of this EME grid. Useful for efficiently simulating long periodic structures like Bragg gratings. Instead of explicitly repeating the cells, setting ‘num_reps’ allows the EME solver to reuse the modes and cell interface scattering matrices. However, for bent sections with orientation-sensitive anisotropic media and
bend_medium_frame='global', reusing a single bent cell is generally not exact because the local mode problem changes with absolute bend angle. It is recommended to split such bends into multiple cells and check convergence with respect to the number of EME cells before relying on ‘num_reps’. Bent custom media in the global-frame interpretation are not supported when reuse would require remapping custom-medium data into bent physical space.name (Optional[str] = None) – Name of this ‘EMEGridSpec’. Used in ‘EMEPeriodicitySweep’.
num_cells (PositiveInt) – Number of cells in the uniform EME grid.
mode_spec (
EMEModeSpec) – Mode specification for the uniform EME grid.
Example
>>> from tidy3d import EMEModeSpec >>> mode_spec = EMEModeSpec(num_modes=10) >>> eme_grid = EMEUniformGrid(num_cells=10, mode_spec=mode_spec)
Attributes
Number of real cells in this EME grid spec.
num_repsnameMethods
make_grid(center, size, axis)Generate EME grid from the EME grid spec.
- num_cells#
- mode_spec#
- make_grid(center, size, axis)[source]#
Generate EME grid from the EME grid spec.
- Parameters:
center (
Coordinate) – Center of the EME simulation.size (
Size) – Size of the EME simulation.axis (
Literal[0, 1, 2]) – Propagation axis for the EME simulation.
- Returns:
An EME grid dividing the EME simulation into cells, as defined by the EME grid spec.
- Return type:
- property num_real_cells#
Number of real cells in this EME grid spec.