assign_hollow_block#

Icepak.assign_hollow_block(object_name, assignment_type, assignment_value, boundary_name=None, external_temperature='AmbientTemp')[source]#

Assign block boundary for hollow objects.

Parameters:
object_namestr or list

Object name or a list of object names.

assignment_typestr

Type of the boundary assignment. Options are "Heat Transfer Coefficient", "Heat Flux", "Temperature", and "Total Power".

assignment_valuestr or dict

String with value and units of the assignment. If "Total Power" is the assignment type, "Joule Heating" can be used. 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 "Square Wave". - 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_namestr, optional

Name of the source boundary. The default is None, in which case the boundary is automatically generated.

external_temperaturestr, dict or float, optional

String with the value and unit of the temperature for the heat transfer coefficient. If a float value is specified, the "cel" unit is automatically added. For a transient assignment, a dictionary can be used as described for the assignment_value argument. Temperature dependent assignment is not supported. The default is "AmbientTemp".

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], "BlockBox5", "copper")
>>> box.solve_inside = False
>>> temp_dict = {"Type": "Transient", "Function": "Square Wave", "Values": ["1cel", "0s", "1s", "0.5s", "0cel"]}
>>> block = ipk.assign_hollow_block("BlockBox5", "Heat Transfer Coefficient", "1w_per_m2kel", "Test", temp_dict)