tidy3d.FieldStructureTimeMonitor#
- class FieldStructureTimeMonitor[source]#
Bases:
AbstractFieldMonitor,TimeMonitorMonitorthat 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. IfTrue, 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
intervalto 1 for the highest possible resolution in time. Higher integer values downsample the data by measuring everyintervaltime steps. This can be useful for reducing data storage as needed by the application. Mutually exclusive withsampling_dtandnum_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 withintervalandnum_samples. If the requested step is finer than the simulation time stepdt, 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 fullrun_time; if the field-decay shutoff ends the run earlier, correspondingly fewer samples are recorded. Mutually exclusive withintervalandsampling_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, andAbsorberlayers at the simulation boundaries, where the fields are not physical. IfFalse, 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, andEz; 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,Ezat the sampled times (on the Yee grid,colocate=False);the frequency-independent relative permittivity
eps_xx,eps_yy,eps_zzand conductivitysigma_xx,sigma_yy,sigma_zzthe 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(-1for the background medium,-2for a lumped element or an automatic PEC frame,iforsimulation.structures[i]).
These serve the loss current density
J = sigma * E(t), the loss power densityp = sum_i sigma_ii E_i(t)^2(seeFieldStructureTimeData), and the loss per structure over time (SimulationData.per_structure_loss()).Only loss through a static conductivity is recorded: a
Mediumwithconductivity, or a lossy metal solved as a volume (subpixel=Falseon 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_lossreports 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
interval_spaceuse_colocated_integrationrecord_in_pmlstartstopintervalsampling_dtnum_samplesnamesizecenterMethods
storage_size(num_cells, tmesh)Size of monitor storage given the number of points after discretization.
- fields#
- colocate#