Skip to content

Commit 8a677ce

Browse files
SMoraisAnsyspyansys-ci-botSamuelopez-ansys
authored
REFACTOR: Improve assign balloon method (#6017)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Samuel Lopez <[email protected]>
1 parent 94e7c1f commit 8a677ce

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/changelog.d/6017.miscellaneous.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve assign balloon method

src/ansys/aedt/core/maxwell.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,9 +3375,8 @@ def assign_balloon(self, assignment, boundary=None, is_voltage=False):
33753375
Name of the boundary. The default is ``None``, in which
33763376
case the default name is used.
33773377
is_voltage: bool, optional
3378-
Balloon type. This option is valid for Electrostatic solvers only.
3379-
If ``True`` boundary type is "Voltage" otherwise is "Charge".
3380-
The default is ``False´´ in which case the "Charge" type is selected.
3378+
Whether the boundary is of type voltage or not. The default is ``False``.
3379+
This option is valid for Electrostatic solvers only.
33813380
33823381
Returns
33833382
-------
@@ -3406,6 +3405,8 @@ def assign_balloon(self, assignment, boundary=None, is_voltage=False):
34063405
props = {"Edges": assignment}
34073406
if self.solution_type == "Electrostatic":
34083407
props["IsOfTypeVoltage"] = is_voltage
3408+
else:
3409+
self.logger.warning("Balloon boundary with type voltage is only valid for Electrostatic solvers.")
34093410
return self._create_boundary(boundary, props, "Balloon")
34103411

34113412
@pyaedt_function_handler(input_edge="assignment", vectorvalue="vector_value", bound_name="boundary")

0 commit comments

Comments
 (0)