API Reference

Tidy3D API

Simulation

Simulation(size[, center, resolution, …])

Main class for building a simulation model.

Simulation.load_results(dfile)

Load the probe data recorded from a Tidy3D run.

Simulation.export()

Return a dictionary with all simulation parameters and objects.

Simulation.export_json(fjson)

Export the simulation to a JSON file.

Simulation.import_json(fjson)

Import a simulation from a JSON file.

Materials

Medium([epsilon, sigma, name])

Base class for a custom defined material.

Medium.from_nk(n, k, freq[, name])

Define a material through the real and imaginary part of the refractive index at a given frequency.

PEC

Perfect electric conductor.

PMC

Perfect magnetic conductor.

Structures

Box(center, size, material[, name])

Box structure, i.e. a 3D rectangular block.

Sphere(center, radius, material[, name])

Sphere structre.

Cylinder(center, axis, radius, height, material)

Cylinder structre.

PolySlab(vertices, z_cent, z_size, material)

A structure defined as polygon in x and y with a constnant extent in z.

GdsSlab(gds_cell, z_cent, z_size, material)

A structure defined through a GDSII cell imported through gdspy.

Sources

GaussianSource(center, size, f0, fwidth, …)

Electric current source with Gaussian-pulse time dependence in a rectangular 3D region.

PlaneSource(normal, pos_offset, f0, fwidth, …)

Electric current source with Gaussian-pulse time dependence spanning a 2D plane inside the simulation.

Probes

TimeProbe(center, size[, t_start, t_stop, …])

Probe recording the time-domain fields within a 3D region.

FreqProbe(center, size, freqs[, field, name])

Probe recording a Fourier transform of the fields within a 3D region, for a given list of frequencies.

Plotting tools

viz.relative_eps(sim[, normal, offset, ax, …])

Plot the relative permittivity distribution in a 2D cross-section.

viz.source_time(source[, ax])

Plot the time dependence of a given source.

viz.fprobe_2D(sim, probe_ind[, freq_ind, …])

Plot a 2D cross-section of the field stored in a FreqProbe object at a given frequency.

viz.tprobe_2D(sim, probe_ind[, time_ind, …])

Plot a 2D cross-section of the field stored in a TimeProbe object at a given time step.

Task submission

web.newProject(taskParam[, solverVersion, …])

Create new project.

web.getProject(taskId)

Get all project details from a given taskId.

web.deleteProject(taskId)

Delete a project from a given taskId.

web.monitorProject(taskId)

Monitor the status of a given project every second.

web.listProjects([Nprojects])

Print a summary of all projects of the current user, in chronological order of submission.

web.downloadResults(taskId[, target_folder])

Download the results of a solver run, including a json file defining the simulation, a single file containing all the probe data, and a log file.