assign_source#
- Icepak.assign_source(assignment, thermal_condition, assignment_value, boundary_name=None, radiate=False, voltage_current_choice=False, voltage_current_value=None)#
Create a source power for a face.
- Parameters:
- assignment
intorstrorlist Integer indicating a face ID or a string indicating an object name. A list of face IDs or object names is also accepted.
- thermal_condition
str Thermal condition. Accepted values are
"Total Power","Surface Heat","Temperature".- assignment_value
strordictorBoundaryDictionary 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 thecreate_*_transient_assignmentpattern. Assign a temperature-dependent condition using the result of a function with thecreate_temp_dep_assignmentpattern.- boundary_name
str,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_choice
stror bool,optional Whether to assign the
"Voltage"or"Current"option. The default isFalse, in which case neither option is assigned.- voltage_current_value
strordictorBoundaryDictionary,optional Value and units of current or voltage assignment. Assign a transient condition using the result of a function with the
create_*_transient_assignmentpattern. The default isNone.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObjectBoundary object when successful or
Nonewhen 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"}, ... )