Skip to content

Commit 010773c

Browse files
committed
very much work in progress
1 parent 085f3c1 commit 010773c

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

src/P3Scheme.jl

+20-14
Original file line numberDiff line numberDiff line change
@@ -467,20 +467,26 @@ function terminal_velocity(
467467
bₛ(b) = b + μ
468468
cₛ(c) = c + λ
469469

470+
aₛ_m(a) = aₛ(a) * FT(π) / 6 * p3.ρ_i
471+
bₛ_m(b) = bₛ(b) + 3
470472

471-
h₁(a) = a * N_0 * (16 * p3.ρ_i^2 * p3.γ^3 / (9 * FT(π) * α_va^2))^κ
472-
h₂(b) = b + μ + κ * (3 * p3.σ - 2 * p3.β_va)
473-
h₃(c) = c + λ
474-
h₄(a) = a * N_0 * (p3.ρ_i / th.ρ_g)^(2 * κ)
473+
spheres(a, b, c) = (aₛ(a), bₛ(b), cₛ(c))
474+
spheres_m(a, b, c) = (aₛ_m(a), bₛ_m(b), cₛ(c))
475475

476-
spheres_n(a, b, c) = (aₛ(a), bₛ(b), cₛ(c))
477-
spheres_m(a, b, c) = (a * N_0 * FT(π) / 6 * p3.ρ_i, b + μ + 3, h₃(c))
476+
aₙₛ(a) = aₛ(a) * (16 * p3.ρ_i^2 * p3.γ^3 / (9 * FT(π) * α_va^2))^κ
477+
bₙₛ(a) = bₛ(b) + κ * (3 * p3.σ - 2 * p3.β_va)
478478

479-
non_spheres_n(a, b, c) = (h₁(a), h₂(b), h₃(c))
480-
non_spheres_m(a, b, c) = (h₁(a) * α_va, h₂(b) + p3.β_va, h₃(c))
479+
aₙₛ_m = aₙₛ(a) * α_va
480+
bₙₛ_m = bₙₛ(b) + p3.β_va
481481

482-
rimed_spheres_n(a, b, c) = (h₄(a), h₂(b), h₃(c))
483-
rimed_spheres_m(a, b, c) = (h₄(a) * FT(π) / 6 * th.ρ_g , h₂(b) + p3.β_va , h₃(c))
482+
non_spheres(a, b, c) = (aₙₛ(a), bₙₛ(b), cₛ(c))
483+
non_spheres_m(a, b, c) = (aₙₛ_m(a), bₙₛ_m(b), cₛ(c))
484+
485+
aᵣₛ(a) = aₛ(a) * (p3.ρ_i / th.ρ_g)^(2 * κ)
486+
aᵣₛ_m(a) = aᵣₛ(a) * FT(π) / 6 * th.ρ_g
487+
488+
rimed_spheres_n(a, b, c) = (aᵣₛ(a), bₙₛ(b), cₛ(c))
489+
rimed_spheres_m(a, b, c) = (aᵣₛ_m(a), bₙₛ_m(b), cₛ(c))
484490

485491
#TODO - double check there is some equation typo here
486492
v_n_D_cr(D, a, b, c) =
@@ -494,11 +500,11 @@ function terminal_velocity(
494500
if F_r == 0
495501
# S mall particles
496502
# TODO - figure out the splatting vs indexes 1,2
497-
v_m += (FT(0), D_th, spheres_m(aₛ[i], bₛ[i], cₛ[i])...)
498-
v_n += integrate_to_gamma(FT(0), D_th, spheres_n(aₛ[i], bₛ[i], cₛ[i])...)
503+
v_m += (FT(0), D_th, spheres_m(aₛ[i], bₛ[i], cₛ[i])...)
504+
v_n += ∫_Γ(FT(0), D_th, spheres(aₛ[i], bₛ[i], cₛ[i])...)
499505

500-
v_m += integrate_to_gamma(D_th, cutoff, non_spheres_m(aₛ[i], bₛ[i], cₛ[i])...)
501-
v_n += integrate_to_gamma(D_th, cutoff, non_spheres_n(aₛ[i], bₛ[i], cₛ[i])...)
506+
v_m += ∫_Γ(D_th, cutoff, non_spheres_m(aₛ[i], bₛ[i], cₛ[i])...)
507+
v_n += ∫_Γ(D_th, cutoff, non_spheres_n(aₛ[i], bₛ[i], cₛ[i])...)
502508

503509
# Get velocity coefficients for large particles
504510
v_m += integrate_to_gamma(cutoff, Inf, non_spheres_m(aₗ[i], bₗ[i], cₗ[i])...)

0 commit comments

Comments
 (0)