-
Notifications
You must be signed in to change notification settings - Fork 3
Rainy Euler equations with implicit condensation #100
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
==========================================
+ Coverage 91.46% 92.19% +0.73%
==========================================
Files 22 25 +3
Lines 2331 2767 +436
==========================================
+ Hits 2132 2551 +419
- Misses 199 216 +17 ☔ 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? |
tristanmontoya
left a comment
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.
Co-authored-by: Tristan Montoya <[email protected]>
benegee
left a comment
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.
Thanks a lot @tristanmontoya for going through this.
I will address the pending items.
examples/moist_euler/rainy_bubble/elixir_rainy_euler_rainy_bubble.jl
Outdated
Show resolved
Hide resolved
examples/moist_euler/moist_bubble/elixir_rainy_euler_moist_bubble.jl
Outdated
Show resolved
Hide resolved
examples/moist_euler/rainy_bubble/elixir_rainy_euler_rainy_bubble.jl
Outdated
Show resolved
Hide resolved
|
|
||
| function CompressibleRainyEulerEquations2D(; RealT = Float64) | ||
| # Specific heat capacities: | ||
| c_liquid_water = 4186.0 |
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.
Yes, very good point!
| ref_pressure = 1e5 | ||
|
|
||
| # Other: | ||
| gravity = 9.81 |
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.
Same here!
| ref_L = equations.ref_latent_heat_vap_temp | ||
|
|
||
| # testing | ||
| if (temperature < 0.0) |
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.
This is maybe something to discuss.
I think it is not Trixi.jl style. However, negative values, also elsewhere e.g. vapor density, are really critical here. The tests that run in CI should not throw any of them, but if you were to work on these examples again, a warning (maybe not an error) could be helpful.
…xiAtmo.jl into bg/add-rain-implicit
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? |
| xc = 10000 | ||
| zc = 2000 | ||
| rc = 2000 | ||
| Δθ = 2 |
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.
I would be careful with using integer values like this (and elsewhere) rather than using explicit Float32 and/or convert and promote. Could this lead to unwanted integer division if these variables come into contact with other integers? I typically would do something like 1f4 or 10000.0f0 instead of 100000 to avoid this. This is just a question, maybe I am incorrect here, but wanted to be careful.
|
Aside from the above comments about constants and integer values, I'd say this is good to merge. |
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.