-
Notifications
You must be signed in to change notification settings - Fork 37
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
add ventilation coefficient (Pruppacher & Rasmussen 1979 & Froessling 1938) + Reynolds number attr + air dynamic viscosity formulae + unit tests (incl. drop size changes upon ventilation-in-parcel-below-cloud vs. no-ventilation) + refactor of env vars __getitem__ logic #1282
add ventilation coefficient (Pruppacher & Rasmussen 1979 & Froessling 1938) + Reynolds number attr + air dynamic viscosity formulae + unit tests (incl. drop size changes upon ventilation-in-parcel-below-cloud vs. no-ventilation) + refactor of env vars __getitem__ logic #1282
Conversation
@kaitlyn-loftus, thanks!!! For all PRs, we run the CI workflow in several steps, on of the first featuring
For this reason, most of the tests were not run. The To run the unit tests locally, executing Thanks again! |
Thank you! |
Great!! Thanks for explaining. I originally ran the pylint tests before staging the new files, so none of them got checked 😅 |
Thinking out loud, a next step here could be to add a new super-particle attribute: Reynolds number. |
@kaitlyn-loftus, in the above commit 9c2269f, there are some refactors towards making the ventilation coefficient being used inside condensation/evaporation solver. Added also more unit tests and a simpler "classic" formula from Froessling 1938 for reference. Please have a look if the changes look OK? Next step on my side: use the ventilation coefficient in the condensation solver - stay tuned, thanks |
@slayoo these changes look good. Thanks for fixing the air density to include the water vapor contribution; I had meant to flag that as a todo. The only potential issue I see is how the ventilation_coefficient method in PySDM/physics/ventilation/pruppacher_rasmussen_1979.py would handle sqrt_re_times_cbrt_sc=const.PRUPPACHER_RASMUSSEN_1979_XTHRES. This looks to me like it would give NaN (unless there is some clever handling elsewhere in the code). |
Very valid point! Thanks, @kaitlyn-loftus |
I think this will still give 0 at the threshold, instead of ~1.02. Is np.heaviside friendly with the CPU and GPU accelerators? |
Thanks, @kaitlyn-loftus ! We don't have yet any tests covering GPU for this, so let's address GPU compatibility when we will get there... |
@kaitlyn-loftus just a quick update: here's a fresh PR introducing a refactor of the CPU condensation logic which is meant to make the introduction of the ventilation factor there much simpler - #1291 |
…& Schmidt numbers, and air dynamic viscosity,
…sation arg change in particulator (not ready yet)
… thanks @kaitlyn-loftus! (let's try to address GPU compatibility after adding tests covering the GPU backend...)
f886fec
to
0e365a7
Compare
@kaitlyn-loftus, the a40ca41 commit above contains draft of code for actually using the ventilation coeffs in condensation integrator. This includes a basic test depicting that evaporation of a single droplet in subsaturated env proceeds faster if ventilation if taken into account: https://github.com/open-atmos/PySDM/blob/a40ca41377ecb8e57f68d83cf81e605071511147/tests/unit_tests/dynamics/condensation/test_ventilation.py Stay tuned for updated GPU code. |
@kaitlyn-loftus, CI green! :) |
great news! |
OK, I'm merging then, and will follow right away with a new release. |
… 1938) + Reynolds number attr + air dynamic viscosity formulae + unit tests (incl. drop size changes upon ventilation-in-parcel-below-cloud vs. no-ventilation) + refactor of env vars __getitem__ logic (open-atmos#1282) Co-authored-by: Sylwester Arabas <sylwester.arabas@agh.edu.pl>
First attempt to add ventilation coefficient from Pruppacher & Rasmussen (1979)).
Added methods for air dynamic viscosity, particle Reynolds number, and air Schmidt number to support ventilation coefficient calculation.
Tried to add basic tests for dynamic viscosity and ventilation coefficient calculation but don't think I activated them...