tidy3d.FluidMedium#

class FluidMedium[source]#

Bases: AbstractHeatMedium

Fluid medium. Heat simulations will not solve for temperature

in a structure that has a medium with this ‘heat_spec’.

attrsdict = {}

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 an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

nameOptional[str] = None

Optional unique name for medium.

thermal_conductivityOptional[NonNegativeFloat] = None

[units = W/(um*K)]. Thermal conductivity (k) of the fluid.

viscosityOptional[NonNegativeFloat] = None

[units = kg/(um*s)]. Dynamic viscosity (μ) of the fluid.

specific_heatOptional[NonNegativeFloat] = None

[units = um^2/(s^2*K)]. Specific heat of the fluid at constant pressure.

densityOptional[NonNegativeFloat] = None

[units = kg/um^3]. Density (ρ) of the fluid.

expansivityOptional[NonNegativeFloat] = None

[units = 1/K]. Thermal expansion coefficient (β) of the fluid.

The full set of parameters is primarily intended for calculations involving natural convection, where they are used to determine the heat transfer coefficient. In the current version, these specific properties may not be utilized for other boundary condition types.

thermal_conductivityfloat, optional

Thermal conductivity ($k$) of the fluid in $W/(mu m cdot K)$.

viscosityfloat, optional

Dynamic viscosity ($mu$) of the fluid in $kg/(mu m cdot s)$.

specific_heatfloat, optional

Specific heat ($c_p$) of the fluid in $mu m^2/(s^2 cdot K)$.

densityfloat, optional

Density ($

ho$) of the fluid in $kg/mu m^3$.
expansivityfloat, optional

Thermal expansion coefficient ($eta$) of the fluid in $1/K$.

>>> # If you are using a boundary condition without a natural convection model,
>>> # the specific properties of the fluid are not required. In this common
>>> # scenario, you can instantiate the class without arguments.
>>> air = FluidMedium()
>>> # It is most convenient to define the fluid from standard SI units
>>> # using the `from_si_units` classmethod.
>>> # The following defines air at approximately 20°C.
>>> air_from_si = FluidMedium.from_si_units(
...     thermal_conductivity=0.0257,  # Unit: W/(m*K)
...     viscosity=1.81e-5,          # Unit: Pa*s
...     specific_heat=1005,         # Unit: J/(kg*K)
...     density=1.204,              # Unit: kg/m^3
...     expansivity=1/293.15        # Unit: 1/K
... )
>>> # One can also define the medium directly in Tidy3D units.
>>> # The following is equivalent to the example above.
>>> air_direct = FluidMedium(
...     thermal_conductivity=2.57e-8,
...     viscosity=1.81e-11,
...     specific_heat=1.005e+15,
...     density=1.204e-18,
...     expansivity=1/293.15
... )

Attributes

Methods

from_si_units(viscosity, specific_heat, ...)

Inherited Common Usage

thermal_conductivity#
viscosity#
specific_heat#
density#
expansivity#
from_si_units(viscosity, specific_heat, density, expansivity)[source]#
__hash__()#

Hash method.