API Reference#

Simulation#

Simulation#

Simulation

Contains all information about Tidy3d simulation.

Boundary Conditions#

BoundarySpec

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

Boundary

Boundary conditions at the minus and plus extents along a dimension

BoundaryEdge

Electromagnetic boundary condition at a domain edge.

Types of Boundaries#

Periodic

Periodic boundary condition class.

PECBoundary

Perfect electric conductor boundary condition class.

PMCBoundary

Perfect magnetic conductor boundary condition class.

BlochBoundary

Specifies a Bloch boundary condition along a single dimension.

Absorbing Boundaries#

Types of Absorbers#

PML

Specifies a standard PML along a single dimension.

StablePML

Specifies a 'stable' PML along a single dimension.

Absorber

Specifies an adiabatic absorber along a single dimension.

Absorber Parameters#

AbsorberParams

Specifies parameters common to Absorbers and PMLs.

PMLParams

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

Geometry#

Box

Rectangular prism.

Sphere

Spherical geometry.

Cylinder

Cylindrical geometry.

PolySlab

Polygon extruded with optional sidewall angle along axis direction.

GeometryGroup

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

Mediums#

Non-Dispersive Medium#

Medium

Dispersionless medium.

AnisotropicMedium

Diagonally anisotripic medium.

PECMedium

Perfect electrical conductor class.

Dispersive Mediums#

PoleResidue

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

Lorentz

A dispersive medium described by the Lorentz model.

Sellmeier

A dispersive medium described by the Sellmeier model.

Drude

A dispersive medium described by the Drude model.

Debye

A dispersive medium described by the Debye model.

Material Library#

Structures#

Structure

Defines a physical object that interacts with the electromagnetic fields.

Sources#

Types of Sources#

PointDipole

Uniform current source with a zero size.

UniformCurrentSource

Source in a rectangular volume with uniform time dependence.

PlaneWave

Uniform current distribution on an infinite extent plane.

ModeSource

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

GaussianBeam

Guassian distribution on finite extent plane.

AstigmaticGaussianBeam

This class implements the simple astigmatic Gaussian beam described in Kochkina et al., Applied Optics, vol.

Source Time Dependence#

GaussianPulse

Source time dependence that describes a Gaussian pulse.

Monitors#

FieldMonitor

Monitor that records electromagnetic fields in the frequency domain.

FieldTimeMonitor

Monitor that records electromagnetic fields in the time domain.

FluxMonitor

Monitor that records power flux in the frequency domain.

FluxTimeMonitor

Monitor that records power flux in the time domain.

ModeMonitor

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

ModeSolverMonitor

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

PermittivityMonitor

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

Near2FarCartesianMonitor

Monitor that samples electromagnetic near fields in the frequency domain and invokes the computation of far fields on a Cartesian observation plane.

Near2FarAngleMonitor

Monitor that samples electromagnetic near fields in the frequency domain and invokes the computation of far fields at given observation angles.

Near2FarKSpaceMonitor

Monitor that samples electromagnetic near fields in the frequency domain and invokes the computation of far fields on an observation plane defined in k-space.

Mode Specifications#

ModeSpec

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

Discretization#

GridSpec

Collective grid specification for all three dimensions.

AutoGrid

Specification for non-uniform grid along a given dimension.

UniformGrid

Uniform 1D grid.

CustomGrid

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

Coords

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

FieldGrid

Holds the grid data for a single field.

YeeGrid

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

Grid

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

Output Data#

All Data for a Simulation#

SimulationData

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

Collections of Data from single monitor#

FieldData

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

FieldTimeData

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

ModeSolverData

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

PermittivityData

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

FluxData

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

FluxTimeData

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

ModeData

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

AbstractNear2FarData

Collection of radiation vectors in the frequency domain.

Near2FarAngleData

Data associated with a Near2FarAngleMonitor: components of radiation vectors.

Near2FarCartesianData

Data associated with a Near2FarCartesianMonitor: components of radiation vectors.

Near2FarKSpaceData

Data associated with a Near2FarKSpaceMonitor: components of radiation vectors.

Near2FarSurface

Data structure to store surface monitor data with associated surface current densities.

RadiationVectors

Near field to far field transformation to compute far field radiation vectors.

Individual Datasets#

ScalarFieldDataArray(*args, **kwargs)

Spatial distribution in the frequency-domain.

ScalarModeFieldDataArray(*args, **kwargs)

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

ScalarFieldTimeDataArray(*args, **kwargs)

Spatial distribution in the time-domain.

ModeAmpsDataArray(*args, **kwargs)

Forward and backward propagating complex-valued mode amplitudes.

ModeIndexDataArray(*args, **kwargs)

Complex-valued effective propagation index of a mode.

FluxDataArray(*args, **kwargs)

Flux through a surface in the frequency-domain.

FluxTimeDataArray(*args, **kwargs)

Flux through a surface in the time-domain.

Near2FarAngleDataArray(*args, **kwargs)

Radiation vectors in frequency domain as a function of angles theta and phi.

Near2FarCartesianDataArray(*args, **kwargs)

Radiation vectors in frequency domain as a function of local x and y coordinates.

Near2FarKSpaceDataArray(*args, **kwargs)

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

Logging#

log

Instances of the Logger class represent a single logging channel.

set_logging_level(level)

Raise a warning here instead of setting the logging level.

set_logging_file(fname[, filemode, level])

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

Submitting Simulations#

Through python API#

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

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

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

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

tidy3d.web.webapi.estimate_cost(task_id)

Compute the maximum flex unit charge for a given task, assuming the simulation runs for the full run_time.

tidy3d.web.webapi.get_info(task_id)

Return information about a task.

tidy3d.web.webapi.start(task_id)

Start running the simulation associated with task.

tidy3d.web.webapi.monitor(task_id)

Print the real time task progress until completion.

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

Download results of task and log to file.

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

Download and Load simultion results into SimulationData object.

tidy3d.web.webapi.delete(task_id)

Delete server-side data associated with task.

tidy3d.web.webapi.download_log(task_id[, path])

Download the tidy3d log file associated with a task.

tidy3d.web.webapi.download_json(task_id[, path])

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

tidy3d.web.webapi.load_simulation(task_id[, ...])

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

Convenience for Single and Batch#

tidy3d.web.container.Job

Interface for managing the running of a Simulation on server.

tidy3d.web.container.Batch

Interface for submitting several Simulation objects to sever.

tidy3d.web.container.BatchData

Holds a collection of SimulationData returned by Batch.

Information Containers#

tidy3d.web.task.TaskInfo

general information about task

tidy3d.web.task.TaskStatus(value)

the statuses that the task can be in

Plugins#

Mode Solver#

plugins.ModeSolver

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

Dispersive Model Fitting#

plugins.DispersionFitter

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

plugins.StableDispersionFitter

Stable fitter based on web service

plugins.AdvancedFitterParam

Advanced fitter parameters

Scattering Matrix Calculator#

plugins.ComponentModeler

Tool for modeling devices and computing scattering matrix elements.

plugins.Port

Specifies a port in the scattering matrix.

Web-based Plotting#

Constants#

Physical Constants#

tidy3d.C_0

Double-precision floating-point number type, compatible with Python float and C double.

tidy3d.HBAR

Convert a string or number to a floating point number, if possible.

tidy3d.Q_e

Convert a string or number to a floating point number, if possible.

tidy3d.ETA_0

Double-precision floating-point number type, compatible with Python float and C double.

tidy3d.EPSILON_0

Convert a string or number to a floating point number, if possible.

tidy3d.MU_0

Convert a string or number to a floating point number, if possible.

Tidy3D Special Constants#

tidy3d.inf

Convert a string or number to a floating point number, if possible.

tidy3d.PEC

Perfect electrical conductor class.

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.

Abstract Models#

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

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.medium.AbstractMedium

A medium within which electromagnetic waves propagate.

tidy3d.components.medium.DispersiveMedium

A Medium with dispersion (propagation characteristics depend on frequency)

tidy3d.components.geometry.Geometry

Abstract base class, defines where something exists in space.

tidy3d.components.geometry.Planar

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

tidy3d.components.geometry.Circular

Geometry with circular characteristics (specified by a radius).

tidy3d.components.source.SourceTime

Base class describing the time dependence of a source.

tidy3d.components.source.Source

Abstract base class for all sources.

tidy3d.components.source.FieldSource

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

tidy3d.components.monitor.Monitor

Abstract base class for monitors.