assign_current#
- Maxwell3d.assign_current(assignment: list | str, amplitude: int | float | str | None = 1, phase: str | None = '0deg', solid: bool | None = True, swap_direction: bool | None = False, name: str | None = None) BoundaryObject#
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()