assign_floating#

Maxwell2d.assign_floating(assignment, charge_value=0, name=None)[source]#

Assign floating excitation to model conductors at unknown potentials and specify the total charge on the conductor.

Parameters:
assignmentlist of int, ansys.aedt.core.modeler.cad.object3d.Object3d,

ansys.aedt.core.modeler.elements_3d.FacePrimitive or str

List of objects or faces to assign the excitation to.

charge_valueint, float, optional

Charge value. If not provided, The default is 0.

namestr, optional

Name of the excitation. If not provided, a random name with prefix “Floating” will be generated.

Returns:
ansys.aedt.core.modules.Boundary.BoundaryObject

Boundary object. False when failed.

References

>>> oModule.AssignFloating

Examples

Assign a floating excitation for a Maxwell 2d Electrostatic design

>>> from ansys.aedt.core import Maxwell2d
>>> m2d = Maxwell2d(version="2024.2")
>>> m2d.solution_type = SOLUTIONS.Maxwell2d.ElectroStaticXY
>>> rect = self.aedtapp.modeler.create_rectangle([0, 0, 0], [3, 1], name="Rectangle1")
>>> floating = self.aedtapp.assign_floating(assignment=rect, charge_value=3, name="floating_test")
>>> m2d.release_desktop(True, True)

Assign a floating excitation for a Maxwell 3d Electrostatic design providing an object >>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d(version=”2024.2”) >>> m3d.solution_type = SOLUTIONS.Maxwell3d.ElectroStatic >>> box = self.aedtapp.modeler.create_box([0, 0, 0], [10, 10, 10], name=”Box1”) >>> floating = self.aedtapp.assign_floating(assignment=box, charge_value=3) Assign a floating excitation providing a list of faces >>> floating1 = self.aedtapp.assign_floating(assignment=[box.faces[0], box.faces[1]], charge_value=3) >>> m3d.release_desktop(True, True)