tidy3d.FieldStructureTimeData#

class FieldStructureTimeData[source]#

Bases: _NativeYeeDerivedMixin, FieldStructureTimeDataset, AbstractFieldData

Data 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 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.

  • 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 Ex by the time stepping, on the Ex Yee grid; NaN at a PEC point and in a dispersive medium.

  • eps_yy (SpatialDataArray) – Relative permittivity applied to Ey by the time stepping, on the Ey Yee grid; NaN at a PEC point and in a dispersive medium.

  • eps_zz (SpatialDataArray) – Relative permittivity applied to Ez by the time stepping, on the Ez Yee grid; NaN at a PEC point and in a dispersive medium.

  • sigma_xx (SpatialDataArray) – [units = S/um]. Conductivity applied to Ex by the time stepping, on the Ex Yee grid.

  • sigma_yy (SpatialDataArray) – [units = S/um]. Conductivity applied to Ey by the time stepping, on the Ey Yee grid.

  • sigma_zz (SpatialDataArray) – [units = S/um]. Conductivity applied to Ez by the time stepping, on the Ez Yee grid.

  • structure_index_x (SpatialDataArray) – Owning structure index at each Ex Yee point; -1 for the background medium, -2 for a lumped element or an automatic PEC frame, i for simulation.structures[i].

  • structure_index_y (SpatialDataArray) – Owning structure index at each Ey Yee point; -1 for the background medium, -2 for a lumped element or an automatic PEC frame, i for simulation.structures[i].

  • structure_index_z (SpatialDataArray) – Owning structure index at each Ez Yee point; -1 for the background medium, -2 for a lumped element or an automatic PEC frame, i for simulation.structures[i].

Notes

Jx_loss/Jy_loss/Jz_loss are sigma_ii * E_i(t) on each component’s grid. The loss power density p(t) = sum_i sigma_ii E_i(t)^2 is the power the conductivity removes from the field at each instant. Over a period of a steady harmonic field it averages to 1/2 sigma |E|^2, the FieldStructureData.absorbed_power_density of 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 via self.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_ii and sigma_ii are the frequency-independent material the time stepping applies, the complex relative permittivity eps_ii + i sigma_ii / (w eps0); in a non-dispersive medium away from interfaces it equals the eps_ii a FieldStructureMonitor records. eps_ii E_i(t) is D_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

Jx_loss

x-component of the loss current density Jx_loss = sigma_xx Ex(t) [A/um^2] on the Ex Yee grid.

Jy_loss

y-component of the loss current density on the Ey Yee grid (see Jx_loss).

Jz_loss

z-component of the loss current density on the Ez Yee grid (see Jx_loss).

loss_power_density

Loss power density p(t) = sum_i sigma_ii E_i(t)^2 [W/um^3], colocated.

per_component_loss_power

Per-component loss power density p_i(t) = sigma_ii E_i(t)^2 [W/um^3] on native grids.

monitor

Ex

Ey

Ez

eps_xx

eps_yy

eps_zz

sigma_xx

sigma_yy

sigma_zz

structure_index_x

structure_index_y

structure_index_z

symmetry

symmetry_center

grid_expanded

Methods

colocate_loss_current_density([x, y, z])

Colocate the loss current density components Jx_loss/Jy_loss/Jz_loss to supplied coordinates.

monitor#
property Jx_loss#

x-component of the loss current density Jx_loss = sigma_xx Ex(t) [A/um^2] on the Ex Yee grid.

This is the current through the static conductivity only. The frequency-domain FieldStructureData.Jx_loss is w eps0 Im(eps_xx) Ex, which also carries dielectric and dispersive loss.

property Jy_loss#

y-component of the loss current density on the Ey Yee grid (see Jx_loss).

property Jz_loss#

z-component of the loss current density on the Ez Yee grid (see Jx_loss).

colocate_loss_current_density(x=None, y=None, z=None)[source]#

Colocate the loss current density components Jx_loss/Jy_loss/Jz_loss to supplied coordinates.

Symmetry is not expanded here; call on self.symmetry_expanded for the full domain.

Parameters:
  • x (Optional[array-like] = None) – Coordinates to colocate to along each dimension; None skips that dimension.

  • y (Optional[array-like] = None) – Coordinates to colocate to along each dimension; None skips that dimension.

  • z (Optional[array-like] = None) – Coordinates to colocate to along each dimension; None skips that dimension.

Returns:

Dataset containing the colocated Jx_loss/Jy_loss/Jz_loss components.

Return type:

xarray.Dataset

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 (as loss_power_density does) 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 self arrays; use self.symmetry_expanded for the full domain.