Rainy Euler equations with implicit condensation#100
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
==========================================
- Coverage 97.30% 97.21% -0.10%
==========================================
Files 30 33 +3
Lines 3903 4491 +588
==========================================
+ Hits 3798 4366 +568
- Misses 105 125 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
make max_iterations and tolerance keyword arguments
|
Unfortunately the errors for macos and ubuntu differ by more than the default tolerance. Interestingly, this only happens for the elixir involving a parabolic part. @tristanmontoya observed discrepancies here as well trixi-framework/Trixi.jl#2431 but for other parts of the code. Here as well: #94 (comment) |
|
I still have to go through this in more detail, but I am fine with this PR as a first step. Ultimately, I want to make sure we implement the different model options in an extensible way, as there are so many choices that we need to handle (e.g. gravitational potential term, choice of prognostic variables, condensation model). |
That is my goal as well! The intention of this PR rather is to make sure that @FnHck's implementation makes it into our initial release. |
|
For the time being I just increased the tolerance to make the macos tests pass. Could some mac user maybe check if this is just an issue with the github runners? |
f52fdd8 to
240d43a
Compare
|
I tried to address all points raised during review, and included unit and type stability tests as done in #117 . I also tried to apply our Float32 convention everywhere, as well as switching to our global constants like |
Can we just modify the reference values so CI passes with the unified value of the gravitational acceleration? I'm not sure I understand correctly. The values I used like |
All good! I had just been playing around with the constant to see which tests fail. We have to either adjust the values for the shallow water test, or for the Euler tests. I am fine with adjusting the Euler test cases. But now we are at it, what will be our ultimate standard choice in the future? Williamson? Maybe this one: https://physics.nist.gov/cgi-bin/cuu/Value?gn |
I would keep them as the Williamson values for no other reason than it being what was used in my paper. If DCMIP or some other more recent project has standardized values, we could use that instead. Are the reference values the only reason for the failing tests, @benegee? |
|
Aside from the above comments about constants and integer values, I'd say this is good to merge. |
This is of course some good reason! Yes, I now switched back to "your" constants and your test are now working again. On the other hand, potential temperature test case are now failing. I could update the references for these test cases, or we would need to use non-common constants. What is your opinion @MarcoArtiano ? |
We do not need to use particular values for the constants in the potential temperature test cases, so I'm in favor of that change. |
|
This is now ready to merge! I would like to accept the slight decrease in coverage. If I understand correctly this is mainly due to the new equations having about 96% coverage because of the sanity checks, such as #100 (comment). I would however like to keep those checks for the time being. |
tristanmontoya
left a comment
There was a problem hiding this comment.
Looks good! The only other thing I noticed was that the new elixirs are in a subdirectory examples/moist_euler, but the older moist Euler elixirs are not in that subdirectory, which could appear confusing. But reorganizing the examples (i.e., addressing #29) could be left to another PR so feel free to leave it as-is for now.
|
Thanks a lot @tristanmontoya ! You are right, the examples still need to be re-organized; added to #101 I need another approval because of a small adaption to upstream Trixi.jl changes. |
* rainy Euler equations by Fabian * more tests * add docs * remove coverage check * document Newton solver make max_iterations and tolerance keyword arguments * fmt * typo * tune tests * reference errors * remove currently unused slip wall BCs * use new trixi_test macros * increase tolerance * OrdinaryDiffEq subpackage * wrong subpackage * revert tolerance * check tolerances * check CI_ON_MAC * use same tolerance everywhere * check macos-15 * arch has to be set * increase tolerance * back to macos-latest * even higher? * even even higher * Apply suggestions from code review Co-authored-by: Tristan Montoya <montoya.tristan@gmail.com> * review * fmt * use constants * ignore mpiexec status * check old g * fix testset parameters * initial condition with outer layer data * ouch * keyword argument * another RealT * ouch trixi-framework#2 * type stability tests * revert to previous values in physical constants * update references * moist bubble in MPI as well * nope * increase tolerance for mac tests * remove surface integral from prolong2boundaries xref: trixi-framework/Trixi.jl@b83f30c#diff-e8f9fd74c25ebabebdbb28dc92a9ce890861c2deedac00255e01cfaa45dc9565 * adapt create_cache xref: trixi-framework/Trixi.jl@edde724 --------- Co-authored-by: Tristan Montoya <montoya.tristan@gmail.com>
Part of #95
I suggest merging only the Euler equations with rain and implicit condensation in a first pass. I added just enough tests to achieve good coverage.