API 💻

Contents

API 💻#

Simulation#

tidy3d.Simulation

Custom implementation of Maxwell’s equations which represents the physical model to be solved using the FDTD method.

tidy3d.RunTimeSpec

Defines specification for how long to run a simulation when added to Simulation.run_time.

Boundary Conditions#

tidy3d.BoundarySpec

Specifies boundary conditions on each side of the domain and along each dimension.

tidy3d.Boundary

Boundary conditions at the minus and plus extents along a dimension.

tidy3d.BoundaryEdge

Electromagnetic boundary condition at a domain edge.

Types of Boundaries#

tidy3d.Periodic

Periodic boundary condition class.

tidy3d.PECBoundary

Perfect electric conductor boundary condition class.

tidy3d.PMCBoundary

Perfect magnetic conductor boundary condition class.

tidy3d.BlochBoundary

Specifies a Bloch boundary condition along a single dimension.

Absorbing Boundaries#

Types of Absorbers#

tidy3d.PML

Specifies a standard PML along a single dimension.

tidy3d.StablePML

Specifies a 'stable' PML along a single dimension.

tidy3d.Absorber

Specifies an adiabatic absorber along a single dimension.

Absorber Parameters#

tidy3d.AbsorberParams

Specifies parameters common to Absorbers and PMLs.

tidy3d.PMLParams

Specifies full set of parameters needed for complex, frequency-shifted PML.

Geometry#

tidy3d.Box

Rectangular prism.

tidy3d.Sphere

Spherical geometry.

tidy3d.Cylinder

Cylindrical geometry with optional sidewall angle along axis direction.

tidy3d.PolySlab

Polygon extruded with optional sidewall angle along axis direction.

tidy3d.TriangleMesh

Custom surface geometry given by a triangle mesh, as in the STL file format.

tidy3d.GeometryGroup

A collection of Geometry objects that can be called as a single geometry object.

tidy3d.ClipOperation

Class representing the result of a set operation between geometries.

tidy3d.Transformed

Class representing a transformed geometry.

Transformations#

tidy3d.RotationAroundAxis

Rotation of vectors and tensors around a given vector.

Mediums#

Non-Dispersive Medium#

Spatially uniform#

tidy3d.Medium

Dispersionless medium.

tidy3d.PECMedium

Perfect electrical conductor class.

tidy3d.FullyAnisotropicMedium

Fully anisotropic medium including all 9 components of the permittivity and conductivity tensors.

Spatially varying#

tidy3d.CustomMedium

Medium with user-supplied permittivity distribution.

Dispersive Mediums#

Spatially uniform#

tidy3d.PoleResidue

A dispersive medium described by the pole-residue pair model.

tidy3d.Lorentz

A dispersive medium described by the Lorentz model.

tidy3d.Sellmeier

A dispersive medium described by the Sellmeier model.

tidy3d.Drude

A dispersive medium described by the Drude model.

tidy3d.Debye

A dispersive medium described by the Debye model.

Spatially varying#

tidy3d.CustomPoleResidue

A spatially varying dispersive medium described by the pole-residue pair model.

tidy3d.CustomLorentz

A spatially varying dispersive medium described by the Lorentz model.

tidy3d.CustomSellmeier

A spatially varying dispersive medium described by the Sellmeier model.

tidy3d.CustomDrude

A spatially varying dispersive medium described by the Drude model.

tidy3d.CustomDebye

A spatially varying dispersive medium described by the Debye model.

Medium Perturbations#

tidy3d.PerturbationMedium

Dispersionless medium with perturbations.

tidy3d.PerturbationPoleResidue

A dispersive medium described by the pole-residue pair model with perturbations.

General Mediums (can be both dispersive and non-dispersive)#

Spatially uniform#

tidy3d.AnisotropicMedium

Diagonally anisotropic medium.

tidy3d.Medium2D

2D diagonally anisotropic medium.

Spatially varying#

tidy3d.CustomAnisotropicMedium

Diagonally anisotropic medium with spatially varying permittivity in each component.

Medium Specifications (add properties to existing Medium)#

Nonlinear#

tidy3d.NonlinearSpec

Abstract specification for adding nonlinearities to a medium.

tidy3d.NonlinearSusceptibility

Model for an instantaneous nonlinear chi3 susceptibility.

tidy3d.KerrNonlinearity

Model for Kerr nonlinearity which gives an intensity-dependent refractive index of the form \(n = n_0 + n_2 I\).

tidy3d.TwoPhotonAbsorption

Model for two-photon absorption (TPA) nonlinearity which gives an intensity-dependent absorption of the form \(\alpha = \alpha_0 + \beta I\).

Time Modulation#

tidy3d.ModulationSpec

Specification adding space-time modulation to the non-dispersive part of medium including relative permittivity at infinite frequency and electric conductivity.

tidy3d.SpaceTimeModulation

Space-time modulation applied to a medium, adding on top of the time-independent part.

tidy3d.ContinuousWaveTimeModulation

Class describing modulation with a harmonic time dependence.

tidy3d.SpaceModulation

The modulation profile with a user-supplied spatial distribution of amplitude and phase.

Material Library#

Abstract Classes#

tidy3d.components.medium.AbstractPerturbationMedium

Abstract class for medium perturbation.

tidy3d.components.medium.NonlinearModel

Abstract model for a nonlinear material response.

Structures#

tidy3d.Structure

Defines a physical object that interacts with the electromagnetic fields.

tidy3d.MeshOverrideStructure

Defines an object that is only used in the process of generating the mesh.

Sources#

Types of Sources#

tidy3d.PointDipole

Uniform current source with a zero size.

tidy3d.UniformCurrentSource

Source in a rectangular volume with uniform time dependence.

tidy3d.PlaneWave

Uniform current distribution on an infinite extent plane.

tidy3d.ModeSource

Injects current source to excite modal profile on finite extent plane.

tidy3d.GaussianBeam

Gaussian distribution on finite extent plane.

tidy3d.AstigmaticGaussianBeam

The simple astigmatic Gaussian distribution allows both an elliptical intensity profile and different waist locations for the two principal axes of the ellipse.

tidy3d.CustomFieldSource

Implements a source corresponding to an input dataset containing E and H fields, using the equivalence principle to define the actual injected currents.

tidy3d.CustomCurrentSource

Implements a source corresponding to an input dataset containing E and H fields.

tidy3d.TFSF

Total-field scattered-field (TFSF) source that can inject a plane wave in a finite region.

Source Time Dependence#

tidy3d.GaussianPulse

Source time dependence that describes a Gaussian pulse.

tidy3d.ContinuousWave

Source time dependence that ramps up to continuous oscillation and holds until end of simulation.

tidy3d.CustomSourceTime

Custom source time dependence consisting of a real or complex envelope modulated at a central frequency, as shown below.

Monitors#

Monitor Types#

tidy3d.FieldMonitor

Monitor that records electromagnetic fields in the frequency domain.

tidy3d.FieldTimeMonitor

Monitor that records electromagnetic fields in the time domain.

tidy3d.FluxMonitor

Monitor that records power flux in the frequency domain.

tidy3d.FluxTimeMonitor

Monitor that records power flux in the time domain.

tidy3d.ModeMonitor

Monitor that records amplitudes from modal decomposition of fields on plane.

tidy3d.ModeSolverMonitor

Monitor that stores the mode field profiles returned by the mode solver in the monitor plane.

tidy3d.PermittivityMonitor

Monitor that records the diagonal components of the complex-valued relative permittivity tensor in the frequency domain.

tidy3d.FieldProjectionCartesianMonitor

Monitor that samples electromagnetic near fields in the frequency domain and projects them on a Cartesian observation plane.

tidy3d.FieldProjectionAngleMonitor

Monitor that samples electromagnetic near fields in the frequency domain and projects them at given observation angles.

tidy3d.FieldProjectionKSpaceMonitor

Monitor that samples electromagnetic near fields in the frequency domain and projects them on an observation plane defined in k-space.

tidy3d.DiffractionMonitor

Monitor that uses a 2D Fourier transform to compute the diffraction amplitudes and efficiency for allowed diffraction orders.

Apodization Specification#

tidy3d.ApodizationSpec

Stores specifications for the apodizaton of frequency-domain monitors.

Mode Specifications#

tidy3d.ModeSpec

Stores specifications for the mode solver to find an electromagntic mode.

Field Projector#

tidy3d.FieldProjectionSurface

Data structure to store surface monitors where near fields are recorded for field projections.

tidy3d.FieldProjector

Projection of near fields to points on a given observation grid.

Lumped elements#

Passive elements#

tidy3d.LumpedResistor

Class representing a rectangular lumped resistor.

tidy3d.CoaxialLumpedResistor

Class representing a coaxial lumped resistor.

Discretization#

tidy3d.GridSpec

Collective grid specification for all three dimensions.

tidy3d.AutoGrid

Specification for non-uniform grid along a given dimension.

tidy3d.UniformGrid

Uniform 1D grid.

tidy3d.CustomGrid

Custom 1D grid supplied as a list of grid cell sizes centered on the simulation center.

tidy3d.CustomGridBoundaries

Custom 1D grid supplied as a list of grid cell boundary coordinates.

tidy3d.Coords

Holds data about a set of x,y,z positions on a grid.

tidy3d.FieldGrid

Holds the grid data for a single field.

tidy3d.YeeGrid

Holds the yee grid coordinates for each of the E and H positions.

tidy3d.Grid

Contains all information about the spatial positions of the FDTD grid.

Subpixel Averaging#

tidy3d.SubpixelSpec

Defines specification for subpixel averaging schemes when added to Simulation.subpixel.

Types of Subpixel Averaging Methods#

tidy3d.Staircasing

Apply staircasing scheme to material assignment of Yee grids on structure boundaries.

tidy3d.VolumetricAveraging

Apply volumetric averaging scheme to material properties of Yee grids on structure boundaries.

tidy3d.HeuristicPECStaircasing

Apply a variant of staircasing scheme to PEC boundaries: the electric field grid is set to PEC if the field is substantially parallel to the interface.

tidy3d.PolarizedAveraging

Apply a polarized subpixel averaging method to dielectric boundaries.

tidy3d.PECConformal

Apply a subpixel averaging method known as conformal mesh scheme to PEC boundaries.

Output Data#

All Data for a Simulation#

tidy3d.SimulationData

Stores data from a collection of Monitor objects in a Simulation.

Collections of Data from single monitor#

tidy3d.FieldData

Data associated with a FieldMonitor: scalar components of E and H fields.

tidy3d.FieldTimeData

Data associated with a FieldTimeMonitor: scalar components of E and H fields.

tidy3d.ModeSolverData

Data associated with a ModeSolverMonitor: scalar components of E and H fields.

tidy3d.PermittivityData

Data for a PermittivityMonitor: diagonal components of the permittivity tensor.

tidy3d.FluxData

Data associated with a FluxMonitor: flux data in the frequency-domain.

tidy3d.FluxTimeData

Data associated with a FluxTimeMonitor: flux data in the time-domain.

tidy3d.ModeData

Data associated with a ModeMonitor: modal amplitudes, propagation indices and mode profiles.

tidy3d.FieldProjectionAngleData

Data associated with a FieldProjectionAngleMonitor: components of projected fields.

tidy3d.FieldProjectionCartesianData

Data associated with a FieldProjectionCartesianMonitor: components of projected fields.

tidy3d.FieldProjectionKSpaceData

Data associated with a FieldProjectionKSpaceMonitor: components of projected fields.

tidy3d.DiffractionData

Data for a DiffractionMonitor: complex components of diffracted far fields.

Individual Datasets#

tidy3d.SpatialDataArray

Spatial distribution.

tidy3d.PermittivityDataset

Dataset storing the diagonal components of the permittivity tensor.

tidy3d.ScalarFieldDataArray

Spatial distribution in the frequency-domain.

tidy3d.ScalarModeFieldDataArray

Spatial distribution of a mode in frequency-domain as a function of mode index.

tidy3d.ScalarFieldTimeDataArray

Spatial distribution in the time-domain.

tidy3d.ModeAmpsDataArray

Forward and backward propagating complex-valued mode amplitudes.

tidy3d.ModeIndexDataArray

Complex-valued effective propagation index of a mode.

tidy3d.FluxDataArray

Flux through a surface in the frequency-domain.

tidy3d.FluxTimeDataArray

Flux through a surface in the time-domain.

tidy3d.FieldProjectionAngleDataArray

Far fields in frequency domain as a function of angles theta and phi.

tidy3d.FieldProjectionCartesianDataArray

Far fields in frequency domain as a function of local x and y coordinates.

tidy3d.FieldProjectionKSpaceDataArray

Far fields in frequency domain as a function of normalized kx and ky vectors on the observation plane.

tidy3d.DiffractionDataArray

Diffraction power amplitudes as a function of diffraction orders and frequency.

Scene#

Scene

Contains generic information about the geometry and medium properties common to all types of simulations.

Logging#

tidy3d.log

Custom logger to avoid the complexities of the logging module

tidy3d.set_logging_level(level)

Raise a warning here instead of setting the logging level.

tidy3d.set_logging_file(fname[, filemode, ...])

Set a file to write log to, independently from the stdout and stderr output chosen using set_logging_level().

Submitting Simulations#

Generic Web API#

tidy3d.web.api.webapi.run(simulation, task_name)

Submits a Simulation to server, starts running, monitors progress, downloads, and loads results as a SimulationDataType object.

tidy3d.web.api.webapi.upload(simulation, ...)

Upload simulation to server, but do not start running Simulation.

tidy3d.web.api.webapi.estimate_cost(task_id)

Compute the maximum FlexCredit charge for a given task.

tidy3d.web.api.webapi.real_cost(task_id[, ...])

Get the billed cost for given task after it has been run.

tidy3d.web.api.webapi.get_info(task_id[, ...])

Return information about a task.

tidy3d.web.api.webapi.start(task_id[, ...])

Start running the simulation associated with task.

tidy3d.web.api.webapi.monitor(task_id[, verbose])

Print the real time task progress until completion.

tidy3d.web.api.webapi.download(task_id[, ...])

Download results of task to file.

tidy3d.web.api.webapi.load(task_id[, path, ...])

Download and Load simulation results into SimulationData object.

tidy3d.web.api.webapi.delete(task_id)

Delete server-side data associated with task.

tidy3d.web.api.webapi.download_log(task_id)

Download the tidy3d log file associated with a task.

tidy3d.web.api.webapi.download_json(task_id)

Download the .json file associated with the Simulation of a given task.

tidy3d.web.api.webapi.load_simulation(task_id)

Download the .json file of a task and load the associated simulation.

tidy3d.web.api.asynchronous.run_async(...[, ...])

Submits a set of Union[Simulation, HeatSimulation, EMESimulation] objects to server, starts running, monitors progress, downloads, and loads results as a BatchData object.

Job and Batch Containers#

tidy3d.web.api.container.Job

Interface for managing the running of a Simulation on server.

tidy3d.web.api.container.Batch

Interface for submitting several Simulation objects to sever.

tidy3d.web.api.container.BatchData

Holds a collection of SimulationData returned by Batch.

Information Containers#

tidy3d.web.core.task_info.TaskInfo

General information about a task.

tidy3d.web.core.task_info.TaskStatus

The statuses that the task can be in.

Mode Solver Web API#

tidy3d.web.api.mode.run(mode_solver[, ...])

Submits a ModeSolver to server, starts running, monitors progress, downloads, and loads results as a ModeSolverData object.

tidy3d.web.api.mode.run_batch(mode_solvers)

Submits a batch of ModeSolver to the server concurrently, manages progress, and retrieves results.

tidy3d.web.api.mode.ModeSolverTask

Interface for managing the running of a ModeSolver task on server.

HEAT 🔥#

Simulation#

tidy3d.HeatSimulation

Contains all information about heat simulation.

Material Thermal Specification#

tidy3d.FluidSpec

Fluid medium.

tidy3d.SolidSpec

Solid medium.

Thermal Perturbation Specification#

tidy3d.LinearHeatPerturbation

Specifies parameter's perturbation due to thermal effects as a linear function of temperature.

tidy3d.CustomHeatPerturbation

Specifies parameter's perturbation due to thermal effects as a custom function of temperature defined as an array of perturbation values at sample temperature points.

Thermal Boundary Conditions#

Specifications#

tidy3d.HeatBoundarySpec

Heat boundary conditions specification.

Types#

tidy3d.TemperatureBC

Constant temperature thermal boundary conditions.

tidy3d.ConvectionBC

Convective thermal boundary conditions.

tidy3d.HeatFluxBC

Constant flux thermal boundary conditions.

Placement#

tidy3d.StructureStructureInterface

Placement of boundary conditions between two structures.

tidy3d.StructureBoundary

Placement of boundary conditions on the structure's boundary.

tidy3d.MediumMediumInterface

Placement of boundary conditions between two mediums.

tidy3d.StructureSimulationBoundary

Placement of boundary conditions on the simulation box boundary covered by the structure.

tidy3d.SimulationBoundary

Placement of boundary conditions on the simulation box boundary.

Thermal Sources#

tidy3d.UniformHeatSource

Volumetric heat source.

Grid Specification#

tidy3d.UniformUnstructuredGrid

Uniform grid.

tidy3d.DistanceUnstructuredGrid

Adaptive grid based on distance to material interfaces.

Monitors#

tidy3d.TemperatureMonitor

Temperature monitor.

Output Data#

Heat Simulation Data#

tidy3d.HeatSimulationData

Stores results of a heat simulation.

Monitor Data#

tidy3d.TemperatureData

Data associated with a TemperatureMonitor: spatial temperature field.

Unstructured Data Classes#

tidy3d.TriangularGridDataset

Dataset for storing triangular grid data.

tidy3d.TetrahedralGridDataset

Dataset for storing tetrahedral grid data.

Individual Datasets#

tidy3d.PointDataArray

A two-dimensional array that stores coordinates of a collection of points.

tidy3d.CellDataArray

A two-dimensional array that stores indices of points composing each cell in a collection of cells of the same type (for example: triangles, tetrahedra, etc).

tidy3d.IndexedDataArray

Stores a one-dimensional array enumerated by coordinate index.

CHARGE ⚡#

Charge Perturbation Specification#

tidy3d.LinearChargePerturbation

Specifies parameter's perturbation due to free carrier effects as a linear function of electron and hole densities:

tidy3d.CustomChargePerturbation

Specifies parameter's perturbation due to free carrier effects as a custom function of electron and hole densities defined as a two-dimensional array of perturbation values at sample electron and hole density points.

EME 🌈#

Simulation#

tidy3d.EMESimulation

EigenMode Expansion (EME) simulation.

Grid Specification#

tidy3d.EMEUniformGrid

Specification for a uniform EME grid.

tidy3d.EMECompositeGrid

EME grid made out of multiple subgrids.

tidy3d.EMEExplicitGrid

EME grid with explicitly defined internal boundaries.

tidy3d.EMEGrid

EME grid.

tidy3d.EMEModeSpec

Mode spec for EME cells.

Monitors#

tidy3d.EMECoefficientMonitor

EME monitor for mode coefficients.

tidy3d.EMEModeSolverMonitor

EME mode solver monitor.

tidy3d.EMEFieldMonitor

EME monitor for propagated field.

tidy3d.EMEMonitor

Abstract EME monitor.

Propagation Sweeps#

tidy3d.EMELengthSweep

Spec for sweeping EME cell lengths.

tidy3d.EMEModeSweep

Spec for sweeping number of modes in EME propagation step.

Output Data#

Monitor Data#

tidy3d.EMECoefficientData

Data associated with an EME coefficient monitor.

tidy3d.EMEModeSolverData

Data associated with an EME mode solver monitor.

tidy3d.EMEFieldData

Data associated with an EME field monitor.

Simulation Data#

tidy3d.EMESimulationData

Data associated with an EME simulation.

Plugins#

Mode Solver#

tidy3d.plugins.mode.ModeSolver

Interface for solving electromagnetic eigenmodes in a 2D plane with translational invariance in the third dimension.

tidy3d.plugins.mode.ModeSolverData

Data associated with a ModeSolverMonitor: scalar components of E and H fields.

Dispersive Model Fitting#

tidy3d.plugins.dispersion.FastDispersionFitter

Tool for fitting refractive index data to get a dispersive medium described by PoleResidue model.

tidy3d.plugins.dispersion.AdvancedFastFitterParam

Advanced fast fitter parameters.

tidy3d.plugins.dispersion.DispersionFitter

Tool for fitting refractive index data to get a dispersive medium described by PoleResidue model.

tidy3d.plugins.dispersion.AdvancedFitterParam

Advanced fitter parameters

tidy3d.plugins.dispersion.web.run(fitter[, ...])

Execute the data fit using the stable fitter in the server.

tidy3d.plugins.dispersion.StableDispersionFitter

Deprecated.

Self-intersecting Polyslab#

tidy3d.plugins.polyslab.ComplexPolySlab

Interface for dividing a complex polyslab where self-intersecting polygon can occur during extrusion.

Scattering Matrix Calculator#

tidy3d.plugins.smatrix.ComponentModeler

Tool for modeling devices and computing scattering matrix elements.

tidy3d.plugins.smatrix.Port

Specifies a port in the scattering matrix.

tidy3d.plugins.smatrix.ModalPortDataArray

Port parameter matrix elements for modal ports.

tidy3d.plugins.smatrix.TerminalComponentModeler

Tool for modeling two-terminal multiport devices and computing port parameters with lumped ports.

tidy3d.plugins.smatrix.LumpedPort

Class representing a single rectangular lumped port

tidy3d.plugins.smatrix.LumpedPortDataArray

Port parameter matrix elements for lumped ports.

tidy3d.plugins.smatrix.CoaxialLumpedPort

Class representing a single coaxial lumped port

Resonance Finder#

tidy3d.plugins.resonance.ResonanceFinder

Tool that extracts resonance information from a time series of the form shown below.

Automatic Differentiation with Autograd#

tidy3d.plugins.autograd.functions.threshold(array)

Apply a threshold to an array, setting values below the threshold to vmin and values above to vmax.

tidy3d.plugins.autograd.functions.rescale(...)

Rescale an array from an arbitrary input range to an arbitrary output range.

tidy3d.plugins.autograd.functions.morphological_gradient_external(array)

Compute the external morphological gradient of an array.

tidy3d.plugins.autograd.functions.morphological_gradient_internal(array)

Compute the internal morphological gradient of an array.

tidy3d.plugins.autograd.functions.morphological_gradient(array)

Compute the morphological gradient of an array.

tidy3d.plugins.autograd.functions.grey_closing(array)

Perform grey closing on an array.

tidy3d.plugins.autograd.functions.grey_opening(array)

Perform grey opening on an array.

tidy3d.plugins.autograd.functions.grey_erosion(array)

Perform grey erosion on an array.

tidy3d.plugins.autograd.functions.grey_dilation(array)

Perform grey dilation on an array.

tidy3d.plugins.autograd.functions.pad(array, ...)

Pad an array along specified axes with a given mode and padding width.

tidy3d.plugins.autograd.functions.convolve(...)

Convolve an array with a given kernel.

tidy3d.plugins.autograd.utilities.chain(*funcs)

Chain multiple functions together to apply them sequentially to an array.

tidy3d.plugins.autograd.utilities.make_kernel(...)

Create a kernel based on the specified type in n dimensions.

tidy3d.plugins.autograd.utilities.get_kernel_size_px([...])

Calculate the kernel size in pixels based on the provided radius and grid spacing.

tidy3d.plugins.autograd.primitives.gaussian_filter(...)

Multidimensional Gaussian filter.

tidy3d.plugins.autograd.invdes.grey_indicator(array)

Calculate the grey indicator for a given array.

tidy3d.plugins.autograd.invdes.make_circular_filter([...])

make_filter() with a default filter_type value of circular.

tidy3d.plugins.autograd.invdes.make_conic_filter([...])

make_filter() with a default filter_type value of conic.

tidy3d.plugins.autograd.invdes.make_curvature_penalty(...)

Create a penalty function based on the curvature of a set of points.

tidy3d.plugins.autograd.invdes.make_erosion_dilation_penalty(...)

Computes a penalty for erosion/dilation of a parameter map not being unity.

tidy3d.plugins.autograd.invdes.make_filter([...])

Create a filter function based on the specified kernel type and size.

tidy3d.plugins.autograd.invdes.make_filter_and_project([...])

Create a function that filters and projects an array.

tidy3d.plugins.autograd.invdes.ramp_projection(array)

Apply a piecewise linear ramp projection to an array.

tidy3d.plugins.autograd.invdes.tanh_projection(array)

Apply a tanh-based soft-thresholding projection to an array.

tidy3d.plugins.autograd.types.PaddingType

alias of Literal['constant', 'edge', 'reflect', 'symmetric', 'wrap']

tidy3d.plugins.autograd.types.KernelType

alias of Literal['circular', 'conic']

Adjoint#

tidy3d.plugins.adjoint.web.run

Submits a JaxSimulation to server, starts running, monitors progress, downloads, and loads results as a JaxSimulationData object.

tidy3d.plugins.adjoint.web.run_async

Submits a set of JaxSimulation objects to server, starts running, monitors progress, downloads, and loads results as a tuple of JaxSimulationData objects.

tidy3d.plugins.adjoint.JaxBox

A Box registered with jax.

tidy3d.plugins.adjoint.JaxPolySlab

A PolySlab registered with jax.

tidy3d.plugins.adjoint.JaxComplexPolySlab

A ComplexPolySlab registered with jax.

tidy3d.plugins.adjoint.JaxMedium

A Medium registered with jax.

tidy3d.plugins.adjoint.JaxAnisotropicMedium

A Medium registered with jax.

tidy3d.plugins.adjoint.JaxCustomMedium

A CustomMedium registered with jax.

tidy3d.plugins.adjoint.JaxStructure

A Structure registered with jax.

tidy3d.plugins.adjoint.JaxSimulation

A Simulation registered with jax.

tidy3d.plugins.adjoint.JaxSimulationData

A SimulationData registered with jax.

tidy3d.plugins.adjoint.JaxModeData

A ModeData registered with jax.

tidy3d.plugins.adjoint.JaxPermittivityDataset

A PermittivityDataset registered with jax.

tidy3d.plugins.adjoint.JaxDataArray

A DataArray-like class that only wraps xarray for jax compatibility.

tidy3d.plugins.adjoint.utils.filter.ConicFilter

Filter that convolves an image with a conical mask, used for larger feature sizes.

tidy3d.plugins.adjoint.utils.filter.BinaryProjector

Projects a grayscale image towards min and max values using a smooth tanh function.

tidy3d.plugins.adjoint.utils.penalty.RadiusPenalty

Computes a penalty for small radius of curvature determined by a fit of points in a 2D plane.

Inverse Design Plugin#

tidy3d.plugins.invdes.FilterProject

Transformation involving convolution by a conic filter followed by a tanh projection.

tidy3d.plugins.invdes.ErosionDilationPenalty

Erosion and dilation penalty, addable to tdi.TopologyDesignRegion.penalties.

tidy3d.plugins.invdes.TopologyDesignRegion

Design region as a pixellated permittivity grid.

tidy3d.plugins.invdes.InverseDesign

Container for an inverse design problem.

tidy3d.plugins.invdes.InverseDesignMulti

InverseDesign with multiple simulations and corresponding postprocess functions.

tidy3d.plugins.invdes.InverseDesignResult

Container for the result of an InverseDesign.run() call.

tidy3d.plugins.invdes.AdamOptimizer

Specification for an optimization.

tidy3d.plugins.invdes.utils.get_amps(...)

Grab amplitudes from a ModeMonitorData and select out values.

tidy3d.plugins.invdes.utils.get_field_component(...)

Grab field component from a FieldMonitorData and select out values.

tidy3d.plugins.invdes.utils.get_intensity(...)

Grab field intensity from a FieldMonitorData and select out values.

tidy3d.plugins.invdes.utils.sum_array(arr)

Sum values in the td.DataArray.

tidy3d.plugins.invdes.utils.sum_abs_squared(arr)

Sum the absolute value squared of a td.DataArray.

tidy3d.plugins.invdes.utils.get_phase(arr)

Get anp.angle of a td.DataArray as an array.

Design Space Exploration#

tidy3d.plugins.design.parameter.Parameter

Specification for a single variable / dimension in a design problem.

tidy3d.plugins.design.ParameterFloat

Parameter containing floats.

tidy3d.plugins.design.ParameterInt

Parameter containing integers.

tidy3d.plugins.design.ParameterAny

Parameter containing a set of of anything.

tidy3d.plugins.design.method.Method

Spec for a sweep algorithm, with a method to run it.

tidy3d.plugins.design.MethodGrid

Select parameters uniformly on a grid.

tidy3d.plugins.design.MethodMonteCarlo

Select sampling points using Monte Carlo sampling (Latin Hypercube method).

tidy3d.plugins.design.MethodRandomCustom

Select parameters with an object with a user supplied sampler with a .random method.

tidy3d.plugins.design.MethodRandom

Select sampling points uniformly at random.

tidy3d.plugins.design.DesignSpace

Specification of a design problem / combination of several parameters + algorithm.

tidy3d.plugins.design.Result

Stores the result of a run over a DesignSpace.

Waveguide#

tidy3d.plugins.waveguide.RectangularDielectric

General rectangular dielectric waveguide

Microwave#

tidy3d.plugins.microwave.AxisAlignedPathIntegral

Class for defining the simplest type of path integral, which is aligned with Cartesian axes.

tidy3d.plugins.microwave.VoltageIntegralAxisAligned

Class for computing the voltage between two points defined by an axis-aligned line.

tidy3d.plugins.microwave.CurrentIntegralAxisAligned

Class for computing conduction current via Ampère's circuital law on an axis-aligned loop.

tidy3d.plugins.microwave.CustomPathIntegral2D

Class for defining a custom path integral defined as a curve on an axis-aligned plane.

tidy3d.plugins.microwave.CustomVoltageIntegral2D

Class for computing the voltage between two points defined by a custom path.

tidy3d.plugins.microwave.CustomCurrentIntegral2D

Class for computing conduction current via Ampère's circuital law on a custom path.

tidy3d.plugins.microwave.ImpedanceCalculator

Tool for computing the characteristic impedance of a transmission line.

Constants#

Physical Constants#

tidy3d.constants.C_0

Speed of light in vacuum [um/s]

tidy3d.constants.HBAR

Reduced Planck constant [eV*s]

tidy3d.constants.Q_e

Fundamental charge [C]

tidy3d.constants.ETA_0

Vacuum impedance in Ohms

tidy3d.constants.EPSILON_0

Vacuum permittivity [F/um]

tidy3d.constants.MU_0

Vacuum permeability [H/um]

tidy3d.constants.K_B

Boltzmann constant [eV/K]

Tidy3D Special Constants#

tidy3d.constants.inf

Representation of infinity used within tidy3d.

Tidy3D Configuration#

tidy3d.config.Tidy3dConfig

configuration of tidy3d

Default Absorber Parameters#

tidy3d.DefaultPMLParameters

Specifies full set of parameters needed for complex, frequency-shifted PML.

tidy3d.DefaultStablePMLParameters

Specifies full set of parameters needed for complex, frequency-shifted PML.

tidy3d.DefaultAbsorberParameters

Specifies parameters common to Absorbers and PMLs.

Units#

tidy3d.constants.HERTZ

One cycle per second.

tidy3d.constants.TERAHERTZ

One trillion (10^12) cycles per second.

tidy3d.constants.SECOND

SI unit of time.

tidy3d.constants.PICOSECOND

One trillionth (10^-12) of a second.

tidy3d.constants.METER

SI unit of length.

tidy3d.constants.MICROMETER

One millionth (10^-6) of a meter.

tidy3d.constants.NANOMETER

One billionth (10^-9) of a meter.

tidy3d.constants.RADIAN

SI unit of angle.

tidy3d.constants.CONDUCTIVITY

Siemens per micrometer.

tidy3d.constants.PERMITTIVITY

Relative permittivity.

tidy3d.constants.PML_SIGMA

2 times vacuum permittivity over time differential step.

tidy3d.constants.RADPERSEC

One radian per second.

tidy3d.constants.ELECTRON_VOLT

Unit of energy.

tidy3d.constants.KELVIN

SI unit of temperature.

tidy3d.constants.PML_SIGMA

2 times vacuum permittivity over time differential step.

tidy3d.constants.CMCUBE

Cubic centimeter unit of volume.

tidy3d.constants.PERCMCUBE

Unit per centimeter cube.

tidy3d.constants.WATT

SI unit of power.

tidy3d.constants.VOLT

SI unit of electric potential.

tidy3d.constants.THERMAL_CONDUCTIVITY

Watts per (micrometer Kelvin).

tidy3d.constants.SPECIFIC_HEAT_CAPACITY

Joules per (kilogram Kelvin).

tidy3d.constants.HEAT_FLUX

Watts per square micrometer.

tidy3d.constants.VOLUMETRIC_HEAT_RATE

Watts per cube micrometer.

tidy3d.constants.HEAT_TRANSFER_COEFF

Watts per (square micrometer Kelvin).

Precision & Comparator Values#

tidy3d.constants.dp_eps

Double floating point precision.

tidy3d.constants.fp_eps

Floating point precision.

tidy3d.constants.pec_val

PEC values for mode solver

tidy3d.constants.LARGE_NUMBER

Large number used for comparing infinity.

tidy3d.constants.GLANCING_CUTOFF

if |np.pi/2 - angle_theta| < GLANCING_CUTOFF in an angled source or in mode spec, raise warning.

Abstract Base Models#

Base classes that represent abstractions of the core elements of a common components. Provide inherited functionality.

tidy3d.components.base_sim.data.sim_data.AbstractSimulationData

Stores data from a collection of AbstractMonitor objects in a AbstractSimulation.

tidy3d.components.base_sim.monitor.AbstractMonitor

Abstract base class for steady-state monitors.

tidy3d.components.base_sim.simulation.AbstractSimulation

Base class for simulation classes of different solvers.

tidy3d.components.base_sim.source.AbstractSource

Abstract base class for all sources.

tidy3d.components.data.dataset.AbstractFieldDataset

Collection of scalar fields with some symmetry properties.

tidy3d.components.data.monitor_data.AbstractFieldProjectionData

Collection of projected fields in spherical coordinates in the frequency domain.

tidy3d.components.parameter_perturbation.AbstractPerturbation

Abstract class for a generic perturbation.

tidy3d.components.parameter_perturbation.AbstractPerturbation

Abstract class for a generic perturbation.

tidy3d.components.medium.AbstractCustomMedium

A spatially varying medium.

tidy3d.components.medium.AbstractMedium

A medium within which electromagnetic waves propagate.

tidy3d.components.simulation.AbstractYeeGridSimulation

Abstract class for a simulation involving electromagnetic fields defined on a Yee grid.

tidy3d.components.structure.AbstractStructure

A basic structure object.

tidy3d.components.time.AbstractTimeDependence

Base class describing time dependence.

Base Models#

These are some classes that are used to organize the tidy3d components, but aren’t to be used directly in the code. Documented here mainly for reference of inherited components.

tidy3d.Geometry

Abstract base class, defines where something exists in space.

tidy3d.components.base.Tidy3dBaseModel

Base pydantic model that all Tidy3d components inherit from.

tidy3d.components.boundary.AbsorberSpec

Specifies the generic absorber properties along a single dimension.

tidy3d.components.data.data_array.DataArray

Subclass of xr.DataArray that requires _dims to match the keys of the coords.

tidy3d.components.data.dataset.FieldDataset

Dataset storing a collection of the scalar components of E and H fields in the freq.

tidy3d.components.data.dataset.FieldTimeDataset

Dataset storing a collection of the scalar components of E and H fields in the time domain

tidy3d.components.data.dataset.ModeSolverDataset

Dataset storing scalar components of E and H fields as a function of freq.

tidy3d.components.data.monitor_data.ElectromagneticFieldData

Collection of electromagnetic fields.

tidy3d.components.data.monitor_data.MonitorData

Abstract base class of objects that store data pertaining to a single monitor.

tidy3d.components.data.sim_data.SimulationData

Stores data from a collection of Monitor objects in a Simulation.

tidy3d.components.geometry.base.Centered

Geometry with a well defined center.

tidy3d.components.geometry.base.Circular

Geometry with circular characteristics (specified by a radius).

tidy3d.components.geometry.base.Planar

Geometry with one axis that is slab-like with thickness height.

tidy3d.components.geometry.base.SimplePlaneIntersection

A geometry where intersections with an axis aligned plane may be computed efficiently.

tidy3d.components.grid.grid_spec.GridSpec1d

Abstract base class, defines 1D grid generation specifications.

tidy3d.components.lumped_element.LumpedElement

Base class describing the interface all lumped elements obey.

tidy3d.components.medium.CustomDispersiveMedium

A spatially varying dispersive medium.

tidy3d.components.medium.DispersiveMedium

A Medium with dispersion: field propagation characteristics depend on frequency.

tidy3d.components.monitor.FreqMonitor

Monitor that records data in the frequency-domain.

tidy3d.components.monitor.Monitor

Abstract base class for monitors.

tidy3d.components.monitor.PlanarMonitor

Monitor that has a planar geometry.

tidy3d.components.monitor.TimeMonitor

Monitor that records data in the time-domain.

tidy3d.components.source.AngledFieldSource

A FieldSource defined with an angled direction of propagation.

tidy3d.components.source.BroadbandSource

A source with frequency dependent field distributions.

tidy3d.components.source.CurrentSource

Source implements a current distribution directly.

tidy3d.components.source.DirectionalSource

A Field source that propagates in a given direction.

tidy3d.components.source.FieldSource

A Source defined by the desired E and/or H fields.

tidy3d.components.source.PlanarSource

A source defined on a 2D plane.

tidy3d.components.source.Pulse

A source time that ramps up with some fwidth and oscillates at freq0.

tidy3d.components.source.ReverseInterpolatedSource

Abstract source that allows reverse-interpolation along zero-sized dimensions.

tidy3d.components.source.Source

Abstract base class for all sources.

tidy3d.components.source.SourceTime

Base class describing the time dependence of a source.

tidy3d.components.source.VolumeSource

A source defined in a 3D Box.