-
Notifications
You must be signed in to change notification settings - Fork 8
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
P3 Terminal Velocity #334
P3 Terminal Velocity #334
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
==========================================
- Coverage 94.81% 94.56% -0.26%
==========================================
Files 36 36
Lines 1253 1342 +89
==========================================
+ Hits 1188 1269 +81
- Misses 65 73 +8
|
324ea6a
to
287f186
Compare
178e74c
to
bcd9ae2
Compare
bc0de28
to
001b718
Compare
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.
Hi @anastasia-popova ! I just left a few comments that I hope are helpful
@@ -288,6 +231,26 @@ function DSD_N₀(p3::PSP3, N::FT, λ::FT) where {FT} | |||
return N / Γ(1 + μ) * λ^(1 + μ) | |||
end | |||
|
|||
""" | |||
integrate_to_gamma(a, b, c1, c2, c3) |
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 much neater and more readable. Thank you!
).root | ||
|
||
return (; λ = exp(x), N_0 = DSD_N₀(p3, N, exp(x))) | ||
end | ||
|
||
""" | ||
terminal_velocity_mass(p3, Chen2022, q, N, ρ_r, F_r) | ||
|
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.
There is a lot of repetition here. I'll try to combine those two functions into one
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.
Looks good! I agree with @trontrytel, there is some duplicate code that could be merged.
@@ -29,6 +30,7 @@ DocStringExtensions = "0.8, 0.9" | |||
EnsembleKalmanProcesses = "1.1.5" | |||
ForwardDiff = "0.10" | |||
MLJ = "0.20" | |||
QuadGK = "2.9.4" |
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.
Does the compat need to be so specific? Would 2.9 work?
(ai, bi, ci) = CO.Chen2022_vel_coeffs_small(Chen2022, ρ_a) | ||
v += integrate_to_gamma( | ||
FT(0), | ||
D_th, | ||
FT(π) / 6 * p3.ρ_i * ai[i] * N_0, | ||
bi[i] + μ + 3, | ||
ci[i] + λ, | ||
) |
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.
These lines are run in both cases, so they could be hoisted out of the ifelse
Done via #370 |
Purpose
Implement Terminal Velocity in the P3 Scheme, compare to the plots in the Mildbrant and Morrison (2015) paper
To-do
Content