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 or BoundaryDictionary

Value and units of the input power, surface heat, or temperature (depending on thermal_condition). Assign a transient condition using the result of a function with the create_*_transient_assignment pattern. Assign a temperature-dependent condition using the result of a function with the create_temp_dep_assignment pattern.

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 the "Voltage" or "Current" option. The default is False, in which case neither option is assigned.

voltage_current_valuestr or dict or BoundaryDictionary, optional

Value and units of current or voltage assignment. Assign a transient condition using the result of a function with the create_*_transient_assignment pattern. The default is None.

Returns:
ansys.aedt.core.modules.boundary.BoundaryObject

Boundary object when successful or None when failed.

References

>>> oModule.AssignSourceBoundary

Examples

>>> from ansys.aedt.core 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"})