assign_resistance#
- Icepak.assign_resistance(objects, boundary_name=None, total_power='0W', fluid='air', laminar=False, loss_type='Device', linear_loss=['1m_per_sec', '1m_per_sec', '1m_per_sec'], quadratic_loss=[1, 1, 1], linear_loss_free_area_ratio=[1, 1, 1], quadratic_loss_free_area_ratio=[1, 1, 1], power_law_constant=1, power_law_exponent=1, loss_curves_x=[[0, 1], [0, 1]], loss_curves_y=[[0, 1], [0, 1]], loss_curves_z=[[0, 1], [0, 1]], loss_curve_flow_unit='m_per_sec', loss_curve_pressure_unit='n_per_meter_sq')#
Assign resistance boundary condition.
- Parameters:
- objects
list
orstr
A list of objects to which the resistance condition will be assigned. It can be a single object (a string) or multiple objects specified as a list.
- boundary_name
str
,optional
The name of the boundary object that will be created. If not provided, a unique name is generated. The default is
None
.- total_power
str
,float
,or
dict
orBoundaryDictionary
,optional
The total power transferred to the fluid through the resistance volume. It is specified as a string with a value and unit, a float where the default unit “W” is used. Assign a transient condition using the result of a function with the
create_*_transient_assignment
pattern. Default is"0W"
.- fluid
str
,optional
The material of the volume to which the resistance is being assigned. Default is
"air"
.- laminarbool,
optional
Whether the flow inside the volume must be treated as laminar or not. Default is
False
.- loss_type
str
,optional
Type of pressure loss model to be used. It can have one of the following values:
"Device"
,"Power Law"
, and"Loss Curve"
. Default is"Device"
.- linear_loss
list
of
floats
orlist
of
strings
,optional
Three values representing the linear loss coefficients in the X, Y, and Z directions. These coefficients can be expressed as floats, in which case the default unit
"m_per_sec"
will be used, or as strings. Relevant only ifloss_type=="Device"
. Default is"1m_per_sec"
for all three directions.- quadratic_loss
list
of
floats
orlist
of
strings
,optional
Three values representing the quadratic loss coefficients in the X, Y, and Z directions. Relevant only if
loss_type=="Device"
. Default is1
for all three directions.- linear_loss_free_area_ratio
list
of
floats
orlist
of
strings
,optional
Three values representing the linear loss free area ratio in the X, Y, and Z directions. Relevant only if
loss_type=="Device"
. Default is1
for all three directions.- quadratic_loss_free_area_ratio
list
of
floats
orlist
of
strings
,optional
Three values representing the quadratic loss coefficient for each direction (X, Y, Z) in the loss model. Relevant only if
loss_type=="Device"
. Default is1
for all three directions.- power_law_constant
str
orfloat
,optional
Specifies the coefficient in the power law equation for pressure loss. Default is
1
.- power_law_exponent
str
orfloat
,optional
Specifies the exponent value in the power law equation for pressure loss calculation. Default is
1
.- loss_curves_x
list
of
lists
of
float
List of two list defining the loss curve in the X direction. The first list contains the mass flow rate value of the curve while the second contains the pressure values. Units can be specified with the
loss_curve_flow_unit
andloss_curve_pressure_unit
parameters. Default is[[0,1],[0,1]]
.- loss_curves_y
list
of
lists
of
float
List of two list defining the loss curve in the Y direction. The first list contains the mass flow rate value of the curve while the second contains the pressure values. Units can be specified with the
loss_curve_flow_unit
andloss_curve_pressure_unit
parameters. Default is[[0,1],[0,1]]
.- loss_curves_z
list
of
lists
of
float
List of two list defining the loss curve in the Z direction. The first list contains the mass flow rate value of the curve while the second contains the pressure values. Units can be specified with the
loss_curve_flow_unit
andloss_curve_pressure_unit
parameters. Default is[[0,1],[0,1]]
.- loss_curve_flow_unit
str
,optional
Specifies the unit of flow rate in the loss curvev (for all directions). Default is
"m_per_sec"
.- loss_curve_pressure_unit
str
,optional
Specifies the unit of pressure drop in the loss curve (for all directions). Default is
"n_per_meter_sq"
.
- objects
- Returns:
ansys.aedt.core.modules.boundary.BoundaryObject
Boundary object when successful or
None
when failed.
References
>>> oModule.AssignResistanceBoundary