assign_winding#
- Maxwell2d.assign_winding(assignment: list | None = None, winding_type: str | None = 'Current', is_solid: bool | None = True, current: float | None = 1, resistance: float | None = 0, inductance: float | None = 0, voltage: float | None = 0, parallel_branches: int | None = 1, phase: float | None = 0, name: str | None = None) BoundaryObject | bool#
Assign a winding to a Maxwell design.
- Parameters:
- assignment
list,optional List of faces to create the coil terminal on. The default is
None.- winding_type
str,optional Type of the winding. Options are
"Current","Voltage", and"External". The default is"Current".- is_solidbool,
optional Whether the winding is the solid type. The default is
True. IfFalse, the winding is the stranded type.- current
float,optional Value of the current in amperes. The default is
1.- resistance
float,optional Resistance in ohms. The default is
0.- inductance
float,optional Inductance in Henry (H). The default is
0.- voltage
float,optional Voltage value. The default is
0.- parallel_branches
int,optional Number of parallel branches. The default is
1.- phase
float,optional Value of the phase delay in degrees. The default is
0.- name
str,optional Name of the winding. The default is
None, in which case a random name with prefixWindingwill be generated.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObjectBounding object for the winding, otherwise only the bounding object.
Falsewhen failed.
References
>>> oModule.AssignWindingGroup
Examples
Assign a winding 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]) >>> winding = m2d.assign_winding(assignment=terminal.name, current=3, name="winding") >>> m2d.desktop_class.close_desktop()