tidy3d.ConvectionBC#
- class ConvectionBC[source]#
Bases:
HeatChargeBCConvective thermal boundary conditions.
- 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,
attrsare mutable. For example, the following is allowed for setting anattrobj.attrs['foo'] = bar. Also note that Tidy3D will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().ambient_temperature (PositiveFloat) β [units = K]. Ambient temperature.
transfer_coeff (Union[NonNegativeFloat, VerticalNaturalConvectionCoeffModel]) β [units = W/(um^2*K)]. Heat transfer coefficient value.
Example
>>> import tidy3d as td >>> bc = td.ConvectionBC(ambient_temperature=300, transfer_coeff=1)
>>> # Convection with a natural convection model. >>> # First, define the fluid medium (e.g. air at 300 K). >>> air = td.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 ... ) >>> >>> # Next, create the model, which requires the fluid and a characteristic length. >>> natural_conv_model = td.VerticalNaturalConvectionCoeffModel.from_si_units( ... medium=air, plate_length=1e-5 ... ) >>> >>> # Finally, create the boundary condition using this model. >>> bc_natural = td.ConvectionBC( ... ambient_temperature=300, transfer_coeff=natural_conv_model ... )
>>> # If the fluid medium is not provided to the coefficient model, it is automatically retrieved from >>> # the interface. >>> natural_conv_model = td.VerticalNaturalConvectionCoeffModel.from_si_units(plate_length=1e-5) >>> bc_natural_nom = td.ConvectionBC( ... ambient_temperature=300, transfer_coeff=natural_conv_model ... )
Attributes
Methods
Inherited Common Usage
- ambient_temperature#
- transfer_coeff#
- __hash__()#
Hash method.