PyDPF-Post refactoring: plotting #213
GuillemBarroso
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Discussion on plotting command.
Some thoughts about how the users will interact with the command
plot()
. Of course, everything here is to be discussed.Static simulation
Plot with default values
3D plot of the requested field on the entire domain.
Plot points
plot colored spheres in the requested nodes with the mesh in the background. Interpolate values if they are not in the solution file.
Plot lines
3D plot of the line (colored by field) and mesh in background.
If
graph=True
(default = False):plot 2D plot with line length (x-axis) and field (y-axis). If several lines are requested, plot them on the same figure. Additional parameter
individual_figures
can be passed to plot them in separated figures.Plot planes:
2D plot of the requested plane. If several planes requested, plot them in separated figures.
If we want a 3D plot of the mesh cutted by the plane, do:
where
"+"
or"-"
denotes the side of the mesh taken. Should we add a keyword for this?side
?volume_side
?take_side
?Define interactions
How to define Intersections should go to a different discussion maybe... but I'd like to have something like:
Transient simulation
By default, plot the last time step of the simulation.
Timesteps can be requested by ID o by time.
If a requested timestep is not found in the solution, the default behavior is to find the closest timestep to the requested one. Output an info messing exlaining that the plotted timestep is different than the one requested. If
interpolate=True
force interpolation of the requested timestep.Plot points:
Only selecting some points
Same than for static simulation, but now plotting last timestep by default. Here
graph=True
can be passed to plot a 2D plot (graph plot) with time (x-axis) and field (y-axis). One curve per point if several points are requested.Selecting points and time
3D plot with the mesh on the background with colored spheres in the required nodes. Size of the sphere depending on the size of the elements.
Selecting points and named spaces or qualifiers
Same as selecting points but excluding the ones outside of the selected named spaces or qualifiers.
Plot lines
Only selecting lines
3D plots a line with the mesh in the background for the last time step. By default
graph=False
. If set to true:plots a 2D graph: line length (x-axis) vs field (y-axis). If several lines are requested, plot them on the same figure. Additional parameter
individual_figures
can be passed to plot them in separated figures.Selecting lines and time
Same than before but for the required time step. If more time-steps are inputed, plot several figures?
If
graph=True
and more than one time-step is requested, plot several curves in the same 2D figure.Selecting lines and named spaces or qualifiers:
Same but only show the part of the lines that are inside the named spaces or qualifiers.
Plot planes:
Only selecting planes:
2D contour plot of the field in that plane for the last timestep. One figure per plane requested.
To get a 3D plot with the mesh cutted by the plane:
Selecting planes and timestep:
Same but for the requested timestep. If more than 1 timestep is requested, plot 1 figure per timestep.
Selecting planes and named spaces and/or qualifiers:
Same but only show the part of the plane inside the named space or qualifiers.
Harmonic problem
Same than transient but, by default, plot the first mode.
Beta Was this translation helpful? Give feedback.
All reactions