tidy3d.EMEModeSolverData

tidy3d.EMEModeSolverData#

class EMEModeSolverData[source]#

Bases: ElectromagneticFieldData, EMEModeSolverDataset

Data associated with an EMEModeSolverMonitor.

Parameters:
  • Ex (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the x-component of the electric field.

  • Ey (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the y-component of the electric field.

  • Ez (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the z-component of the electric field.

  • Hx (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the x-component of the magnetic field.

  • Hy (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the y-component of the magnetic field.

  • Hz (Optional[Union[ScalarFieldDataArray, ScalarFieldTimeDataArray, ScalarModeFieldDataArray, ScalarModeFieldCylindricalDataArray, EMEScalarModeFieldDataArray, EMEScalarFieldDataArray]] = None) – Spatial distribution of the z-component of the magnetic field.

  • n_complex (EMEModeIndexDataArray) – Complex-valued effective propagation indices associated with the mode.

  • monitor (EMEModeSolverMonitor) – EME mode solver monitor associated with this data.

  • symmetry (tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)) – Symmetry eigenvalues of the original simulation in x, y, and z.

  • symmetry_center (Optional[tuple[float, float, float]] = None) – Center of the symmetry planes of the original simulation in x, y, and z. Required only if any of the symmetry field are non-zero.

  • grid_expanded (Optional[Grid] = None) – Grid discretization of the associated monitor in the simulation which created the data. Required if symmetries are present, as well as in order to use some functionalities like getting Poynting vector and flux.

  • grid_primal_correction (Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray, EMEFreqModeDataArray] = 1.0) – Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the primal grid locations along the normal direction.

  • grid_dual_correction (Union[float, FreqDataArray, TimeDataArray, FreqModeDataArray, EMEFreqModeDataArray] = 1.0) – Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the dual grid locations along the normal direction.

Notes

Contains the eigenmodes used in the EME expansion and propagation. These are the modes computed at each EME cell, including their field profiles and complex propagation indices. This data is recorded only within the monitor geometry.

Example

>>> from tidy3d import EMEModeSolverMonitor, EMEScalarModeFieldDataArray, EMEModeIndexDataArray
>>> from tidy3d import Grid, Coords
>>> import numpy as np
>>> monitor = EMEModeSolverMonitor(
...     center=(0,0,0), size=(1,1,1), freqs=[2e14], num_modes=2, name="modes"
... )
>>> x = [0, 1]
>>> y = [0, 1]
>>> z = [0]
>>> f = [2e14]
>>> mode_index = [0, 1]
>>> eme_cell_index = [0, 1]
>>> sweep_index = [0]
>>> field_coords = dict(
...     x=x, y=y, z=z, f=f, sweep_index=sweep_index,
...     eme_cell_index=eme_cell_index, mode_index=mode_index,
... )
>>> field = EMEScalarModeFieldDataArray(
...     (1+1j) * np.random.random((2,2,1,1,1,2,2)), coords=field_coords
... )
>>> index_coords = dict(
...     f=f, sweep_index=sweep_index, eme_cell_index=eme_cell_index, mode_index=mode_index,
... )
>>> n_complex = EMEModeIndexDataArray((1+0.01j) * np.ones((1,1,2,2)), coords=index_coords)
>>> grid = Grid(boundaries=Coords(x=[-0.5, 0.5, 1.5], y=[-0.5, 0.5, 1.5], z=[-0.5, 0.5]))
>>> data = EMEModeSolverData(
...     monitor=monitor, n_complex=n_complex,
...     Ex=field, Ey=field, Ez=field, Hx=field, Hy=field, Hz=field,
...     grid_expanded=grid,
... )

Attributes

monitor

grid_primal_correction

grid_dual_correction

symmetry

symmetry_center

grid_expanded

n_complex

Ex

Ey

Ez

Hx

Hy

Hz

monitor#