[2D manifold in 3D] Add routines to plot the vorticity for the 3D Cartesian SWE #57
+188
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the functionality to export solution variables to the hdf5 solution file, which do not only depend on the local numerical solution solution but may depend on the solution variables at other nodes and on the normal vector. The strategy is similar to the one implemented in #51.
In general, the
SaveSolutionCallback
can be initialized aswhere
solution_variables
is a function that is called at each node (i
,j
) of eachelement
, which can have the signatures:solution_variables(u, normal_vector_node, equations, dg, cache, i, j, element)
: Used to compute fields that depend on the entire solution arrayu
, such as the relative vorticity or the Schlieren quantity.solution_variables(u_node, equations)
: Kept for compatibility with the current version of Trixi, which can usecons2cons
,cons2prim
,cons2entropy
, etc.To test this functionality, we add the function$J \vec{a}^3$ , but the user can also set other normal vectors for plotting.
cons2prim_and_vorticity
for the 3D Cartesian SWE, which can be used to export the primitive variables and the relative vorticity. The function is called by default withnormal_vector_node
=The figure below shows the vorticity at time$t=5$ days for a barotropic instability simulation: computed with $\vec{x}$ (left), computed with $J \vec{a}^3$ (middle), and computed using the filters of paraview (right).
normal_vector_node
=normal_vector_node
=