Implement hyperbolized Sainte-Marie equations developed by Escalante et al.#288
Conversation
…ons1D with periodic BCs and flat bathymetry
Benchmark Results (Julia v1.10)Time benchmarks
Memory benchmarks
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Pull Request Test Coverage Report for Build 23600542836Details
💛 - Coveralls |
JoshuaLampert
left a comment
There was a problem hiding this comment.
Thanks a lot!
Before I take a closer review, could you please add the new equation system to the README, the landing page of the docs, the table in https://numericalmathematics.github.io/DispersiveShallowWater.jl/previews/PR288/overview/#eq_overview, and the docstring in the overview page https://numericalmathematics.github.io/DispersiveShallowWater.jl/previews/PR288/overview/#Detailed-Documentation?
Could you also please add some unit tests here similar to the other equations and increase coverage?
I also have two questions:
- Is there a known linear dispersion relation for the (hyperbolic) Saint-Marie equations? If yes, could you please add it to https://github.com/NumericalMathematics/DispersiveShallowWater.jl/blob/679edf86f933313a9a65bb97130417c1baf047d9/src/dispersion_relation.jl and if no, could you track that in #131, please?
- Out of interest: Did you do any comparison with your implementation in https://github.com/MarcoArtiano/2026_nonconservative_sbp using Trixi.jl? Would it maybe even be possible to create a simple setup, where both implementations should compute the same (e.g., central flux in the Trixi.jl version vs discontinuosly coupled SBP operators here or using
FDSBPwith one element and a global FD SBP operator in the Trixi.jl version vs the same global SBP operator here)? If not or if it is too much work, that's also fine. I'm just curious.
|
Thanks for the initial review! I updated the docs and added unit tests.
|
MarcoArtiano
left a comment
There was a problem hiding this comment.
Thanks! I've left a few comments,
|
I added the dispersion relations. |
No, I didn't. I just derived the corresponding numerical method by hand. However, I would like to have the equations in TrixiShallowWater.jl. Maybe that's something @MarcoArtiano could do based on his implementation in the reproducibility repository? I spoke with Andrew: it would be totally fine to have a first version without all the wetting and drying treatment (which would also require additional wave breaking models for real applications). |
JoshuaLampert
left a comment
There was a problem hiding this comment.
Thanks! This looks already quite good. I left some comments below.
| return SVector(s1, s2, s3, s4, s5) | ||
| end | ||
|
|
||
| dingemans_calibration(equations::HyperbolicSainteMarieEquations1D) = 1.0 |
There was a problem hiding this comment.
Looking at the zoomed plot for t = 14.0 at https://numericalmathematics.github.io/DispersiveShallowWater.jl/previews/PR288/dingemans/, it looks like there is some phase shift, which might be reduced by tweaking this calibration parameter. How did you come up with 1.0 so far?
There was a problem hiding this comment.
I tried setting the value so that the time series at the first few gauges look reasonable. Note that in the zoomed plots, the phase shifts at t = 14 and t = 70 are in opposite directions. Thus, we cannot fix both of them together.
If you have another suggestion for a good calibration parameter (based on how you estimated it for other models), please let me know.
There was a problem hiding this comment.
Hm, true, do you have an explanation of why the hyperbolic Sainte-Marie equations have such a big difference in the phase velocity compared to the other equations? It seems like the waves are too fast. The linear dispersion relation of them does not seem so bad. We could try a setup similar to the lower one in https://numericalmathematics.github.io/DispersiveShallowWater.jl/previews/PR288/dispersion/ to see if the numerical solution matches the velocity predicted by the linear dispersion relation.
There was a problem hiding this comment.
Ok, just quickly tried that in 1f06885 and it looks as expected. It's just slightly slower.
There was a problem hiding this comment.
Yes, that seems to be the reason. Note that the dispersion relation for
There was a problem hiding this comment.
If you cannot find a bug in my code, it looks like this is just how the hyperbolized Sainte-Marie system behaves 🤷
There was a problem hiding this comment.
Note that the dispersion relation for α = 3 is also quite a bit different from the limiting Sainte-Marie system.
Yes, but for the Dingemans experiment we are talking about a wave number of around 0.85 (that probably becomes bigger when the waves become steeper, but it should not become too high) and for small wave numbers both linear dispersion relations look very similar and even better than most of the other models we have implemented. So I'm wondering where this shift comes from 🤔
But yes, if we don't find any bug, we can just go on and live with it.
There was a problem hiding this comment.
I would be happy to find such a bug - but I haven't been able to do so so far...
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
…tics/DispersiveShallowWater.jl into hr/escalante_et_al_2019
JoshuaLampert
left a comment
There was a problem hiding this comment.
Thanks! If @MarcoArtiano agrees, this can be merged once my final small comment below is resolved.
Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com>
…tics/DispersiveShallowWater.jl into hr/escalante_et_al_2019
There was a problem hiding this comment.
Thanks a lot for adding the new equation system, @ranocha and thanks @MarcoArtiano for your review! From my side, this can be merged.
Thank you too! |
I will add a few additional modifications here soon; I just opened this PR now to get the PR number for the NEWS.md entry.I have implemented the hyperbolization of the Sainte-Marie equations proposed by Escalante, Dumbser, and Castro (2019). The energy-conserving semidiscretization is adapted from the conservative version derived in https://arxiv.org/abs/2603.18978.
Convergence test with manufactured solution:
CC @MarcoArtiano