assign_solid_block#
- Icepak.assign_solid_block(object_name, power_assignment, boundary_name=None, htc=None, ext_temperature='AmbientTemp')[source]#
Assign block boundary for solid objects.
- Parameters:
- object_name
str
orlist
Object name or a list of object names.
- power_assignment
str
ordict
String with the value and units of the power assignment or with
"Joule Heating"
. For a temperature-dependent or transient assignment, a dictionary can be used. The dictionary should contain three keys:"Type"
,"Function"
, and"Values"
. - For the"Type"
key, accepted values are"Temp Dep"
and"Transient"
. - For the"Function"
key, acceptable values depend on the"Type"
key selection. When the"Type"
key is set to"Temp Dep"
, the only accepted value is"Piecewise Linear"
. When the"Type"
key is set to"Transient"
, acceptable values are “Exponential”`, “Linear”`,"Piecewise Linear"
,"Power Law"
,"Sinusoidal"
, and"SquareWave"
. - For the"Values"
key, a list of strings contain the parameters required by the"Function"
key selection. For example, when``”Linear”`` is set as the"Function"
key, two parameters are required: the value of the variable at t=0 and the slope of the line. For the parameters required by each"Function"
key selection, see the Icepak documentation. The parameters must contain the units where needed.- boundary_name
str
,optional
Name of the source boundary. The default is
None
, in which case the boundary name is automatically generated.- htc
float
,str
,or
dict
,optional
String with the value and units of the heat transfer coefficient for the external conditions. If a float is provided, the
"w_per_m2kel"
unit is used. For a temperature-dependent or transient assignment, a dictionary can be used. For more information, see the description for the precedingpower_assignment
parameter. The default isNone
, in which case no external condition is applied.- ext_temperature
float
,str
ordict
,optional
String with the value and units of temperature for the external conditions. If a float is provided, the
"cel"
unit is used. For a transient assignment, a dictionary can be used. For more information, see the description for the precedingpower_assignment
parameter. The default is"AmbientTemp"
, which is used if thehtc
parameter is not set toNone
.
- object_name
- Returns:
pyaedt.modules.Boundary.BoundaryObject
Boundary object when successful or
None
when failed.
References
>>> oModule.AssignBlockBoundary
Examples
>>> from pyaedt import Icepak >>> ipk = Icepak() >>> ipk.solution_type = "Transient" >>> box = ipk.modeler.create_box([5, 5, 5], [1, 2, 3], "BlockBox3", "copper") >>> power_dict = {"Type": "Transient", "Function": "Sinusoidal", "Values": ["0W", 1, 1, "1s"]} >>> block = ipk.assign_solid_block("BlockBox3", power_dict)