Skip to content
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 vertical divergence to detrainment closure #2353

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/model_configs/prognostic_edmfx_bomex_box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ surface_setup: "Bomex"
turbconv: "prognostic_edmfx"
edmfx_upwinding: first_order
edmfx_entr_model: "Generalized"
edmfx_detr_model: "ConstantArea"
edmfx_detr_model: "Generalized"
edmfx_sgs_mass_flux: true
edmfx_sgs_diffusive_flux: true
edmfx_nh_pressure: true
Expand All @@ -27,4 +27,4 @@ perturb_initstate: false
dt: "10secs"
t_end: "6hours"
dt_save_to_disk: "10mins"
toml: [toml/prognostic_edmfx_box.toml]
toml: [toml/prognostic_edmfx_bomex_box.toml]
1 change: 1 addition & 0 deletions src/parameters/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Base.@kwdef struct TurbulenceConvectionParameters{FT} <: ATCP
detr_tau::FT
detr_coeff::FT
detr_buoy_coeff::FT
detr_vertdiv_coeff::FT
min_area_limiter_scale::FT
min_area_limiter_power::FT
max_area_limiter_scale::FT
Expand Down
36 changes: 22 additions & 14 deletions src/prognostic_equations/edmfx_entr_detr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,20 +268,24 @@ function detrainment(
detr_inv_tau = CAP.detr_tau(turbconv_params)
detr_coeff = CAP.detr_coeff(turbconv_params)
detr_buoy_coeff = CAP.detr_buoy_coeff(turbconv_params)
detr_vertdiv_coeff = CAP.detr_vertdiv_coeff(turbconv_params)
max_area_limiter_scale = CAP.max_area_limiter_scale(turbconv_params)
max_area_limiter_power = CAP.max_area_limiter_power(turbconv_params)
a_max = CAP.max_area(turbconv_params)

max_area_limiter =
max_area_limiter_scale *
exp(-max_area_limiter_power * (a_max - min(ᶜaʲ, 1)))
detr = min(
detr_inv_tau +
detr_coeff * abs(ᶜwʲ) +
detr_buoy_coeff * abs(min(ᶜbuoyʲ - ᶜbuoy⁰, 0)) /
max(eps(FT), abs(ᶜwʲ - ᶜw⁰)) +
max_area_limiter,
1 / dt,
detr = max(
min(
detr_inv_tau +
detr_coeff * abs(ᶜwʲ) +
detr_buoy_coeff * abs(min(ᶜbuoyʲ - ᶜbuoy⁰, 0)) /
max(eps(FT), abs(ᶜwʲ - ᶜw⁰)) - detr_vertdiv_coeff * ᶜvert_div +
max_area_limiter,
1 / dt,
),
0,
)
return detr
end
Expand Down Expand Up @@ -309,20 +313,24 @@ function detrainment(
detr_inv_tau = CAP.detr_tau(turbconv_params)
detr_coeff = CAP.detr_coeff(turbconv_params)
detr_buoy_coeff = CAP.detr_buoy_coeff(turbconv_params)
detr_vertdiv_coeff = CAP.detr_vertdiv_coeff(turbconv_params)
max_area_limiter_scale = CAP.max_area_limiter_scale(turbconv_params)
max_area_limiter_power = CAP.max_area_limiter_power(turbconv_params)
a_max = CAP.max_area(turbconv_params)

max_area_limiter =
max_area_limiter_scale *
exp(-max_area_limiter_power * (a_max - min(ᶜaʲ, 1)))
detr = min(
detr_inv_tau +
detr_coeff * abs(ᶜwʲ) +
detr_buoy_coeff * abs(min(ᶜbuoyʲ - ᶜbuoy⁰, 0)) /
max(eps(FT), abs(ᶜwʲ - ᶜw⁰)) +
max_area_limiter,
1 / dt,
detr = max(
min(
detr_inv_tau +
detr_coeff * abs(ᶜwʲ) +
detr_buoy_coeff * abs(min(ᶜbuoyʲ - ᶜbuoy⁰, 0)) /
max(eps(FT), abs(ᶜwʲ - ᶜw⁰)) - detr_vertdiv_coeff * ᶜvert_div +
max_area_limiter,
1 / dt,
),
0,
)
return detr * FT(2) * hm_limiter(ᶜaʲ)
end
Expand Down
59 changes: 59 additions & 0 deletions toml/prognostic_edmfx_bomex_box.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[EDMF_surface_area]
alias = "surface_area"
value = 0.1
type = "float"

[EDMF_min_area]
alias = "min_area"
value = 1.0e-5
type = "float"

[EDMF_max_area]
alias = "max_area"
value = 0.7
type = "float"

[entr_tau]
alias = "entr_tau"
value = 0
type = "float"

[entr_coeff]
alias = "entr_coeff"
value = 0.1
type = "float"

[min_area_limiter_scale]
alias = "min_area_limiter_scale"
value = 0.001
type = "float"

[min_area_limiter_power]
alias = "min_area_limiter_power"
value = 10
type = "float"

[detr_tau]
alias = "detr_tau"
value = 0
type = "float"

[detr_coeff]
alias = "detr_coeff"
value = 2e-3
type = "float"

[detr_buoy_coeff]
alias = "detr_buoy_coeff"
value = 0.3
type = "float"

[detr_vertdiv_coeff]
alias = "detr_vertdiv_coeff"
value = 0.6
type = "float"

[max_area_limiter_scale]
alias = "max_area_limiter_scale"
value = 0.01
type = "float"
7 changes: 6 additions & 1 deletion toml/prognostic_edmfx_dycoms_rf01_box.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@ type = "float"

[detr_coeff]
alias = "detr_coeff"
value = 2e-3
value = 1e-3
type = "float"

[detr_buoy_coeff]
alias = "detr_buoy_coeff"
value = 0.3
type = "float"

[detr_vertdiv_coeff]
alias = "detr_vertdiv_coeff"
value = 0.5
type = "float"

[max_area_limiter_scale]
alias = "max_area_limiter_scale"
value = 0.01
Expand Down
Loading