Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions doc/changelog.d/6575.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flux lines plot
2 changes: 2 additions & 0 deletions src/ansys/aedt/core/visualization/post/field_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ def plotsettings(self):
List of plot settings.
"""
if self.surfaces or self.cutplanes or (self.layer_nets and self.layer_plot_type == "LayerNetsExtFace"):
if self.quantity == "Flux_Lines":
self.IsoVal = "Line"
arg = [
"NAME:PlotOnSurfaceSettings",
"Filled:=",
Expand Down
15 changes: 15 additions & 0 deletions tests/system/visualization/test_12_1_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def m2d_app(add_app):
app.close_project(app.project_name)


@pytest.fixture()
def m2d_blank(add_app):
app = add_app(application=ansys.aedt.core.Maxwell2d)
yield app
app.close_project(app.project_name)


class TestClass:
def test_export_model_picture(self, aedtapp, local_scratch):
path = aedtapp.post.export_model_picture(full_name=Path(local_scratch.path) / "images2.jpg")
Expand Down Expand Up @@ -188,6 +195,14 @@ def test_create_fieldplot_surface_4(self, aedtapp):
intrinsic = {"Freq": frequency, "Phase": phase}
assert not aedtapp.post.create_fieldplot_surface(123123123, "Mag_E", setup_name, intrinsic)

def test_create_fieldplot_surface_5(self, m2d_blank):
circ = m2d_blank.modeler.create_circle(origin=[0, 0, 0], radius=5, material="copper")
m2d_blank.assign_current(assignment=circ.name, amplitude=5)
region = m2d_blank.modeler.create_region(pad_value=100)
m2d_blank.assign_balloon(assignment=region.edges)
m2d_blank.create_setup()
assert m2d_blank.post.create_fieldplot_surface(assignment=m2d_blank.modeler.object_list, quantity="Flux_Lines")

def test_design_setups(self, aedtapp):
assert len(aedtapp.design_setups["Setup1"].sweeps[0].frequencies) > 0
assert isinstance(aedtapp.design_setups["Setup1"].sweeps[0].basis_frequencies, list)
Expand Down
Loading