Structure and Scene

Structure and Scene#

Overview#

Structures in Tidy3D represent the physical objects to be included in the simulation. A structure is typically made of a geometry and an EM medium (material).

A scene in Tidy3D holds a collection of structures. It is typically used to visualize the physical layout prior to setting up the full simulation.


Structure#

tidy3d.Structure

Defines a physical object that interacts with the electromagnetic fields.

A Structure in Tidy3D consists of a geometry and a medium. It represents a physical object to be included in the simulation domain.

my_structure_1 = Structure(
    geometry = my_geometry,     # previously defined geometry
    medium = my_medium,         # previously defined medium
)

For more information on defining geometries and mediums, please refer to their respective documentation page:

Once a list of structures have been defined, they can be added to the Simulation object:

# list of previously defined structures
my_structure_list = [my_structure_1, my_structure_2, my_structure_3]

# add to simulation
my_sim = Simulation(
    structures = my_structure_list,
    ...    # additional simulation parameters
)

See also

Please see the walkthrough tutorial for an overview of Tidy3D simulation workflow:

For the user’s convenience, we have created a list of commonly used photonic crystal and integrated circuit components in the following pages:


Scene#

tidy3d.Scene

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

A Scene holds a collection of objects and a background medium. You can also define the plotting units. Typically, one would use a Scene to visualize the physical layout prior to defining the rest of the simulation.

# Create a scene using previously defined structures
my_scene = Scene(
    structures = [my_structure1, my_structure2, my_structure3],
    medium = my_background_medium,
    plot_length_units='mm',
)

You can visualize the Scene using methods such as plot(), plot_eps() and so on.

# Plot the previously defined Scene
my_scene.plot(z=0)