Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4a7a89a
Added method for Inception Voltage Evaluation for electrostatic Maxwe…
tizianrot Nov 11, 2025
3adb514
CHORE: Auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
49b081b
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
3bb851d
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
9df171e
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
757f729
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
9200422
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
31ed72d
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 11, 2025
8275d5f
CHORE: Auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
577a536
Added method for Inception Voltage Evaluation for electrostatic Maxwe…
tizianrot Nov 11, 2025
cc58ca2
Merge remote-tracking branch 'origin/feat_inception_voltage' into fea…
tizianrot Nov 11, 2025
c8a964a
Update src/ansys/aedt/core/visualization/post/post_maxwell.py
tizianrot Nov 12, 2025
9147ca6
Apply suggestions from code review
tizianrot Nov 19, 2025
1fa2bdb
Correction accepted. for Inception Voltage Evaluation for electrostat…
tizianrot Nov 19, 2025
59e9a2a
Corrected to address alls Issue #6875
tizianrot Nov 19, 2025
e1f0ecc
Merge branch 'main' into feat_inception_voltage
tizianrot Nov 19, 2025
ca4c23f
as per last Sebastien's review
tizianrot Nov 19, 2025
a106a16
chore: adding changelog file 6869.added.md [dependabot-skip]
pyansys-ci-bot Nov 19, 2025
22c55ac
as flagged during test
tizianrot Nov 19, 2025
e798ae3
Merge remote-tracking branch 'origin/feat_inception_voltage' into fea…
tizianrot Nov 19, 2025
f49e51b
as flagged during test
tizianrot Nov 19, 2025
81b10c3
Merge branch 'main' into feat_inception_voltage
gmalinve Nov 24, 2025
f86b6b1
fix test and raise exception
gmalinve Nov 24, 2025
ca7efaf
Merge branch 'main' into feat_inception_voltage
gmalinve Nov 24, 2025
8ed8447
Merge branch 'main' into feat_inception_voltage
gmalinve Nov 25, 2025
c97d951
improve test
gmalinve Nov 25, 2025
86b05e3
Merge remote-tracking branch 'origin/feat_inception_voltage' into fea…
gmalinve Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions src/ansys/aedt/core/visualization/post/post_maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

from ansys.aedt.core.base import PyAedtBase
from ansys.aedt.core.generic.general_methods import pyaedt_function_handler
from ansys.aedt.core.internal.checks import min_aedt_version
from ansys.aedt.core.internal.errors import AEDTRuntimeError
from ansys.aedt.core.visualization.post.field_data import FieldPlot
from ansys.aedt.core.visualization.post.post_3dlayout import PostProcessor3DLayout
from ansys.aedt.core.visualization.post.post_common_3d import PostProcessor3D
Expand Down Expand Up @@ -348,3 +350,59 @@ def create_fieldplot_layers_nets(
return self.post_3dlayout.create_fieldplot_layers_nets(
layers_nets, quantity, setup, intrinsics, plot_on_surface, plot_name
)

@pyaedt_function_handler()
@min_aedt_version("2026.1")
def evaluate_inception_voltage(self, plot_name, field_line_number=None):
"""Perform Inception voltage evaluation on selected filed line traces.

.. note::
This method required field line traces to computed beforehand.

Parameters
----------
field_line_plot_name : str
Name of the Field Line trace plot as it appears on the GUI project manager tree.
field_line_number: list of int, optional
List of the lines for which the evaluation will be performed, generated by a previous call to
m2d.post.create_fieldplot_line_traces.
If None is passed, the inception voltage evaluation is performed for all the created field line traces

Returns
-------
Bool

References
----------
>>> oModule.EvaluateInceptionVoltage

Examples
--------
Create an instance of Maxwell and link to a project named
``projectname``. If this project does not exist, create one with
this name.

>>> from ansys.aedt.core import Maxwell2d
>>> m2d = Maxwell2d(project_name)

Create a field line traces plot in the Region from seeding faces (insulator faces).
>>> plot = m2d.post.create_fieldplot_line_traces(
>>> seeding_faces = (["Ground", "Electrode", "Region"],)
>>> in_volume_tracing_objs = (["Region"],)
>>> plot_name="LineTracesTest")

Now you can perform the inception voltage evaluation on all (or a subset of) the created field line traces.
>>> m2d.post.evaluate_inception_voltage(plot_name=plot.name, field_line_number=[1, 2, 4])
>>> m2d.desktop_class.release_desktop()

"""
if self._app.solution_type != "Electrostatic":
raise AEDTRuntimeError("Field line traces is valid only for electrostatic solution")
if plot_name not in (self.field_plot_names):
raise AEDTRuntimeError("The Field Line Tracing Plot needs to be generated.")
if not field_line_number:
self.ofieldsreporter.EvaluateInceptionVoltage(plot_name)
return True
else:
self.ofieldsreporter.EvaluateInceptionVoltage(plot_name, field_line_number)
return True
12 changes: 12 additions & 0 deletions tests/system/visualization/test_12_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from ansys.aedt.core import TwinBuilder
from ansys.aedt.core.generic.general_methods import is_linux
from ansys.aedt.core.generic.settings import settings
from ansys.aedt.core.internal.errors import AEDTRuntimeError
from ansys.aedt.core.visualization.plot.pyvista import _parse_aedtplt
from ansys.aedt.core.visualization.plot.pyvista import _parse_streamline
from tests import TESTS_VISUALIZATION_PATH
Expand Down Expand Up @@ -795,3 +796,14 @@ def test_twinbuilder_spectral(self, tb_app):
new_report.time_start = "0ns"
new_report.time_stop = "40ms"
assert new_report.create()

def test_m2d_evaluate_inception_voltage(self, m2dtest):
m2dtest.set_active_design("field_line_trace")
with pytest.raises(AEDTRuntimeError):
m2dtest.post.evaluate_inception_voltage("my_plot", [1, 2, 4])
plot = m2dtest.post.create_fieldplot_line_traces(["Ground", "Electrode"], "Region")
assert m2dtest.post.evaluate_inception_voltage(plot.name)
assert m2dtest.post.evaluate_inception_voltage(plot.name, [1, 2, 4])
m2dtest.solution_type = "Magnetostatic"
with pytest.raises(AEDTRuntimeError):
m2dtest.post.evaluate_inception_voltage("my_plot", [1, 2, 4])
Loading