assign_current#
- Maxwell2d.assign_current(assignment, amplitude=1, phase='0deg', solid=True, swap_direction=False, name=None)[source]#
Assign the source of the current.
- Parameters:
- assignment
list
,str
List of objects to assign the current source to.
- amplitude
float
orstr
,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. The default is
False
which means that current is flowing inside the object.- name
str
,optional
Name of the current excitation. The default is
None
in which case a generic name will be given.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.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.release_desktop(True, True)