assign_torque#

Maxwell2d.assign_torque(assignment, coordinate_system='Global', is_positive=True, is_virtual=True, axis='Z', torque_name=None)#

Assign a torque to one or more objects.

Torque assignment can be calculated based upon the solver type. For 3D solvers the available solution types are: Magnetostatic, Electrostatic, Eddy Current, Transient and Electric Transient. For 2D solvers the available solution types are: Magnetostatic, Electrostatic, Eddy Current and Transient.

Parameters:
assignmentstr or list

One or more objects to assign the torque to.

coordinate_systemstr, optional

Name of the reference coordinate system. The default is "Global".

is_positivebool, optional

Whether the torque is positive. The default is True.

is_virtualbool, optional

Whether the torque is virtual. The default is True.

axisstr, optional

Axis to apply the torque to. The default is "Z".

torque_namestr, optional

Name of the torque. The default is None, in which case the default name is used.

Returns:
bool

True when successful, False when failed.

References

>>> oModule.AssignTorque

Examples

Assign virtual torque to an object:

>>> from ansys.aedt.core import Maxwell3d
>>> m3d = Maxwell3d(solution_type="Transient")
>>> cylinder = m3d.modeler.create_cylinder(origin=[0, 0, 0], orientation="Z", radius=3, height=21)
>>> m3d.assign_torque(assignment=cylinder.name, axis="Z", is_virtual=True, torque_name="torque")
>>> m3d.release_desktop(True, True)