Skip to content

Commit

Permalink
clean up botched merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi committed Jun 12, 2024
1 parent 4cd1f53 commit a2e70e2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Source/Diffusion/ComputeTurbulentViscosity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,10 @@ void ComputeTurbulentViscosityLES (const MultiFab& Tau11, const MultiFab& Tau22,
//***********************************************************************************
else if (turbChoice.les_type == LESType::Deardorff)
{
const Real l_C_k = turbChoice.Ck;
const Real l_C_e = turbChoice.Ce;
const Real l_C_e_wall = turbChoice.Ce_wall;
const Real Ce_lcoeff = amrex::max(0.0, l_C_e - 1.9*l_C_k);
const Real l_abs_g = const_grav;
const Real l_inv_theta0 = 1.0 / turbChoice.theta_ref;
const Real l_C_k = turbChoice.Ck;
const Real l_C_e = turbChoice.Ce;
const Real l_C_e_wall = turbChoice.Ce_wall;
const Real Ce_lcoeff = amrex::max(0.0, l_C_e - 1.9*l_C_k);

#ifdef _OPENMP
#pragma omp parallel if (Gpu::notInLaunchRegion())
Expand Down Expand Up @@ -174,13 +172,14 @@ void ComputeTurbulentViscosityLES (const MultiFab& Tau11, const MultiFab& Tau22,
dtheta_dz = 0.5 * ( cell_data(i,j,k+1,RhoTheta_comp)/cell_data(i,j,k+1,Rho_comp)
- cell_data(i,j,k-1,RhoTheta_comp)/cell_data(i,j,k-1,Rho_comp) )*dzInv;
}
Real E = cell_data(i,j,k,RhoKE_comp) / cell_data(i,j,k,Rho_comp);
Real strat = l_abs_g * dtheta_dz * l_inv_theta0; // stratification
Real E = cell_data(i,j,k,RhoKE_comp) / cell_data(i,j,k,Rho_comp);
Real N2 = Brunt_Vaisala_Freq(i, j, k, dzInv, cell_data);
Real N = std::sqrt(N2); // stratification
Real length;
if (strat <= eps) {
if (N2 <= eps) {
length = DeltaMsf;
} else {
length = 0.76 * std::sqrt(E / strat);
length = 0.76 * std::sqrt(E / N);
// mixing length should be _reduced_ for stable stratification
length = amrex::min(length, DeltaMsf);
// following WRF, make sure the mixing length isn't too small
Expand Down

0 comments on commit a2e70e2

Please sign in to comment.