assign_current#
- Maxwell2d.assign_current(assignment, amplitude=1, phase='0deg', solid=True, swap_direction=False, name=None)#
Assign current excitation.
- Parameters:
- assignment
list,str List of objects to assign the current excitation to.
- amplitude
floatorstr,optional Current amplitude. The default is
1A.- phase
str,optional Current phase. The default is
"0deg".- solidbool,
optional Specifies the type of conductor, which can be solid or stranded. The default is
True, which means the conductor is solid``. WhenFalse, it means the conductor is stranded.- swap_directionbool,
optional Reference direction of the current flow. The default is
Falsewhich means that current is pointing into the terminal.- name
str,optional Name of the current excitation. The default is
Nonein which case a generic name will be given.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObjectBoundary object.
References
>>> oModule.AssignCurrent
Examples
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d(solution_type="ElectroDCConduction") >>> cylinder = m3d.modeler.create_cylinder("X", [0, 0, 0], 10, 100, 250) >>> current = m3d.assign_current(cylinder.top_face_x.id, amplitude="2mA") >>> m3d.desktop_class.close_desktop()