-
Notifications
You must be signed in to change notification settings - Fork 112
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
Update NC-fluxes for the SWE #2038
Update NC-fluxes for the SWE #2038
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
This should also fix the problem mentioned in #868 for the SWE |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2038 +/- ##
==========================================
- Coverage 96.28% 96.27% -0.00%
==========================================
Files 462 462
Lines 37078 37052 -26
==========================================
- Hits 35697 35671 -26
Misses 1381 1381
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The failing downstream test for |
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 is a nice simplification of the nonconservative treatment that we can likely carry over into the shallow water package too, e.g., with the Chen & Noelle nonconservative term.
@patrickersing @andrewwinters5000 Does this indeed fix the problem mentioned in #868 so that we can close that issue? |
I would like to avoid breaking CI of all PRs immediately when merging this PR. Moreover, you should make sure that nothing (non-experimental) breaks for users of TrixiShallowWater.jl. Thus, could you please first prepare a PR for TrixiShallowWater.jl that uses something along the lines of if isdefined(Trixi, :flux_nonconservative_ersing_etal)
import Trixi: flux_nonconservative_ersing_etal
end and change stuff like accordingly? If you can't find a way to adapt TrixiShallowWater.jl so that it works with this PR and continues to work with current Only if all of these steps do not work, we can go ahead as you suggest - but in that case, the PR to TrixiShallowWater.jl should already be prepared so that we can release everything quickly. |
That issue can be closed. This partially fixes it, but that old issue has been superseded by #1445 |
@ranocha I don't see a good way for TrixiShallowWater.jl to work with both the current Instead, I would go with your second suggestion and update the compat bounds for TrixiSW, for which I prepared PR trixi-framework/TrixiShallowWater.jl#52. |
I update the compat bounds in TrixiSW to the latest Trixi release, so merging won't break TrixiSW. However, now the downstream test fails, because of a version conflict: I would suggest, that I prepare a PR for |
Sounds good to me 👍 |
@ranocha @andrewwinters5000 The respective TrixiSW-PR trixi-framework/TrixiShallowWater.jl#53 is now reviewed, so from my end this would be ready to merge. |
Thanks! |
* add example using only Float32 * make RHS work for examples/unstructured_2d_dgsem/elixir_shallowwater_ec_float32.jl * more fixes * format * more fixes * examples/p4est_3d_dgsem/elixir_euler_free_stream_boundaries_float32.jl * add tests * upwind FDSBP * format * format * fix reference values * adapt SWE EC test value after PR #2038 * more mesh fixes * more fixes * Apply suggestions from code review Co-authored-by: Andrew Winters <[email protected]> * remove redundant using Downloads in examples * more comments * format --------- Co-authored-by: Andrew Winters <[email protected]>
This PR rewrites some nonconservative fluxes for the
ShallowWaterEquations
and removes the experimentalflux_nonconservative_ersing_etal
.The current formulation of
flux_nonconservative_wintermeyer_etal
introduces additional inner contributions at the interface of the formequations.gravity * h_ll * b_ll
that need to be canceled with the nonconservative surface flux.Rewriting the nonconservative term of
flux_nonconservative_wintermeyer_etal
fromequations.gravity * h_ll * b_ll
toequations.gravity * h_ll * b_jump
is equivalent in the volume and does not introduce these additional contributions at the interface.This allows us to simplify the nonconservative fluxes and the rewritten
flux_nonconservative_wintermeyer_etal
can now also be used as a surface flux. In fact it is then identical to the experimentalflux_nonconservative_ersing_etal
, which is therefore removed.The tests remain mostly unaffected by this change (which is expected since the fluxes should be equivalent). Only
elixir_shallowwater_source_terms_dirichlet.jl
needs to be updated, probably because of the extraequations.gravity * h_ll * b_ll
that was present at the boundary.Closes #868