Skip to content

Commit

Permalink
Use first-order one-sided calc to be consistent with BC
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon committed Mar 8, 2024
1 parent a05365f commit 4297182
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Diffusion/ComputeTurbulentViscosity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,17 @@ void ComputeTurbulentViscosityLES (const amrex::MultiFab& Tau11, const amrex::Mu
Real eps = std::numeric_limits<Real>::epsilon();
Real dtheta_dz;
if (use_most && k==klo) {
#ifdef ERF_EXPLICIT_MOST_STRESS
dtheta_dz = ( cell_data(i,j,k+1,RhoTheta_comp)/cell_data(i,j,k+1,Rho_comp)
- cell_data(i,j,k ,RhoTheta_comp)/cell_data(i,j,k ,Rho_comp) )*dzInv;
#else
dtheta_dz = 0.5 * (-3 * cell_data(i,j,k ,RhoTheta_comp)
/ cell_data(i,j,k ,Rho_comp)
+ 4 * cell_data(i,j,k+1,RhoTheta_comp)
/ cell_data(i,j,k+1,Rho_comp)
- cell_data(i,j,k+2,RhoTheta_comp)
/ cell_data(i,j,k+2,Rho_comp) ) * dzInv;
#endif
} else {
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;
Expand Down

0 comments on commit 4297182

Please sign in to comment.