tidy3d.FieldStructureMonitor#

class FieldStructureMonitor[source]#

Bases: AbstractFieldMonitor, FreqMonitor

Monitor that records matched electric field, permittivity, and per-Yee structure-ownership data 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) – Field–medium monitors record their constituents on the native Yee grid. Colocation is applied only when a colocated derived quantity is requested from FieldStructureData.

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

  • freqs (ArrayLike[dtype=float, ndim=1]) – [units = Hz]. Array or list of frequencies stored by the field monitor.

  • apodization (ApodizationSpec = ApodizationSpec()) – Sets parameters of (optional) apodization. Apodization applies a windowing function to the Fourier transform of the time-domain fields into frequency-domain ones, and can be used to truncate the beginning and/or end of the time signal, for example to eliminate the source pulse when studying the eigenmodes of a system. Note: apodization affects the normalization of the frequency-domain fields.

  • 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 displacement field and absorbed power require all three.

Notes

A composite (frequency-domain) monitor that records, over the same region and frequencies, three matched primitives on their native Yee grids:

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

  • the diagonal, complex relative permittivity eps_xx, eps_yy, eps_zz (each on the matching Ex/Ey/Ez grid);

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

These primitives serve the derived displacement field D (see FieldStructureData), the absorbed power density, and optical carrier generation (SimulationData.optical_generation()) from a single monitor. The structure-ownership index records structure ownership rather than deduplicated medium identity, so regions that share an optical medium but carry different charge media (and hence band gaps) stay distinct.

Example

>>> monitor = FieldStructureMonitor(
...     center=(1,2,3),
...     size=(2,2,2),
...     freqs=[250e12, 300e12],
...     name='field_structure')

Attributes

fields

colocate

interval_space

use_colocated_integration

record_in_pml

freqs

apodization

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.