fix(P3): use per-regime material density in the ice aspect-ratio closure#740
Closed
haakon-e wants to merge 1 commit into
Closed
fix(P3): use per-regime material density in the ice aspect-ratio closure#740haakon-e wants to merge 1 commit into
haakon-e wants to merge 1 commit into
Conversation
Member
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Jun 23, 2026
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 23, 2026 00:32
2e70e53 to
b6ab68d
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 23, 2026 00:32
69f01fa to
abdbd39
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 23, 2026 21:32
b6ab68d to
4f2ec41
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 23, 2026 21:32
abdbd39 to
7f9b793
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 23, 2026 22:26
4f2ec41 to
c84af4b
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 23, 2026 22:26
7f9b793 to
3aa2995
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 24, 2026 21:56
c84af4b to
6003aae
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 24, 2026 21:56
3aa2995 to
22a3865
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## he/rosenbrock-modes #740 +/- ##
=======================================================
+ Coverage 93.21% 93.27% +0.05%
=======================================================
Files 57 57
Lines 3185 3197 +12
=======================================================
+ Hits 2969 2982 +13
+ Misses 216 215 -1
🚀 New features to boost your workflow:
|
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 25, 2026 18:01
6003aae to
4604d1d
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 25, 2026 18:01
22a3865 to
f42aeb2
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 26, 2026 00:38
4604d1d to
19fdeab
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 26, 2026 00:38
f42aeb2 to
b4b9090
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 26, 2026 01:22
19fdeab to
40ca910
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 26, 2026 01:22
b4b9090 to
aeb57d4
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
June 26, 2026 01:31
40ca910 to
b2dbb8c
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
June 26, 2026 01:31
aeb57d4 to
93c9f4a
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
July 1, 2026 05:34
b2dbb8c to
98ea608
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
July 1, 2026 05:35
93c9f4a to
22beeec
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
July 1, 2026 05:46
98ea608 to
3a09afe
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
July 1, 2026 05:46
22beeec to
bd052f1
Compare
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
July 1, 2026 06:24
3a09afe to
33b6a35
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
July 1, 2026 06:24
bd052f1 to
0f061bb
Compare
The oblate aspect ratio ϕ = c/a = 3√π·m/(4·ρ·A^{3/2}) was evaluated with the
size-dependent effective density ρ = m/V_sphere(D) instead of the particle's
material density. The mass then cancels, ϕ becomes prolate (>1) for every
nonspherical size, and the min(1,ϕ) clamp pinned ϕ≡1 everywhere — disabling the
cbrt(ϕ) aspect-ratio fall-speed correction.
Use the per-regime material density: ρ_i in the small-spherical, dense-
nonspherical and partially-rimed regimes, ρ_g in the graupel regime (where the
spherical mass law makes m/V_sphere ≡ ρ_g, so ϕ=1 is recovered). The min(1,ϕ)
clamp is removed; cbrt(ϕ) is finite without it. A residual ϕ>1 band (peak ≈ 1.2,
~97–120 µm) remains from the projected-area discontinuity at D_th — documented as
a follow-on.
Effect: large unrimed ice fall speeds drop by up to ~4×, the intended oblate
correction. Tests asserting ϕ≈1 at nonspherical D (which codified the bug) and
the velocity reference snapshots are updated to the corrected per-regime values;
a residual-band assertion pins 1 < ϕ(D_th·1.001) < 1.3.
The spheroid derivation, the material-density distinction, and the residual-band
explanation are moved to the P3 documentation (Mathematical Formulation); the
docstrings keep the one-line formula and a link. The order-50 quadrature sweep
stays within the existing 5e-3 tolerance (max rel ≈ 2.6e-3), so that tolerance
is unchanged.
haakon-e
force-pushed
the
he/rosenbrock-modes
branch
from
July 1, 2026 15:01
33b6a35 to
090fd49
Compare
haakon-e
force-pushed
the
he/p3-aspect-ratio-fix
branch
from
July 1, 2026 15:01
0f061bb to
c8b0dba
Compare
Member
Author
|
Folded into #741 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The oblate aspect ratio
ϕ = c/a = 3√π·m/(4·ρ·A^{3/2})was evaluated with the size-dependent effective density ρ = m/V_sphere(D) instead of the particle's material density. With the effective density the particle mass cancels, ϕ comes out prolate (>1) for every nonspherical size, and themin(1, ϕ)clamp then pinnedϕ ≡ 1everywhere — disabling thecbrt(ϕ)aspect-ratio fall-speed correction entirely. Use the per-regime material density and drop the clamp.What changed (src/P3_particle_properties.jl, docs, tests)
ϕ_material_density(state, D): returnsρ_iin the small-spherical, dense-nonspherical, and partially-rimed regimes, andρ_gin the graupel regime (D_gr ≤ D < D_cr).ϕᵢnow divides byϕ_material_density(state, D)and no longer clamps; the docstring keeps the one-line formula and links to the docs.ice_densitydocstring: removed the stale "Needed for aspect ratio calculation, so we assume zero liquid fraction" clause (ϕᵢ no longer calls it).Mechanism / why
ϕ = 3√π·m/(4·ρ·A^{3/2})compares the particle's mass-to-area shape factor against the density of the solid material it is made of. Substituting the effective densitym/V_sphere(D)replacesρwith a quantity that itself carries the mass, cancellingmand collapsing the closure to a near-constant ≈ 1; themin(1, ⋅)clamp then masked the residual>1excursions, so ϕ ≡ 1 andcbrt(ϕ)≡ 1. Within each P3 mass regime the material density is constant, so ϕ tracks m/A^{3/2}: spherical in the spherical regimes (ϕ = 1), oblate (ϕ < 1) in the dense-nonspherical regime.Residual ϕ > 1 band just above D_th (why no clamp)
ϕ slightly exceeds 1 (peak ≈ 1.2) in a narrow band immediately above D_th. The projected area is discontinuous at D_th (it drops from the spherical law (π/4)D² to the nonspherical law γ·D^σ, ≈ 0.88× smaller) while the mass stays continuous, so m/A^{3/2} is inflated just past the threshold.
cbrt(ϕ)stays finite and bounded there (cbrt(1.2) ≈ 1.06), so a clamp is unnecessary and would re-introduce the ϕ ≡ 1 pathology in that band. Reconciling the mass and area laws at D_th (so the area is continuous too) is a separate P3 area power-law item, deliberately left as a follow-on.Validation
Caveats / follow-on