Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Transient Field plot in Maxwell 2D Transient #815

Merged
merged 2 commits into from
Feb 3, 2022
Merged
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
13 changes: 13 additions & 0 deletions _unittest/test_12_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,19 @@ def test_15_export_plot(self):
)
assert os.path.exists(obj.image_file)

@pytest.mark.skipif(is_ironpython, reason="Not running in ironpython")
def test_16_create_field_plot(self):
cutlist = ["Global:XY"]
plot = self.aedtapp.post._create_fieldplot(
objlist=cutlist,
quantityName="Mag_E",
setup_name=self.aedtapp.nominal_adaptive,
intrinsincList={"Freq": "5GHz", "Phase": "0deg"},
objtype="Surface",
listtype="CutPlane",
)
assert plot

def test_51_get_efields(self):
if is_ironpython:

Expand Down
2 changes: 1 addition & 1 deletion examples/02-Maxwell/Maxwell2D_Transient.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
cutlist = ["Global:XY"]
face_lists = rect1.faces
face_lists += rect2.faces
timesteps = [str(i * 1e-3) + "s" for i in range(21)]
timesteps = [str(i * 2e-4) + "s" for i in range(11)]
id_list = [f.id for f in face_lists]
animatedGif = maxwell_2d.post.animate_fields_from_aedtplt_2(
"Mag_B",
Expand Down
2 changes: 2 additions & 0 deletions pyaedt/modules/PostProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,8 @@ def _create_fieldplot(self, objlist, quantityName, setup_name, intrinsincList, o
plot.objtype = objtype
plot.listtype = listtype
plt = plot.create()
if "Maxwell" in self._app.design_type and self.post_solution_type == "Transient":
self.ofieldsreporter.SetPlotsViewSolutionContext([plot_name], setup_name, "Time:" + intrinsincList["Time"])
if plt:
self.field_plots[plot_name] = plot
return plot
Expand Down