From c0a984b2017e837c643ba39362e5d1649e3a95af Mon Sep 17 00:00:00 2001 From: freiler <54753719+freiler@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:22:10 -0600 Subject: [PATCH] Update kEpsilonViscosityAux.C #27800 #27887 #27888 --- modules/navier_stokes/src/auxkernels/kEpsilonViscosityAux.C | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/navier_stokes/src/auxkernels/kEpsilonViscosityAux.C b/modules/navier_stokes/src/auxkernels/kEpsilonViscosityAux.C index a41f5a967945..ab4650b08765 100644 --- a/modules/navier_stokes/src/auxkernels/kEpsilonViscosityAux.C +++ b/modules/navier_stokes/src/auxkernels/kEpsilonViscosityAux.C @@ -117,7 +117,6 @@ kEpsilonViscosityAux::computeValue() // Switch for determining the near wall quantities // wall_treatment can be: "eq_newton eq_incremental eq_linearized neq" - ADReal u_tau; ADReal y_plus; ADReal mut_log; // turbulent log-layer viscosity ADReal mu_wall; // total wall viscosity to obtain the shear stress at the wall @@ -125,7 +124,7 @@ kEpsilonViscosityAux::computeValue() if (_wall_treatment == "eq_newton") { // Full Newton-Raphson solve to find the wall quantities from the law of the wall - u_tau = NS::findUStar(mu, rho, parallel_speed, min_wall_dist); + const auto u_tau = NS::findUStar(mu, rho, parallel_speed, min_wall_dist); y_plus = min_wall_dist * u_tau * rho / mu; mu_wall = rho * Utility::pow<2>(u_tau) * min_wall_dist / parallel_speed; mut_log = mu_wall - mu; @@ -146,7 +145,7 @@ kEpsilonViscosityAux::computeValue() (std::log(NS::E_turb_constant * std::max(min_wall_dist, 1.0) / mu) + 1.0); const ADReal c_c = parallel_speed; - u_tau = (-b_c + std::sqrt(std::pow(b_c, 2) + 4.0 * a_c * c_c)) / (2.0 * a_c); + const auto u_tau = (-b_c + std::sqrt(std::pow(b_c, 2) + 4.0 * a_c * c_c)) / (2.0 * a_c); y_plus = min_wall_dist * u_tau * rho / mu; mu_wall = rho * Utility::pow<2>(u_tau) * min_wall_dist / parallel_speed; mut_log = mu_wall - mu;