assign_current#

Maxwell2d.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, excitation_model: str = 'Single Potential') BoundaryObject#

Assign current excitation.

Parameters:
assignmentlist, str

List of objects to assign the current excitation to.

amplitudefloat or str, optional

Current amplitude. The default is 1A.

phasestr, 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``. When False, it means the conductor is stranded.

swap_directionbool, optional

Reference direction of the current flow. The default is False which means that current is pointing into the terminal.

namestr, optional

Name of the current excitation. The default is None in which case a generic name will be given.

excitation_modelstr, optional

The excitation model to apply for this current excitation. Valid only for A-Phi solvers. Possible choices are "Single Potential", "Double Potentials", and "Double Potentials with Ground". The default is Single Potential.

swap_directionbool, optional

Whether to swap the direction of the voltage drop. Valid only for A-Phi solvers. The default is False.

phasefloat, optional

Voltage phase. Valid only for the A-Phi AC magnetic solver. The default is 0.

Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObject

Boundary 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()