From 57c39a2d1b7e9e51185923e2a2c95259f622b636 Mon Sep 17 00:00:00 2001 From: Giulia Malinverno Date: Tue, 24 Sep 2024 16:41:25 +0200 Subject: [PATCH] add plot and update index.rst --- examples/aedt/maxwell_2d/index.rst | 1 - examples/low_frequency/magnetic/index.rst | 1 - examples/low_frequency/magnetic/magneto_motive_line.py | 6 ++++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/aedt/maxwell_2d/index.rst b/examples/aedt/maxwell_2d/index.rst index dab96d50b..38378af73 100644 --- a/examples/aedt/maxwell_2d/index.rst +++ b/examples/aedt/maxwell_2d/index.rst @@ -10,7 +10,6 @@ These examples use PyAEDT to show Maxwell 2D capabilities ../../low_frequency/general/electrostatic.py ../../low_frequency/general/external_circuit.py ../../low_frequency/general/resistance.py - ../../low_frequency/magnetic/magneto_motive_contour.py ../../low_frequency/magnetic/magneto_motive_line.py ../../low_frequency/magnetic/transient_winding.py ../../low_frequency/magnetic/lorentz_actuator.py diff --git a/examples/low_frequency/magnetic/index.rst b/examples/low_frequency/magnetic/index.rst index b7d2098aa..6929bdbaf 100644 --- a/examples/low_frequency/magnetic/index.rst +++ b/examples/low_frequency/magnetic/index.rst @@ -7,6 +7,5 @@ These examples use PyAEDT to show some magnetics applications. transient_winding.py choke.py - magneto_motive_contour.py magneto_motive_line.py lorentz_actuator.py diff --git a/examples/low_frequency/magnetic/magneto_motive_line.py b/examples/low_frequency/magnetic/magneto_motive_line.py index c340ba5be..8aa4c3b3c 100644 --- a/examples/low_frequency/magnetic/magneto_motive_line.py +++ b/examples/low_frequency/magnetic/magneto_motive_line.py @@ -17,6 +17,7 @@ # # Perform required imports. +import os import tempfile import time @@ -58,6 +59,11 @@ design="Maxwell2DDesign1", ) +# ## Plot model + +model = m2d.plot(show=False) +model.plot(os.path.join(temp_folder.name, "Image.jpg")) + # # First option # ## Create a polyline