Skip to content

Commit

Permalink
Merge branch 'development' into update_timeadvance_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon authored Feb 13, 2024
2 parents c8ccfc5 + 19410b2 commit 5f0b1a7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Exec/RegTests/Bubble/inputs_BF02_dry_bubble
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 20000.0 312.5 10000.0
amr.n_cell = 256 4 128
geometry.prob_extent = 20000.0 400.0 10000.0
amr.n_cell = 200 4 100
geometry.is_periodic = 0 1 0
xlo.type = "SlipWall"
xhi.type = "SlipWall"
Expand Down Expand Up @@ -57,9 +57,9 @@ erf.use_moist_background = false

erf.molec_diff_type = "ConstantAlpha"
erf.rho0_trans = 1.0 # [kg/m^3], used to convert input diffusivities
erf.dynamicViscosity = 1.0 # [kg/(m-s)] ==> nu = 75.0 m^2/s
erf.alpha_T = 1.0 # [m^2/s]
erf.alpha_C = 1.0
erf.dynamicViscosity = 0.0 # [kg/(m-s)] ==> nu = 75.0 m^2/s
erf.alpha_T = 0.0 # [m^2/s]
erf.alpha_C = 0.0

# PROBLEM PARAMETERS (optional)
# warm bubble input
Expand All @@ -70,4 +70,4 @@ prob.x_r = 2000.0
prob.z_r = 2000.0
prob.T_0 = 300.0
prob.do_moist_bubble = false
prob.T_pert_is_airtemp = false # Perturb theta
prob.T_pert_is_airtemp = false # Perturb theta
12 changes: 6 additions & 6 deletions Exec/RegTests/Bubble/inputs_BF02_moist_bubble
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 20000.0 312.5 10000.0
amr.n_cell = 256 4 128
geometry.prob_extent = 20000.0 400.0 10000.0
amr.n_cell = 200 4 100
geometry.is_periodic = 0 1 0
xlo.type = "SlipWall"
xhi.type = "SlipWall"
Expand Down Expand Up @@ -59,9 +59,9 @@ erf.use_moist_background = true

erf.molec_diff_type = "ConstantAlpha"
erf.rho0_trans = 1.0 # [kg/m^3], used to convert input diffusivities
erf.dynamicViscosity = 1.0 # [kg/(m-s)] ==> nu = 75.0 m^2/s
erf.alpha_T = 1.0 # [m^2/s]
erf.alpha_C = 1.0
erf.dynamicViscosity = 0.0 # [kg/(m-s)] ==> nu = 75.0 m^2/s
erf.alpha_T = 0.0 # [m^2/s]
erf.alpha_C = 0.0

# INITIAL CONDITIONS
#erf.init_type = "input_sounding"
Expand All @@ -79,4 +79,4 @@ prob.T_0 = 300.0
prob.do_moist_bubble = true
prob.theta_pert = 2.0
prob.qt_init = 0.02
prob.eq_pot_temp = 320.0
prob.eq_pot_temp = 320.0
2 changes: 2 additions & 0 deletions Source/Microphysics/FastEddy/FastEddy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void FastEddy::AdvanceFE ()
for ( MFIter mfi(*tabs,TilingIfNotGPU()); mfi.isValid(); ++mfi) {
auto qv_array = mic_fab_vars[MicVar_FE::qv]->array(mfi);
auto qc_array = mic_fab_vars[MicVar_FE::qc]->array(mfi);
auto qt_array = mic_fab_vars[MicVar_FE::qt]->array(mfi);
auto tabs_array = mic_fab_vars[MicVar_FE::tabs]->array(mfi);
auto theta_array = mic_fab_vars[MicVar_FE::theta]->array(mfi);
auto pres_array = mic_fab_vars[MicVar_FE::pres]->array(mfi);
Expand Down Expand Up @@ -67,6 +68,7 @@ void FastEddy::AdvanceFE ()
qv_array(i,j,k) = std::max(0.0, qv_array(i,j,k));
qc_array(i,j,k) = std::max(0.0, qc_array(i,j,k));

qt_array(i,j,k) = qv_array(i,j,k) + qc_array(i,j,k);
});
}
}
2 changes: 2 additions & 0 deletions Source/Microphysics/Kessler/Init_Kessler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void Kessler::Copy_State_to_Micro (const MultiFab& cons_in)
auto qv_array = mic_fab_vars[MicVar_Kess::qv]->array(mfi);
auto qc_array = mic_fab_vars[MicVar_Kess::qcl]->array(mfi);
auto qp_array = mic_fab_vars[MicVar_Kess::qp]->array(mfi);
auto qt_array = mic_fab_vars[MicVar_Kess::qt]->array(mfi);

auto rho_array = mic_fab_vars[MicVar_Kess::rho]->array(mfi);
auto theta_array = mic_fab_vars[MicVar_Kess::theta]->array(mfi);
Expand All @@ -82,6 +83,7 @@ void Kessler::Copy_State_to_Micro (const MultiFab& cons_in)
qv_array(i,j,k) = states_array(i,j,k,RhoQ1_comp)/states_array(i,j,k,Rho_comp);
qc_array(i,j,k) = states_array(i,j,k,RhoQ2_comp)/states_array(i,j,k,Rho_comp);
qp_array(i,j,k) = states_array(i,j,k,RhoQ3_comp)/states_array(i,j,k,Rho_comp);
qt_array(i,j,k) = qv_array(i,j,k) + qc_array(i,j,k);

tabs_array(i,j,k) = getTgivenRandRTh(states_array(i,j,k,Rho_comp),
states_array(i,j,k,RhoTheta_comp),
Expand Down
3 changes: 3 additions & 0 deletions Source/Microphysics/Kessler/Kessler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void Kessler::AdvanceKessler ()
auto qv_array = mic_fab_vars[MicVar_Kess::qv]->array(mfi);
auto qc_array = mic_fab_vars[MicVar_Kess::qcl]->array(mfi);
auto qp_array = mic_fab_vars[MicVar_Kess::qp]->array(mfi);
auto qt_array = mic_fab_vars[MicVar_Kess::qt]->array(mfi);
auto tabs_array = mic_fab_vars[MicVar_Kess::tabs]->array(mfi);
auto pres_array = mic_fab_vars[MicVar_Kess::pres]->array(mfi);
auto theta_array = theta->array(mfi);
Expand Down Expand Up @@ -163,6 +164,8 @@ void Kessler::AdvanceKessler ()
qv_array(i,j,k) = std::max(0.0, qv_array(i,j,k));
qc_array(i,j,k) = std::max(0.0, qc_array(i,j,k));
qp_array(i,j,k) = std::max(0.0, qp_array(i,j,k));

qt_array(i,j,k) = qv_array(i,j,k) + qc_array(i,j,k);
});
}
}

0 comments on commit 5f0b1a7

Please sign in to comment.