Skip to content

Add Shallow water moment equation models in 1D#128

Merged
andrewwinters5000 merged 22 commits intotrixi-framework:mainfrom
patrickersing:swme
Feb 24, 2026
Merged

Add Shallow water moment equation models in 1D#128
andrewwinters5000 merged 22 commits intotrixi-framework:mainfrom
patrickersing:swme

Conversation

@patrickersing
Copy link
Copy Markdown
Member

This PR adds two new equation types for the one-dimensional Shallow water moment equations and Shallow water linearized moment equations:

  • ShallowWaterMomentEquations1D
  • ShallowWaterLinearizedMomentEquations1D

Details about the implementation and models can be found in the preprint:

  • Julio Careaga, Patrick Ersing, Julian Koellermeier, Andrew R. Winters (2026)
    Entropy analysis and entropy stable DG methods for the shallow water moment equations
    DOI: 10.48550/arXiv.2602.06513

@patrickersing patrickersing added the enhancement New feature or request label Feb 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 98.81188% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.27%. Comparing base (729b1a8) to head (f70060a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/equations/equations.jl 50.00% 2 Missing ⚠️
...c/equations/shallow_water_linearized_moments_1d.jl 98.81% 2 Missing ⚠️
src/equations/shallow_water_moments_1d.jl 99.11% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
- Coverage   99.32%   99.27%   -0.05%     
==========================================
  Files          87       94       +7     
  Lines        4587     5092     +505     
==========================================
+ Hits         4556     5055     +499     
- Misses         31       37       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@patrickersing
Copy link
Copy Markdown
Member Author

Convergence results:


SWME

elixir_shallowwater_moments_convergence with polydeg=3:
image


SWLME

elixir_shallowwater_linearized_moments_convergence with polydeg=3:
image

@patrickersing patrickersing marked this pull request as ready for review February 16, 2026 09:54
Copy link
Copy Markdown
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

Thanks for adding the new equation systems and functionality! I only left a few comments.

patrickersing and others added 2 commits February 17, 2026 14:50
Co-authored-by: Andrew Winters <andrew.ross.winters@liu.se>
Copy link
Copy Markdown
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. The small drop in coverage is acceptable as noise.

Copy link
Copy Markdown
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

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

It all looks good to me! Just one small thing for the sake of consistency; in the Monai tutorial we could maybe change source_terms_manning_friction to be source_term_manning_friction on lines 265 and 319 in the file docs/src/tutorials/elixir_shallowwater_monai_tsunami.jl.

@patrickersing
Copy link
Copy Markdown
Member Author

patrickersing commented Feb 23, 2026

It all looks good to me! Just one small thing for the sake of consistency; in the Monai tutorial we could maybe change source_terms_manning_friction to be source_term_manning_friction on lines 265 and 319 in the file docs/src/tutorials/elixir_shallowwater_monai_tsunami.jl.

@andrewwinters5000 Right, we should make that consistent. However, we currently have not implemented source_term_manning_friction for the standard ShallowWaterEquations1D, so I think we would need to extend the existing TrixiSW function inside the tutorial. I don't think that is optimal for an introductory example.

Should we just open an issue for now and then properly implement the source_term_manning_friction for the SWE in a separate PR?

@andrewwinters5000
Copy link
Copy Markdown
Member

Should we just open an issue for now and then properly implement the source_term_manning_friction for the SWE in a separate PR?

Yeah, let's just open an issue about naming consistency of the friction source terms. This should be done separate from this feature PR.

@patrickersing
Copy link
Copy Markdown
Member Author

I have created issue #129 to document the inconsistency and will start working on a respective PR soon. With that I think everything should be addressed in this PR.

@andrewwinters5000
Copy link
Copy Markdown
Member

With that I think everything should be addressed in this PR.

I agree, we are good to merge.

@andrewwinters5000 andrewwinters5000 merged commit f0c6807 into trixi-framework:main Feb 24, 2026
14 of 17 checks passed
@patrickersing patrickersing deleted the swme branch February 24, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants