tidy3d.FieldStructureTimeMonitor#

class FieldStructureTimeMonitor[source]#

Bases: AbstractFieldMonitor, TimeMonitor

Monitor that records the electric field over time together with the permittivity and conductivity the time stepping applies and the per-Yee structure ownership, on their native Yee grids.

Parameters:
  • center (tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.

  • name (str) – Unique name for monitor.

  • interval_space (tuple[PositiveInt, PositiveInt, PositiveInt] = (1, 1, 1)) – Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, the step will be applied, but the first and last point of the monitor grid are always included.

  • colocate (Literal[False] = False) – The field, conductivity and structure ownership are recorded on the native Yee grid. Colocation is applied only when a colocated derived quantity is requested from FieldStructureTimeData.

  • use_colocated_integration (bool = True) – Only takes effect when colocate=False. If True, flux, dot products, and overlap integrals still use fields interpolated to grid cell boundaries (colocated), even though the field data is stored at native Yee grid positions. Experimental feature that can give improved accuracy by avoiding interpolation of fields to Yee cell positions for integration.

  • start (NonNegativeFloat = 0.0) – [units = sec]. Time at which to start monitor recording.

  • stop (Optional[NonNegativeFloat] = None) – [units = sec]. Time at which to stop monitor recording. If not specified, record until end of simulation.

  • interval (Optional[PositiveInt] = None) – Sampling rate of the monitor: number of time steps between each measurement. Set interval to 1 for the highest possible resolution in time. Higher integer values downsample the data by measuring every interval time steps. This can be useful for reducing data storage as needed by the application. Mutually exclusive with sampling_dt and num_samples; when none of the three is provided, the monitor records every time step.

  • sampling_dt (Optional[PositiveFloat] = None) – [units = sec]. Time between recorded samples, in seconds. Unlike interval (an integer number of time steps), this specifies the cadence in physical units. Mutually exclusive with interval and num_samples. If the requested step is finer than the simulation time step dt, it is clamped to record every time step.

  • num_samples (Optional[PositiveInt] = None) – Number of samples to record, spaced uniformly over the monitor’s [start, stop] window. The count is exact when the simulation runs its full run_time; if the field-decay shutoff ends the run earlier, correspondingly fewer samples are recorded. Mutually exclusive with interval and sampling_dt. If more samples than available time steps are requested, the count is reduced to one sample per time step.

  • record_in_pml (bool = True) – Whether to record data inside the PML, StablePML, and Absorber layers at the simulation boundaries, where the fields are not physical. If False, the recorded region is truncated to the simulation domain (Simulation.bounds), keeping only the cells needed to interpolate the data up to the domain edge. Surface-integration monitors (flux, field projection) then also only integrate over the simulation domain.

  • fields (tuple[Literal['Ex'], Literal['Ey'], Literal['Ez']] = ('Ex', 'Ey', 'Ez')) – Electric field components to record. Fixed to Ex, Ey, and Ez; the loss power density requires all three.

Notes

The time-domain counterpart of FieldStructureMonitor. Over the same region it records:

  • the electric field components Ex, Ey, Ez at the sampled times (on the Yee grid, colocate=False);

  • the frequency-independent relative permittivity eps_xx, eps_yy, eps_zz and conductivity sigma_xx, sigma_yy, sigma_zz the solver applies to each component, including the averaging at material interfaces and the correction near PEC edges; the permittivity is NaN at PEC points and in dispersive media, whose update also carries their pole currents;

  • the per-component structure-ownership maps structure_index_x, structure_index_y, structure_index_z (-1 for the background medium, -2 for a lumped element or an automatic PEC frame, i for simulation.structures[i]).

These serve the loss current density J = sigma * E(t), the loss power density p = sum_i sigma_ii E_i(t)^2 (see FieldStructureTimeData), and the loss per structure over time (SimulationData.per_structure_loss()).

Only loss through a static conductivity is recorded: a Medium with conductivity, or a lossy metal solved as a volume (subpixel=False on a grid that resolves the skin depth). Most RF models carry little of their loss that way:

  • A dispersive medium carries all of its loss or gain, its conductivity included, in pole currents, which are not recorded. This includes the dielectrics of the RF material library and loss-tangent fits. One with loss or gain in the simulation band is accepted with a warning, and SimulationData.per_structure_loss() reports NaN for it; a lossless one is recorded exactly. A nonlinear medium is treated the same way.

  • A lossy metal under the surface impedance method, the default, loses power at its surface, which no time-domain monitor records: per_structure_loss reports NaN for it, with a warning. A PEC loses no power and is reported as 0 W.

  • A fully anisotropic or time-modulated medium has no static per-component conductivity, so a simulation where one reaches the monitor is rejected.

Example

>>> monitor = FieldStructureTimeMonitor(
...     center=(1,2,3),
...     size=(2,2,2),
...     interval=10,
...     name='loss_time')

Attributes

fields

colocate

interval_space

use_colocated_integration

record_in_pml

start

stop

interval

sampling_dt

num_samples

name

size

center

Methods

storage_size(num_cells, tmesh)

Size of monitor storage given the number of points after discretization.

fields#
colocate#
storage_size(num_cells, tmesh)[source]#

Size of monitor storage given the number of points after discretization.