tidy3d.FieldStructureData#
- class FieldStructureData[source]#
Bases:
_FieldStructureDerivedMixin,AbstractFieldDataData for a
FieldStructureMonitor: matched electric field, permittivity, and per-Yee structure-ownership components on their native Yee grids, plus the derived displacement field, loss current density and absorbed power density.- Parameters:
monitor (
FieldStructureMonitor) – Field–medium monitor associated with the 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
symmetryfield are non-zero.grid_expanded (Optional[
Grid] = None) –Griddiscretization 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.Ex (ScalarFieldDataArray) – Spatial distribution of the x-component of the electric field.
Ey (ScalarFieldDataArray) – Spatial distribution of the y-component of the electric field.
Ez (ScalarFieldDataArray) – Spatial distribution of the z-component of the electric field.
eps_xx (ScalarFieldDataArray) – Spatial distribution of the xx-component of the complex relative permittivity, on the
ExYee grid.eps_yy (ScalarFieldDataArray) – Spatial distribution of the yy-component of the complex relative permittivity, on the
EyYee grid.eps_zz (ScalarFieldDataArray) – Spatial distribution of the zz-component of the complex relative permittivity, on the
EzYee grid.structure_index_x (SpatialDataArray) – Owning structure index at each
ExYee point;-1for the background medium,-2for a lumped element or an automatic PEC frame,iforsimulation.structures[i].structure_index_y (SpatialDataArray) – Owning structure index at each
EyYee point;-1for the background medium,-2for a lumped element or an automatic PEC frame,iforsimulation.structures[i].structure_index_z (SpatialDataArray) – Owning structure index at each
EzYee point;-1for the background medium,-2for a lumped element or an automatic PEC frame,iforsimulation.structures[i].
Notes
The stored primitives (
Ex/Ey/Ez,eps_xx/eps_yy/eps_zz,structure_index_x/structure_index_y/structure_index_z) are recorded on their native Yee grids. The derived displacement field componentsDx/Dy/Dz, loss current density componentsJx_loss/Jy_loss/Jz_lossand theabsorbed_power_densityare computed on demand from the rawselfarrays; access the symmetry-expanded quantities viaself.symmetry_expanded.Following
PointCloudFieldMonitor, the displacement components are stored in electric-field units, i.e. scaled only by the relative permittivity (D / epsilon_0 = eps_rel * E).Example
>>> from tidy3d import Grid, ScalarFieldDataArray, SpatialDataArray >>> from tidy3d.components.grid.grid import Coords >>> x = [-1,1,3] >>> y = [-2,0,2,4] >>> z = [-3,-1,1,3,5] >>> f = [2e14, 3e14] >>> coords = dict(x=x[:-1], y=y[:-1], z=z[:-1], f=f) >>> scoords = dict(x=x[:-1], y=y[:-1], z=z[:-1]) >>> grid = Grid(boundaries=Coords(x=x, y=y, z=z)) >>> fld = ScalarFieldDataArray((1+1j) * np.random.random((2,3,4,2)), coords=coords) >>> idx = SpatialDataArray(np.zeros((2,3,4)), coords=scoords) >>> monitor = FieldStructureMonitor(size=(2,4,6), freqs=[2e14, 3e14], name='field_structure') >>> data = FieldStructureData( ... monitor=monitor, Ex=fld, Ey=fld, Ez=fld, ... eps_xx=fld, eps_yy=fld, eps_zz=fld, ... structure_index_x=idx, structure_index_y=idx, structure_index_z=idx, ... grid_expanded=grid, ... )
Attributes
ExEyEzeps_xxeps_yyeps_zzstructure_index_xstructure_index_ystructure_index_zsymmetrysymmetry_centergrid_expandedMethods
normalize(source_spectrum_fn)Return copy of self with only the electric field components source-normalized.
- monitor#