From 596871b5ea8ff6a52c95ebd1ab34a19876cda749 Mon Sep 17 00:00:00 2001 From: Aaron Lattanzi Date: Thu, 24 Oct 2024 09:29:46 -0700 Subject: [PATCH] Add option to toggle KE numerical diffusion. --- Source/SourceTerms/ERF_make_sources.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/SourceTerms/ERF_make_sources.cpp b/Source/SourceTerms/ERF_make_sources.cpp index fcbcd5536..2612849c2 100644 --- a/Source/SourceTerms/ERF_make_sources.cpp +++ b/Source/SourceTerms/ERF_make_sources.cpp @@ -62,6 +62,7 @@ void make_sources (int level, TurbChoice tc = solverChoice.turbChoice[level]; const bool l_use_KE = ( (tc.les_type == LESType::Deardorff) || (tc.pbl_type == PBLType::MYNN25) ); + const bool l_diff_KE = tc.diffuse_KE_3D; const Box& domain = geom.Domain(); @@ -338,7 +339,7 @@ void make_sources (int level, NumericalDiffusion(bx, start_comp, num_comp, dt, solverChoice.NumDiffCoeff, cell_data, cell_src, mf_u, mf_v, false, false); - if (l_use_KE) { + if (l_use_KE && l_diff_KE) { int sc = RhoKE_comp; int nc = 1; NumericalDiffusion(bx, sc, nc, dt, solverChoice.NumDiffCoeff,