assign_floating#
- Maxwell3d.assign_floating(assignment, charge_value=0, name=None)#
Assign floating excitation to model conductors at unknown potentials and specify the total charge on the conductor.
- Parameters:
- assignment
listofint,ansys.aedt.core.modeler.cad.object3d.Object3d, ansys.aedt.core.modeler.elements_3d.FacePrimitiveor strList of objects or faces to assign the excitation to.
- charge_value
int,float,optional Charge value in Coloumb. If not provided, The default is
0.- name
str,optional Name of the excitation. If not provided, a random name with prefix “Floating” will be generated.
- assignment
- Returns:
ansys.aedt.core.modules.Boundary.BoundaryObjectBoundary object.
Falsewhen failed.
References
>>> oModule.AssignFloating
Examples
Assign a floating excitation for a Maxwell 2D Electrostatic design.
>>> from ansys.aedt.core import Maxwell2d >>> m2d = Maxwell2d(version="2025.2") >>> m2d.solution_type = SolutionsMaxwell2D.ElectroStaticXY >>> rect = m2d.modeler.create_rectangle([0, 0, 0], [3, 1], name="Rectangle1") >>> floating = m2d.assign_floating(assignment=rect, charge_value=3, name="floating_test") >>> m2d.desktop_class.close_desktop()
Assign a floating excitation for a Maxwell 3D Electrostatic design providing an object.
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d(version="2025.2") >>> m3d.solution_type = SolutionsMaxwell3D.ElectroStatic >>> box = m3d.modeler.create_box([0, 0, 0], [10, 10, 10], name="Box1") >>> floating = m3d.assign_floating(assignment=box, charge_value=3)
Assign a floating excitation providing a list of faces.
>>> floating1 = m3d.assign_floating(assignment=[box.faces[0], box.faces[1]], charge_value=3) >>> m3d.desktop_class.close_desktop()