assign_source#

Icepak.assign_source(assignment, thermal_condition, assignment_value, boundary_name=None, radiate=False, voltage_current_choice=False, voltage_current_value=None)[source]#

Create a source power for a face.

Parameters:
assignmentint or str or list

Integer indicating a face ID or a string indicating an object name. A list of face IDs or object names is also accepted.

thermal_conditionstr

Thermal condition. Accepted values are "Total Power", "Surface Heat", "Temperature".

assignment_valuestr or dict

Value and units of the input power, surface heat or temperature (depending on thermal_condition). A dictionary can be used for temperature dependent or transient

assignment. The dictionary should contain three keys: "Type", "Function" and "Values". Accepted "Type" values are: "Temp Dep" and "Transient". Accepted "Function" are: "Linear", "Power Law", "Exponential", "Sinusoidal", "Square Wave" and "Piecewise Linear". "Temp Dep" only support the latter. "Values" contains a list of strings containing the parameters

required by the "Function" selection (e.g. "Linear" requires two parameters: the value of the variable at t=0 and the slope of the line). The parameters required by each Function option is in 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 name is generated automatically.

radiatebool, optional

Whether to enable radiation. The default is False.

voltage_current_choicestr or bool, optional

Whether to assign "Voltage" or "Current" or none of them. The default is False (none of them is assigned).

voltage_current_valuestr or dict, optional

Value and units of current or voltage assignment. A dictionary can be used for transient assignment. The dictionary must be structured as described for the assignment_value argument. The default is None.

Returns:
pyaedt.modules.Boundary.BoundaryObject

Boundary object when successful or None when failed.

References

>>> oModule.AssignSourceBoundary

Examples

>>> from pyaedt import Icepak
>>> app = Icepak()
>>> box = app.modeler.create_box([0, 0, 0], [20, 20, 20], name="box")
>>> ds = app.create_dataset1d_design("Test_DataSet", [1, 2, 3], [3, 4, 5])
>>> app.solution_type = "Transient"
>>> b = app.assign_source("box", "Total Power", assignment_value={"Type": "Temp Dep",
... "Function": "Piecewise Linear", "Values": "Test_DataSet"})