2D Forces plots

Use the output of a harmonic coil and show the Field quality

Download Input files

Setting up

Standard Loading of input, Parsing and Initializing RoxiePlotOutputs object

from roxieapi.output.plots import RoxiePlotOutputs

plots = RoxiePlotOutputs(
    "../input_files/dipole_2d.post.xml", "../input_files/dipole_2d.data"
)

Plotting the Roxie standard Forces plot

Show all forces as Graph, with y=Force, and x=Conductor number

parser = plots.output
forces = parser.get_conductor_forces()
if forces is not None:
    fig = plots.graphs.plot_forces(forces)
    fig

Plotting as 2D crossection plot

Same information, but for each force plot a separate crosssection plot

plots.plots2d.plot_conductor_forces()
Lorenz forces in conductors, X component, Perpendicular, Radial, Y component, Parallel, Azimuthal
<Figure size 1200x800 with 7 Axes>

Show as table

Most output data is stored in Pandas Dataframes, so they can be used for tabular output (to display or files)

forces
cond fx fy ftr fpa fra faz
0 1 -15999.283 -1145.3686 -1020.3099 -16007.745 -16018.317 -838.13061
1 2 -15839.633 -4551.7958 -4179.2469 -15941.979 -16058.183 -3707.77230
2 3 -15436.232 -7940.0025 -7330.9707 -15734.604 -16065.342 -6574.62320
3 4 -14783.503 -11329.2430 -10504.0300 -15380.802 -16037.026 -9471.93290
4 5 -13883.643 -14732.9170 -13720.8680 -14884.628 -15981.269 -12426.32000
... ... ... ... ... ... ... ...
155 156 -78154.596 -14997.0900 78541.0080 12820.440 10462.645 78889.71200
156 157 -71466.124 14505.0560 -71836.3880 12543.403 13136.504 -71730.29900
157 158 -78154.596 14997.0900 -78541.0080 12820.440 10462.645 -78889.71200
158 159 71466.124 14505.0560 71836.3880 12543.403 13136.504 71730.29900
159 160 78154.596 14997.0900 78541.0080 12820.440 10462.645 78889.71200

160 rows × 7 columns



Total running time of the script: (0 minutes 12.260 seconds)

Gallery generated by Sphinx-Gallery