tidy3d.HeatSimulation#
- class HeatSimulation[source]#
Bases:
HeatChargeSimulation
Contains all information about heat simulation.
- Parameters:
attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.
size (Union[tuple[Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box]], Box]) – [units = um]. Size in x, y, and z directions.
medium (Union[MultiPhysicsMedium, Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, FullyAnisotropicMedium, CustomMedium, CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomAnisotropicMedium, PerturbationMedium, PerturbationPoleResidue, LossyMetalMedium, Medium2D, AnisotropicMediumFromMedium2D, FluidSpec, SolidSpec, SolidMedium, FluidMedium, ChargeConductorMedium, ChargeInsulatorMedium, SemiconductorMedium] = Medium(attrs={}, name=None, frequency_range=None, allow_gain=False, nonlinear_spec=None, modulation_spec=None, viz_spec=None, heat_spec=None, type='Medium', permittivity=1.0, conductivity=0.0)) – Background medium of simulation, defaults to a standard dispersion-less
Medium
if not specified.structures (Tuple[Structure, ...] = ()) – Tuple of structures present in simulation. Note: Structures defined later in this list override the simulation material properties in regions of spatial overlap.
symmetry (Tuple[Literal[0, 1], Literal[0, 1], Literal[0, 1]] = (0, 0, 0)) – Tuple of integers defining reflection symmetry across a plane bisecting the simulation domain normal to the x-, y-, and z-axis at the simulation center of each axis, respectively. Each element can be
0
(symmetry off) or1
(symmetry on).sources (Tuple[Annotated[Union[tidy3d.components.tcad.source.heat.HeatSource, tidy3d.components.tcad.source.coupled.HeatFromElectricSource, tidy3d.components.tcad.source.heat.UniformHeatSource], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()) – List of heat and/or charge sources.
boundary_spec (Tuple[Annotated[Union[tidy3d.components.tcad.boundary.specification.HeatChargeBoundarySpec, tidy3d.components.tcad.boundary.specification.HeatBoundarySpec], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()) – List of boundary condition specifications.
monitors (Tuple[Annotated[Union[tidy3d.components.tcad.monitors.heat.TemperatureMonitor, tidy3d.components.tcad.monitors.charge.SteadyPotentialMonitor, tidy3d.components.tcad.monitors.charge.SteadyFreeCarrierMonitor, tidy3d.components.tcad.monitors.charge.SteadyCapacitanceMonitor], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()) – Monitors in the simulation.
grid_spec (Union[UniformUnstructuredGrid, DistanceUnstructuredGrid]) – Grid specification for heat-charge simulation.
version (str = 2.8.1) – String specifying the front end version number.
plot_length_units (Optional[Literal['nm', 'μm', 'um', 'mm', 'cm', 'm']] = μm) – When set to a supported
LengthUnit
, plots will be produced with proper scaling of axes and include the desired unit specifier in labels.analysis_spec (Optional[IsothermalSteadyChargeDCAnalysis] = None) – The analysis_spec is used to validate that the simulation parameters and tolerance settings are correctly configured as desired by the user.
Example
>>> import tidy3d as td >>> heat_sim = td.HeatSimulation( ... size=(3.0, 3.0, 3.0), ... structures=[ ... td.Structure( ... geometry=td.Box(size=(1, 1, 1), center=(0, 0, 0)), ... medium=td.Medium( ... permittivity=2.0, heat_spec=td.SolidSpec( ... conductivity=1, ... capacity=1, ... ) ... ), ... name="box", ... ), ... ], ... medium=td.Medium(permittivity=3.0, heat_spec=td.FluidSpec()), ... grid_spec=td.UniformUnstructuredGrid(dl=0.1), ... sources=[td.HeatSource(rate=1, structures=["box"])], ... boundary_spec=[ ... td.HeatChargeBoundarySpec( ... placement=td.StructureBoundary(structure="box"), ... condition=td.TemperatureBC(temperature=500), ... ) ... ], ... monitors=[td.TemperatureMonitor(size=(1, 2, 3), name="sample")], ... )
Attributes
version
DO NOT EDIT: Modified automatically with .bump2version.cfg
Methods
issue_warning_deprecated
(values)Issue warning for 'HeatSimulations'.
plot_heat_conductivity
([x, y, z, ax, alpha, ...])Plot each of simulation's components on a plane defined by one nonzero x,y,z coordinate.
Inherited Common Usage
- plot_heat_conductivity(x=None, y=None, z=None, ax=None, alpha=None, source_alpha=None, monitor_alpha=None, colorbar='conductivity', hlim=None, vlim=None)[source]#
Plot each of simulation’s components on a plane defined by one nonzero x,y,z coordinate.
- Parameters:
x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.
y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.
z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.
ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.
alpha (float = None) – Opacity of the structures being plotted. Defaults to the structure default alpha.
source_alpha (float = None) – Opacity of the sources. If
None
, uses Tidy3d default.monitor_alpha (float = None) – Opacity of the monitors. If
None
, uses Tidy3d default.colorbar (str = "conductivity") – Display colorbar for thermal conductivity (“conductivity”) or heat source rate (“source”).
hlim (Tuple[float, float] = None) – The x range if plotting on xy or xz planes, y range if plotting on yz plane.
vlim (Tuple[float, float] = None) – The z range if plotting on xz or yz planes, y plane if plotting on xy plane.
- Returns:
The supplied or created matplotlib axes.
- Return type:
matplotlib.axes._subplots.Axes
- __hash__()#
Hash method.