-
Notifications
You must be signed in to change notification settings - Fork 47
1. User Guide
This guide is meant to help Tidy3D users understand and get started with the code.
All of the information needed to run a Tidy3D simulation are contained in the tidy3d.Simulation
object.
This object can be thought of as a large, nested data structure containing various components and parameters.
As such, this package gives a python interface for defining this object as well as tools for running the simulation and analyzing the results.
The Simulation
object contains a set of general parameters, such as the size and resolution, which define the global context of the simulation and physics. Additionally, the Simulation
contains a series of "components" that further define the specific physics. For example, a few of the main components are:
-
tidy3d.Structure
objects, which define the geometry of objects in your simulation, as well as their material properties. -
tidy3d.Source
objects, which define the electric current distributions that give rise to the electromagnetic fields in the simulation. -
tidy3d.Monitor
objects, which define how data from the simulation is measured and stored for analyzing later.
While these components can be hard-coded or defined programmatically, at times they require more exploration or experimentation to define. For this purpose, we also provide various "plugins" to help users with more complicated aspects of defining these components. Here are a few examples of plugins used to help define the Simulation
.
- A library of commonly used dispersive materials that can be imported and used in the simulation.
- A tool for fitting optical (n, k) data to create customized materials.
- A mode solver that allows the user to define custom modal sources and monitors.
Many more plugins are in development and will be released in the coming months, with tools for optimization, structure analysis, nonuniform meshing, and others.
With the Simulation
object defined, we can then run it on Flexcompute's servers using the web
api also defined in this repository. This section will describe how to do this at a high level.
While anyone can define a Tidy3D simulation through the python API provided here, to run a simulation on our servers requires a Tidy3D account and "credits". The credits required for running a simulation depend on the amount of "work" required to perform the computation. For more details on signing up and purchasing credits, see this link.
Because all simulations must be run on our remote servers, we provide an API for uploading, managing, and downloading your simulations.
A set of tidy3d.web
provides a set of functions for granular control of tasks, but we also provide tidy3d.web.Job
and tidy3d.web.Batch
interfaces for more convenient handling of single or multiple jobs, respectively.
At a high level, the steps required for running a simulation are:
- Upload
Simulation
object to server with some metadata, which is then referred to as a 'task'. - Tell the server to start running the task.
- Monitor task progress.
- When finished, download data, including the solver log and data for each
Monitor
. - Load the data locally into a
tidy3d.SimulationData
object, which provides an interface for analyzing, and visualizing the results.
Alternatively, users may use a browser-based interface for managing all previous and current tasks, which will be updated continuously in the coming months with additional for task editing and data visualization, among others.
If you have a specific question, see the documentation linked in the footer of this wiki or leave a question in our Issues or Discussion page of this repository.
Visit the Tidy3D documentation for more details.