tidy3d.HeatSimulation#
- class HeatSimulation[source]#
Bases:
HeatChargeSimulationContains all information about heat simulation.
- Parameters:
center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.
size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.
medium (Union[
MultiPhysicsMedium,Medium,AnisotropicMedium,PECMedium,PMCMedium,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()) – Background medium of simulation, defaults to a standard dispersion-lessMediumif 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[Union[
HeatSource,HeatFromElectricSource,UniformHeatSource], …] = ()) – List of heat and/or charge sources.boundary_spec (tuple[Union[
HeatChargeBoundarySpec,HeatBoundarySpec], …] = ()) – List of boundary condition specifications.monitors (tuple[Union[
TemperatureMonitor,SteadyPotentialMonitor,SteadyFreeCarrierMonitor,SteadyEnergyBandMonitor,SteadyElectricFieldMonitor,SteadyCapacitanceMonitor,SteadyCurrentDensityMonitor], …] = ()) – Monitors in the simulation.grid_spec (Union[
UniformUnstructuredGrid,DistanceUnstructuredGrid]) – Grid specification for heat-charge simulation.version (str = 2.11.0.dev2) – String specifying the front end version number.
plot_length_units (Optional[Literal['nm', 'μm', 'um', 'mm', 'cm', 'm', 'mil', 'in']] = μm) – When set to a supported
LengthUnit, plots will be produced with proper scaling of axes and include the desired unit specifier in labels.structure_priority_mode (Literal['equal', 'conductor'] = 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
LossyMetalMediumis set to 90,PECMediumto 100, and others to 0.analysis_spec (Optional[Union[
SteadyChargeDCAnalysis,IsothermalSteadyChargeDCAnalysis,SSACAnalysis,IsothermalSSACAnalysis,UnsteadyHeatAnalysis]] = None) – The analysis_spec is used to specify the type of simulation. Currently, it is used to specify Charge simulations or transient Heat simulations.
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", unstructured=True)], ... )
Attributes
mediumBackground medium of simulation, defaults to a standard dispersion-less
Mediumif not specified.sourcesmonitorsboundary_specgrid_specsymmetryanalysis_specstructuresTuple of structures present in simulation.
versionplot_length_unitsstructure_priority_modeValidating setup
sizecenterMethods
issue_warning_deprecated(data)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.
- 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