Maxwell2d.assign_current(assignment, amplitude=1, phase='0deg', solid=True, swap_direction=False, name=None)[source]#

Assign the source of the current.

assignmentlist, str

List of objects to assign the current source 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. The default is False which means that current is flowing inside the object.

namestr, optional

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


Boundary object.


>>> oModule.AssignCurrent


>>> from pyaedt import Maxwell3d
>>> m3d = Maxwell3d(solution_type="ElectroDCConduction")
>>> cylinder= m3d.modeler.create_cylinder("X",[0,0,0],10,100,250)
>>> current = m3d.assign_current(,amplitude="2mA")
>>> m3d.release_desktop(True, True)