tidy3d.FieldStructureTimeData#
- class FieldStructureTimeData[source]#
Bases:
_NativeYeeDerivedMixin,FieldStructureTimeDataset,AbstractFieldDataData for a
FieldStructureTimeMonitor: the electric field over time with the permittivity and conductivity the time stepping applies and the per-Yee structure ownership, on their native Yee grids, plus the derived loss current density and loss power density.- Parameters:
monitor (
FieldStructureTimeMonitor) – Time-domain field-conductivity 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 (ScalarFieldTimeDataArray) – Spatial distribution of the x-component of the electric field over time.
Ey (ScalarFieldTimeDataArray) – Spatial distribution of the y-component of the electric field over time.
Ez (ScalarFieldTimeDataArray) – Spatial distribution of the z-component of the electric field over time.
eps_xx (SpatialDataArray) – Relative permittivity applied to
Exby the time stepping, on theExYee grid; NaN at a PEC point and in a dispersive medium.eps_yy (SpatialDataArray) – Relative permittivity applied to
Eyby the time stepping, on theEyYee grid; NaN at a PEC point and in a dispersive medium.eps_zz (SpatialDataArray) – Relative permittivity applied to
Ezby the time stepping, on theEzYee grid; NaN at a PEC point and in a dispersive medium.sigma_xx (SpatialDataArray) – [units = S/um]. Conductivity applied to
Exby the time stepping, on theExYee grid.sigma_yy (SpatialDataArray) – [units = S/um]. Conductivity applied to
Eyby the time stepping, on theEyYee grid.sigma_zz (SpatialDataArray) – [units = S/um]. Conductivity applied to
Ezby the time stepping, on theEzYee 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
Jx_loss/Jy_loss/Jz_lossaresigma_ii * E_i(t)on each component’s grid. The loss power densityp(t) = sum_i sigma_ii E_i(t)^2is the power the conductivity removes from the field at each instant. Over a period of a steady harmonic field it averages to1/2 sigma |E|^2, theFieldStructureData.absorbed_power_densityof the same field when the medium’s loss is all conductivity. Sampled at whole time steps, it overstates the loss of a harmonic field by about(w dt)^2 / 4: 0.8 % with 20 grid cells per vacuum wavelength. Access the symmetry-expanded quantities viaself.symmetry_expanded.A simulation with complex fields (Bloch boundaries, or a mode decomposition in a lossy simulation) records a complex
E(t)whose real part is the field the sources drive, so the current and loss power use that real part. Under Bloch boundaries with a nonzero Bloch vector, the real part is the response to the real part of the phased source.eps_iiandsigma_iiare the frequency-independent material the time stepping applies, the complex relative permittivityeps_ii + i sigma_ii / (w eps0); in a non-dispersive medium away from interfaces it equals theeps_iiaFieldStructureMonitorrecords.eps_ii E_i(t)isD_i(t) / eps0.Example
>>> from tidy3d import Grid, ScalarFieldTimeDataArray, SpatialDataArray >>> from tidy3d.components.grid.grid import Coords >>> x = [-1,1,3] >>> y = [-2,0,2,4] >>> z = [-3,-1,1,3,5] >>> t = [0, 1e-12, 2e-12] >>> coords = dict(x=x[:-1], y=y[:-1], z=z[:-1], t=t) >>> scoords = dict(x=x[:-1], y=y[:-1], z=z[:-1]) >>> grid = Grid(boundaries=Coords(x=x, y=y, z=z)) >>> fld = ScalarFieldTimeDataArray(np.random.random((2,3,4,3)), coords=coords) >>> eps = SpatialDataArray(np.full((2,3,4), 2.0), coords=scoords) >>> sigma = SpatialDataArray(np.full((2,3,4), 0.01), coords=scoords) >>> idx = SpatialDataArray(np.zeros((2,3,4)), coords=scoords) >>> monitor = FieldStructureTimeMonitor(size=(2,4,6), interval=10, name='loss_time') >>> data = FieldStructureTimeData( ... monitor=monitor, Ex=fld, Ey=fld, Ez=fld, ... eps_xx=eps, eps_yy=eps, eps_zz=eps, ... sigma_xx=sigma, sigma_yy=sigma, sigma_zz=sigma, ... structure_index_x=idx, structure_index_y=idx, structure_index_z=idx, ... grid_expanded=grid, ... )
Attributes
x-component of the loss current density
Jx_loss = sigma_xx Ex(t)[A/um^2] on theExYee grid.y-component of the loss current density on the
EyYee grid (seeJx_loss).z-component of the loss current density on the
EzYee grid (seeJx_loss).Loss power density
p(t) = sum_i sigma_ii E_i(t)^2[W/um^3], colocated.Per-component loss power density
p_i(t) = sigma_ii E_i(t)^2[W/um^3] on native grids.ExEyEzeps_xxeps_yyeps_zzsigma_xxsigma_yysigma_zzstructure_index_xstructure_index_ystructure_index_zsymmetrysymmetry_centergrid_expandedMethods
colocate_loss_current_density([x, y, z])Colocate the loss current density components
Jx_loss/Jy_loss/Jz_lossto supplied coordinates.- monitor#
- property Jx_loss#
x-component of the loss current density
Jx_loss = sigma_xx Ex(t)[A/um^2] on theExYee grid.This is the current through the static conductivity only. The frequency-domain
FieldStructureData.Jx_lossisw eps0 Im(eps_xx) Ex, which also carries dielectric and dispersive loss.
- colocate_loss_current_density(x=None, y=None, z=None)[source]#
Colocate the loss current density components
Jx_loss/Jy_loss/Jz_lossto supplied coordinates.Symmetry is not expanded here; call on
self.symmetry_expandedfor the full domain.- Parameters:
x (Optional[array-like] = None) – Coordinates to colocate to along each dimension;
Noneskips that dimension.y (Optional[array-like] = None) – Coordinates to colocate to along each dimension;
Noneskips that dimension.z (Optional[array-like] = None) – Coordinates to colocate to along each dimension;
Noneskips that dimension.
- Returns:
Dataset containing the colocated
Jx_loss/Jy_loss/Jz_losscomponents.- Return type:
- property per_component_loss_power#
Per-component loss power density
p_i(t) = sigma_ii E_i(t)^2[W/um^3] on native grids.Keys are
"x"/"y"/"z". Colocating and summing these (asloss_power_densitydoes) blends the staggered grids; keeping them separate preserves the exact per-component values.
- property loss_power_density#
Loss power density
p(t) = sum_i sigma_ii E_i(t)^2[W/um^3], colocated.The per-component power is formed on each native Yee grid, then colocated onto the common grid-boundary coordinates and summed. Computed from the raw
selfarrays; useself.symmetry_expandedfor the full domain.