Skip to content

Commit

Permalink
Fix Deardorff for BOMEX. (#1645)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Jun 14, 2024
1 parent d6a033e commit 84c7b2b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
13 changes: 10 additions & 3 deletions Exec/DevTests/Bomex/input_Kessler
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ erf.most.zref = 20.0

# NOTE: This should have a qv grad too (use hoextrapcc?!)
zhi.type = "SlipWall"
zhi.theta_grad = 0.00365
#zhi.theta_grad = 0.00365

# TIME STEP CONTROL
erf.fixed_dt = 0.5 # fixed time step depending on grid resolution
Expand Down Expand Up @@ -51,8 +51,8 @@ erf.alpha_T = 0.0
erf.alpha_C = 0.0
erf.use_gravity = true

erf.dycore_horiz_adv_type = Upwind_5th
erf.dycore_vert_adv_type = Upwind_5th
erf.dycore_horiz_adv_type = Upwind_3rd
erf.dycore_vert_adv_type = Upwind_3rd
erf.dryscal_horiz_adv_type = WENOZ5
erf.dryscal_vert_adv_type = WENOZ5
erf.moistscal_horiz_adv_type = WENOZ5
Expand All @@ -61,8 +61,15 @@ erf.moistscal_vert_adv_type = WENOZ5
erf.moisture_model = "Kessler"

erf.molec_diff_type = "None"

erf.les_type = "Smagorinsky"
erf.Cs = 0.17

#erf.les_type = "Deardorff"
#erf.Ck = 0.1
#erf.sigma_k = 1.0
#erf.Ce = 0.1

erf.Pr_t = 0.333333
erf.Sc_t = 0.333333

Expand Down
13 changes: 10 additions & 3 deletions Exec/DevTests/Bomex/input_SAM
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ erf.most.zref = 20.0

# NOTE: This should have a qv grad too (use hoextrapcc?!)
zhi.type = "SlipWall"
zhi.theta_grad = 0.00365
#zhi.theta_grad = 0.00365

# TIME STEP CONTROL
erf.fixed_dt = 0.5 # fixed time step depending on grid resolution
Expand Down Expand Up @@ -51,8 +51,8 @@ erf.alpha_T = 0.0
erf.alpha_C = 0.0
erf.use_gravity = true

erf.dycore_horiz_adv_type = Upwind_5th
erf.dycore_vert_adv_type = Upwind_5th
erf.dycore_horiz_adv_type = Upwind_3rd
erf.dycore_vert_adv_type = Upwind_3rd
erf.dryscal_horiz_adv_type = WENOZ5
erf.dryscal_vert_adv_type = WENOZ5
erf.moistscal_horiz_adv_type = WENOZ5
Expand All @@ -61,8 +61,15 @@ erf.moistscal_vert_adv_type = WENOZ5
erf.moisture_model = "SAM"

erf.molec_diff_type = "None"

erf.les_type = "Smagorinsky"
erf.Cs = 0.17

#erf.les_type = "Deardorff"
#erf.Ck = 0.1
#erf.sigma_k = 1.0
#erf.Ce = 0.1

erf.Pr_t = 0.333333
erf.Sc_t = 0.333333

Expand Down
2 changes: 1 addition & 1 deletion Exec/DevTests/Bomex/prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
9 changes: 5 additions & 4 deletions Exec/DevTests/Bomex/prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Problem::Problem (const Real* problo, const Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("QKE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -71,7 +71,7 @@ Problem::init_custom_pert (
Array4<Real > const& x_vel_pert,
Array4<Real > const& y_vel_pert,
Array4<Real > const& z_vel_pert,
Array4<Real > const& /*r_hse*/,
Array4<Real > const& r_hse,
Array4<Real > const& /*p_hse*/,
Array4<Real const> const& /*z_nd*/,
Array4<Real const> const& /*z_cc*/,
Expand Down Expand Up @@ -111,9 +111,10 @@ Problem::init_custom_pert (

// Set an initial value for QKE
if (parms.custom_TKE) {
state_pert(i, j, k, RhoQKE_comp) = 1.0 - zc/3000.0; //*state_pert(i, j, k, Rho_comp);
state_pert(i, j, k, RhoKE_comp) = (1.0 - z/prob_hi[2]) * r_hse(i,j,k);
} else {
state_pert(i, j, k, RhoKE_comp) = parms.KE_0;
}
else state_pert(i, j, k, RhoQKE_comp) = parms.QKE_0;

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down

0 comments on commit 84c7b2b

Please sign in to comment.