Skip to content

flex_rf.tidy3d.Scene

Type: class Base(s): Tidy3dBaseModel

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

sim = Scene(
structures=[
Structure(
geometry=Box(size=(1, 1, 1), center=(0, 0, 0)),
medium=Medium(permittivity=2.0),
),
],
medium=Medium(permittivity=3.0),
)
medium [MultiPhysicsMediumType3D] = factory: Medium

Background medium of scene, defaults to vacuum if not specified.

structures [tuple[Structure, ...] | None] = ()

Tuple of structures present in scene. Note: In regions of spatial overlap between structures, material properties are dictated by structure of higher priority. The priority for structure of priority=None is set automatically based on structure_priority_mode. For structures of equal priority, the structure added later to the structure list takes precedence.

structure_priority_mode [PriorityMode] = 'equal'

This field only affects structures of priority=None. If equal, the priority of those structures is set to 0; if conductor, the priority of structures made of LossyMetalMedium is set to 90, PECMedium to 100, and others to 0.

plot_length_units [LengthUnit | None] = 'μm'

When set to a supported LengthUnit, plots will be produced with proper scaling of axes and include the desired unit specifier in labels.

all_structures()

List of all structures in the simulation including the background.

background_structure()

Returns structure representing the background of the Scene.

bounds()

Automatically defined scene’s bounds based on present structures. Infinite dimensions are ignored. If the scene contains no structures, the bounds are set to (-1, -1, -1), (1, 1, 1). Similarly, if along a given axis all structures extend infinitely, the bounds along that axis are set from -1 to 1.

box()

Automatically defined scene’s Box.

center()

Automatically defined scene’s center.

doping_absolute_minimum()

Get the absolute minimum values of the doping concentrations.

doping_bounds()

Get the maximum and minimum of the doping

eps_bounds(freq: float | None = None, eps_component: str | None = None)

Compute range of (real) permittivity present in the scene at frequency “freq”.

heat_charge_property_bounds(property: str)

Compute range of the heat-charge simulation property present in the scene.

heat_conductivity_bounds()

Compute range of thermal conductivities present in the scene.

intersecting_media(test_object: Box, structures: tuple[Structure, ...])

From a given list of structures, returns a set of AbstractMedium associated with those structures that intersect with the test_object, if it is a surface, or its surfaces, if it is a volume.

intersecting_structures(test_object: Box, structures: tuple[Structure, ...])

From a given list of structures, returns a list of Structure that intersect with the test_object, if it is a surface, or its surfaces, if it is a volume.

medium_map()

Returns dict mapping medium to index in material. medium_map[medium] returns unique global index of AbstractMedium in scene.

mediums()

Returns set of distinct AbstractMedium in scene.

perturbed_mediums_copy(temperature: CustomSpatialDataType | None = None, electron_density: CustomSpatialDataType | None = None, hole_density: CustomSpatialDataType | None = None, interp_method: InterpMethod = 'linear')

Return a copy of the scene with heat and/or charge data applied to all mediums that have perturbation models specified. That is, such mediums will be replaced with spatially dependent custom mediums that reflect perturbation effects. Any of temperature, electron_density, and hole_density can be None. All provided fields must have identical coords.

plot(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, fill_structures: bool = True, **patch_kwargs: Any)

Plot each of scene’s components on a plane defined by one nonzero x,y,z coordinate.

plot_3d(width: int = 800, height: int = 800)

Render 3D plot of Scene (in jupyter notebook only). Parameters ---------- width : float = 800 width of the 3d view dom’s size height : float = 800 height of the 3d view dom’s size

plot_eps(x: float | None = None, y: float | None = None, z: float | None = None, freq: float | None = None, alpha: float | None = None, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, eps_lim: tuple[float | None, float | None] = (None, None), scale: PlotScale = 'lin')

Plot each of scene’s components on a plane defined by one nonzero x,y,z coordinate. The permittivity is plotted in grayscale based on its value at the specified frequency.

plot_heat_charge_property(x: float | None = None, y: float | None = None, z: float | None = None, alpha: float | None = None, cbar: bool = True, property: str = 'heat_conductivity', ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None)

Plot each of scebe’s components on a plane defined by one nonzero x,y,z coordinate. The thermal conductivity is plotted in grayscale based on its value.

plot_heat_conductivity(x: float | None = None, y: float | None = None, z: float | None = None, alpha: float | None = None, cbar: bool = True, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None)

Plot each of scebe’s components on a plane defined by one nonzero x,y,z coordinate. The thermal conductivity is plotted in grayscale based on its value.

plot_structures(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, fill: bool = True)

Plot each of scene’s structures on a plane defined by one nonzero x,y,z coordinate.

plot_structures_eps(x: float | None = None, y: float | None = None, z: float | None = None, freq: float | None = None, alpha: float | None = None, cbar: bool = True, reverse: bool = False, eps_lim: tuple[float | None, float | None] = (None, None), scale: PlotScale = 'lin', ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, grid: Grid = None, eps_component: PermittivityComponent | None = None)

Plot each of scene’s structures on a plane defined by one nonzero x,y,z coordinate. The permittivity is plotted in grayscale based on its value at the specified frequency.

plot_structures_heat_charge_property(x: float | None = None, y: float | None = None, z: float | None = None, alpha: float | None = None, cbar: bool = True, property: str = 'heat_conductivity', reverse: bool = False, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None)

Plot each of scene’s structures on a plane defined by one nonzero x,y,z coordinate. The thermal conductivity is plotted in grayscale based on its value.

plot_structures_heat_conductivity(x: float | None = None, y: float | None = None, z: float | None = None, alpha: float | None = None, cbar: bool = True, reverse: bool = False, ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None)

Plot each of scene’s structures on a plane defined by one nonzero x,y,z coordinate. The thermal conductivity is plotted in grayscale based on its value.

plot_structures_property(x: float | None = None, y: float | None = None, z: float | None = None, freq: float | None = None, alpha: float | None = None, cbar: bool = True, reverse: bool = False, limits: tuple[float | None, float | None] = (None, None), scale: PlotScale = 'lin', ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, grid: Grid = None, property: Literal['eps', 'doping', 'N_a', 'N_d'] = 'eps', eps_component: PermittivityComponent | None = None)

Plot each of scene’s structures on a plane defined by one nonzero x,y,z coordinate. The permittivity is plotted in grayscale based on its value at the specified frequency.

size()

Automatically defined scene’s size.

sorted_structures()

Returns a list of sorted structures based on their priority.In the sorted list, latter added structures take higher priority.