assign_voltage_drop#
- Maxwell2d.assign_voltage_drop(assignment: list, amplitude: float | None = 1, swap_direction: bool | None = False, name: str | None = None)#
Assign a voltage drop across a list of faces to a specific value.
The voltage drop applies only to sheet objects. It is available only for Magnetostatic 3D.
- Parameters:
- assignment
list List of faces to assign a voltage drop to.
- amplitude
float,optional Voltage amplitude in mV. The default is
1.- swap_directionbool,
optional Whether to swap the direction. The default value is
False.- name
str,optional Name of the excitation. If not provided, a random name with prefix
VoltageDropwill be generated.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObjectBoundary object.
Falsewhen failed.
References
>>> oModule.AssignVoltageDrop
Examples
Create a cylinder in Maxwell 3D and assign voltage drop to one of its face.
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d(solution_type="Magnetostatic") >>> cylinder = m3d.modeler.create_cylinder(origin=[0, 0, 0], radius=5, height=15, orientation="Z") >>> m3d.assign_voltage_drop(assignment=cylinder.top_face_z, amplitude="1V", name="Volt", swap_direction=False) >>> m3d.desktop_class.close_desktop()