Skip to content

Commit 21deea2

Browse files
committed
fix description
1 parent ccfa8e6 commit 21deea2

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

examples/03-Maxwell/Maxwell3D_Transient_Fields_Export.py

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# # Maxwell 3D: fields export in transient
2-
# This example uses PyAEDT to setup transient analysis
3-
# of an imported Maxwell 3D model and aim to plot
4-
# the current density field over a coil surface and export the fields data.
5-
# Keywords: time steps, fields calculator, field export
2+
#
3+
# This example shows how to leverage PyAEDT to set up a Maxwell 3D transient analysis,
4+
# compute the average value of the current density field over a specific coil surface
5+
# and the magnitude of the current density field over all coil surfaces at each time step
6+
# of the transient analysis.
7+
# Keywords: transient, fields calculator, field export
68

79
# ## Perform required imports
810
#
911
# Perform required imports.
1012

1113
import tempfile
14+
import time
1215

1316
import pyaedt
1417

@@ -28,17 +31,17 @@
2831

2932
# ## Import project
3033
#
31-
# The files required to run this example will be downloaded to the temporary working folder.
34+
# The files required to run this example will be downloaded into the temporary working folder.
3235

3336
project_path = pyaedt.downloads.download_file(
3437
source="maxwell_transient_fields",
3538
name="M3D_Transient_StrandedWindings.aedt",
36-
destination=temp_folder.name
39+
destination=temp_folder.name,
3740
)
3841

3942
# ## Initialize and launch Maxwell 3D
4043
#
41-
# Initialize and launch Maxwell 3D, providing the version, and the path of the imported project.
44+
# Initialize and launch Maxwell 3D, providing the version and the path of the project.
4245

4346
m3d = pyaedt.Maxwell3d(
4447
project=project_path, version=AEDT_VERSION, non_graphical=NG_MODE
@@ -61,6 +64,7 @@
6164
# ## Create field expressions
6265
#
6366
# Create a field expression to evaluate J normal to a surface using the advanced fields calculator.
67+
# The expression is created as a dictionary and then provided as an argument to ``add_expression``.
6468

6569
my_expression = {
6670
"name": "Jn",
@@ -122,10 +126,10 @@
122126
data = sol.get_solution_data()
123127
time_steps = data.intrinsics["Time"]
124128

125-
# ## Create a field plot over the coil surface and export field data
129+
# ## Create field plots over the coil surfaces and export field data
126130
#
127131
# Convert each time step into ``ms``.
128-
# Create fields plot on the surface of each coil by specifying the coil object,
132+
# Create field plots over the surface of each coil by specifying the coil object,
129133
# the quantity to plot and the time step.
130134
# The average value of J normal is plotted on Coil_A2 surface for every time-step.
131135
# The J field is plotted on the surface of each coil for every time-step.
@@ -169,4 +173,6 @@
169173
# Release AEDT and remove both the project and temporary directory.
170174

171175
m3d.release_desktop()
176+
177+
time.sleep(3)
172178
temp_folder.cleanup()

0 commit comments

Comments
 (0)