Skip to content
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

Covariant formulation of the shallow water equations #58

Merged
merged 48 commits into from
Jan 29, 2025

Conversation

tristanmontoya
Copy link
Member

@tristanmontoya tristanmontoya commented Dec 23, 2024

New version of #37 with entropy-stable split forms and auxiliary variables. Requires Trixi.jl v0.9.9 (see #59). The following new features are implemented:

  • New equation type CovariantShallowWaterEquations2D which implements the split formulation of the covariant derivative using non-conservative terms, but does not use non-conservative terms for the standard formulation. The split formulation conserves total energy when no interface dissipation is added.
  • Non-conservative flux-differencing and interface flux kernels for the covariant form using auxiliary variables.
  • Auxiliary variables expanded to include more geometric information, including Christoffel symbols (which, for the moment, are computed by applying the LGL collocation derivative operator to the analytical metric tensor components). Note that the split formulation is provably stable regardless of how these geometric terms are computed, although in the future, I plan to add the exact computation of the Christoffel symbols.
  • Analysis routines for covariant-form equations take integrals of functions of the form func(u, aux_vars, equations) rather than just func(u, equations), which is needed since entropy is a function of auxiliary variables in this case.
  • Standardized initial conditions with automatic conversions to the chosen global coordinate system (i.e. Cartesian or spherical) and set of conservative variables. Currently, we have the Gaussian solid-body rotation, steady geostrophic balance, and Rossby-Haurwitz wave, based on Cases 1, 2, and 6 of the Williamson et al. test suite, respectively.
  • Notation is changed to consistently use J rather than sqrtG for the area element.

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 95.50562% with 16 lines in your changes missing coverage. Please review.

Project coverage is 90.39%. Comparing base (029c14e) to head (ca50226).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/equations/covariant_advection.jl 72.22% 5 Missing ⚠️
src/equations/covariant_shallow_water.jl 93.58% 5 Missing ⚠️
src/equations/shallow_water_3d.jl 0.00% 4 Missing ⚠️
src/equations/equations.jl 97.22% 1 Missing ⚠️
...vers/dgsem_p4est/dg_2d_manifold_in_3d_covariant.jl 98.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   89.45%   90.39%   +0.94%     
==========================================
  Files          20       22       +2     
  Lines        1801     2104     +303     
==========================================
+ Hits         1611     1902     +291     
- Misses        190      202      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tristanmontoya tristanmontoya marked this pull request as ready for review January 3, 2025 21:20
@tristanmontoya tristanmontoya changed the title WIP: Covariant formulation of the shallow water equations Covariant formulation of the shallow water equations Jan 3, 2025
Copy link
Collaborator

@amrueda amrueda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks, @tristanmontoya! great work!
I have not checked the math thoroughly, but I leave a couple of comments below.
BTW, thanks for improving the documentation of my elixirs as well!

amrueda
amrueda previously approved these changes Jan 29, 2025
Copy link
Collaborator

@amrueda amrueda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks, @tristanmontoya!
Some minor comments below:

Co-authored-by: Andrés Rueda-Ramírez <aruedara@uni-koeln.de>
@tristanmontoya
Copy link
Member Author

LGTM! Thanks, @tristanmontoya! Some minor comments below:

Great, thanks for your review! Going to make those changes and merge now.

@tristanmontoya tristanmontoya merged commit 2db20a7 into main Jan 29, 2025
10 checks passed
@tristanmontoya tristanmontoya deleted the tm/new_shallow_water branch January 29, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants