From edbafad64c2cc65b7ed23e0b930ac1fb21c8275c Mon Sep 17 00:00:00 2001 From: "Aaron M. Lattanzi" <103702284+AMLattanzi@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:16:23 -0800 Subject: [PATCH 1/2] Fill qt (#1432) * The micro model owns qt and must populate it. * Little redundant but make sure qt is updated with FE. --- Source/Microphysics/FastEddy/FastEddy.cpp | 2 ++ Source/Microphysics/Kessler/Init_Kessler.cpp | 2 ++ Source/Microphysics/Kessler/Kessler.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/Source/Microphysics/FastEddy/FastEddy.cpp b/Source/Microphysics/FastEddy/FastEddy.cpp index 27210ba84..1d09b46b8 100644 --- a/Source/Microphysics/FastEddy/FastEddy.cpp +++ b/Source/Microphysics/FastEddy/FastEddy.cpp @@ -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); @@ -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); }); } } diff --git a/Source/Microphysics/Kessler/Init_Kessler.cpp b/Source/Microphysics/Kessler/Init_Kessler.cpp index eefe69703..aafe15467 100644 --- a/Source/Microphysics/Kessler/Init_Kessler.cpp +++ b/Source/Microphysics/Kessler/Init_Kessler.cpp @@ -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); @@ -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), diff --git a/Source/Microphysics/Kessler/Kessler.cpp b/Source/Microphysics/Kessler/Kessler.cpp index 9f01ed269..72f694dd9 100644 --- a/Source/Microphysics/Kessler/Kessler.cpp +++ b/Source/Microphysics/Kessler/Kessler.cpp @@ -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); @@ -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); }); } } From 19410b2f70501670c6b1693b4152c134b7fa50e5 Mon Sep 17 00:00:00 2001 From: Mahesh Natarajan Date: Mon, 12 Feb 2024 14:29:56 -0800 Subject: [PATCH 2/2] Updating dry and moist bubble inputs for RegTests (#1433) * Updating inputs for moist bubble regtests * Updating inputs for bubble regtests --------- Co-authored-by: Mahesh Natarajan Co-authored-by: Ann Almgren --- Exec/RegTests/Bubble/inputs_BF02_dry_bubble | 12 ++++++------ Exec/RegTests/Bubble/inputs_BF02_moist_bubble | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Exec/RegTests/Bubble/inputs_BF02_dry_bubble b/Exec/RegTests/Bubble/inputs_BF02_dry_bubble index 82a8d5ac1..776220521 100644 --- a/Exec/RegTests/Bubble/inputs_BF02_dry_bubble +++ b/Exec/RegTests/Bubble/inputs_BF02_dry_bubble @@ -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" @@ -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 @@ -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 \ No newline at end of file +prob.T_pert_is_airtemp = false # Perturb theta diff --git a/Exec/RegTests/Bubble/inputs_BF02_moist_bubble b/Exec/RegTests/Bubble/inputs_BF02_moist_bubble index 3f923dc3f..730b0e5ed 100644 --- a/Exec/RegTests/Bubble/inputs_BF02_moist_bubble +++ b/Exec/RegTests/Bubble/inputs_BF02_moist_bubble @@ -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" @@ -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" @@ -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 \ No newline at end of file +prob.eq_pot_temp = 320.0