assign_coil#
- Maxwell3d.assign_coil(assignment, conductors_number=1, polarity='Positive', name=None)#
Assign coils to a list of objects or face IDs.
- Parameters:
- assignment
list
List of objects, objects name or face IDs.
- conductors_number
int
,optional
Number of conductors. The default is
1
.- polarity
str
,optional
Type of the polarity. The default is
"Positive"
.- name
str
,optional
Name of the coil. The default is
None
, in which case a random name with prefix “Coil” will be generated.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObject
Bounding object for the winding, otherwise only the bounding object.
False
when failed.
References
>>> oModule.AssignCoil
Examples
Assign coil terminal to an object for a Maxwell 2D Transient design.
>>> from ansys.aedt.core import Maxwell2d >>> m2d = Maxwell2d(solution_type="TransientZ") >>> terminal = m2d.modeler.create_rectangle(origin=[0, 0, 0], sizes=[10, 5]) >>> coil = m2d.assign_coil(assignment=[terminal], conductors_number=5, name="Coil") >>> m2d.release_desktop(True, True)