API Reference#

Simulation#

Simulation#

Simulation

Contains all information about Tidy3d simulation.

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.

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 through a plane in the frequency domain.

FluxTimeMonitor

Monitor that records power flux through a plane in the time domain.

ModeMonitor

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

ModeFieldMonitor

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.

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

Holds Monitor data associated with Simulation.

Collections of Data from single monitor#

FieldData

Stores a collection of scalar fields in the frequency domain from a FieldMonitor.

ModeData

Stores a collection of mode decomposition amplitudes and mode effective indexes for all modes in a ModeMonitor.

ModeFieldData

Like FieldData but with extra dimension mode_index.

PermittivityData

Sores a collection of permittivity components over spatial coordinates and frequency from a PermittivityMonitor.

Individual Dataset#

ScalarFieldData

Stores a single scalar field in frequency-domain.

ScalarFieldTimeData

stores a single scalar field in time domain

FluxData

Stores frequency-domain power flux data from a FluxMonitor.

FluxTimeData

Stores time-domain power flux data from a FluxTimeMonitor.

ModeAmpsData

Stores modal amplitdudes from a ModeMonitor.

ModeIndexData

Stores effective propagation index from a ModeMonitor.

Logging#

log

Instances of the Logger class represent a single logging channel.

set_logging_level([level])

Set tidy3d logging level priority.

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.

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.

plugins.ModeSolverData

Holds data associated with ModeSolver.

Dispersive Model Fitting#

plugins.DispersionFitter

Tool for fitting refractive index data to get a dispersive Medium.

plugins.StableDispersionFitter

Stable fitter based on web service

plugins.AdvancedFitterParam

Advanced fitter parameters

Near Field to Far Field Transformation#

plugins.Near2Far

Near field to far field transformation tool.

plugins.Near2FarSurface

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

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

Single-precision floating-point number type, compatible with C float.

tidy3d.EPSILON_0

Single-precision floating-point number type, compatible with C float.

tidy3d.MU_0

Single-precision floating-point number type, compatible with C float.

Tidy3D Special Constants#

tidy3d.inf

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

tidy3d.PEC

Perfect electrical conductor class.

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

tidy3d.components.data.Tidy3dData

Base class for data associated with a simulation.

tidy3d.components.data.CollectionData

Abstract base class.

tidy3d.components.data.AbstractFieldData

Sores a collection of EM fields either in freq or time domain.

tidy3d.components.data.MonitorData

Abstract base class for objects storing individual data from simulation.

tidy3d.components.data.FreqData

Stores frequency-domain data using an f dimension for frequency in Hz.

tidy3d.components.data.TimeData

Stores time-domain data using a t attribute for time in seconds.

tidy3d.components.data.PlanarData

Stores data that must be found via a planar monitor.

tidy3d.components.data.AbstractFluxData

Stores electromagnetic flux through a plane.

tidy3d.components.data.ScalarFieldData

Stores a single scalar field in frequency-domain.