-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2D manifold in 3D] Add routines to plot the vorticity for the 3D Cartesian SWE #57
Conversation
… with the signature solution_variables(u_node, equations)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
- Coverage 89.56% 89.41% -0.16%
==========================================
Files 19 20 +1
Lines 1706 1795 +89
==========================================
+ Hits 1528 1605 +77
- Misses 178 190 +12 ☔ View full report in Codecov by Sentry. |
src/callbacks_step/save_solution_2d_manifold_in_3d_cartesian.jl
Outdated
Show resolved
Hide resolved
src/callbacks_step/save_solution_2d_manifold_in_3d_cartesian.jl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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
=