From 7b2d06eb2f22d7ef422bd7978a9024335b9ad67b Mon Sep 17 00:00:00 2001 From: Bumseok Lee Date: Mon, 9 Sep 2024 09:37:47 -0600 Subject: [PATCH] removed some comments throughout the codes --- include/ShearStressTransportEquationSystem.h | 2 +- src/SpecificDissipationRateEquationSystem.C | 1 - src/TurbKineticEnergyEquationSystem.C | 1 - src/node_kernels/BLTGammaM2015NodeKernel.C | 27 +++++--------------- src/node_kernels/SDRSSTBLTM2015NodeKernel.C | 25 +++--------------- 5 files changed, 12 insertions(+), 44 deletions(-) diff --git a/include/ShearStressTransportEquationSystem.h b/include/ShearStressTransportEquationSystem.h index 3ff571e5b..fb07318e1 100644 --- a/include/ShearStressTransportEquationSystem.h +++ b/include/ShearStressTransportEquationSystem.h @@ -92,7 +92,7 @@ class ShearStressTransportEquationSystem : public EquationSystem const double tkeMinValue_{1.0e-8}; const double sdrMinValue_{1.0e-8}; - const double gammaMinValue_{0.02}; // 1/ce2=1/50=0.02 + const double gammaMinValue_{0.02}; const double gammaMaxValue_{1.0}; }; diff --git a/src/SpecificDissipationRateEquationSystem.C b/src/SpecificDissipationRateEquationSystem.C index e355c139b..a33137402 100644 --- a/src/SpecificDissipationRateEquationSystem.C +++ b/src/SpecificDissipationRateEquationSystem.C @@ -53,7 +53,6 @@ #include #include -// Transition model #include // ngp diff --git a/src/TurbKineticEnergyEquationSystem.C b/src/TurbKineticEnergyEquationSystem.C index 2141072f3..2b4fc6eee 100644 --- a/src/TurbKineticEnergyEquationSystem.C +++ b/src/TurbKineticEnergyEquationSystem.C @@ -62,7 +62,6 @@ #include #include -// Transition #include // ngp diff --git a/src/node_kernels/BLTGammaM2015NodeKernel.C b/src/node_kernels/BLTGammaM2015NodeKernel.C index 33a41476b..eacb2781a 100644 --- a/src/node_kernels/BLTGammaM2015NodeKernel.C +++ b/src/node_kernels/BLTGammaM2015NodeKernel.C @@ -141,19 +141,12 @@ BLTGammaM2015NodeKernel::execute( sijMag = stk::math::sqrt(2.0 * sijMag); vortMag = stk::math::sqrt(2.0 * vortMag); - // Computation of the turbulence intensity - // The original formulation computes the local turbulence intensity using the local values of k, omega, and wall distance in the boundary layer. - // This approach has accuracy issues with a coarse grid. On the other hand, a constant turbulence intensity, which is mainly used in transition models - // with the S-A turbulence model, gives more robust and accurate results. - // Strictly speaking, however, a constant turbulence intensity is only valid for external flow simulations without any downwash - // (e.g., airfoils or single turbines). The validation of each approach is completed. - // Options for the selection of turbulence intensity computations will be implemented. - - //========= local turbulence intensity: original formualtion ======== + // local Tu //TuL = stk::math::min(100.0 * stk::math::sqrt(2.0/3.0*tke) / sdr / (minD + 1.0e-10), 100.0); - //====== freestream turbulence intensity from Nalu-Wind input ====== + + // constant Tu from input TuL = fsti_; - //=================================================================== + lamda0L = -7.57e-3 * dvnn * minD * minD * density / visc + 0.0128; lamda0L = stk::math::min(stk::math::max(lamda0L, -1.0), 1.0); Re0c = Ctu1 + Ctu2 * stk::math::exp(-Ctu3 * TuL * FPG(lamda0L)); @@ -170,10 +163,7 @@ BLTGammaM2015NodeKernel::execute( DblType Dgamma = caTwo * density * vortMag * fturb * gamint * (ceTwo * gamint - 1.0); -////========================== Exact Jacobian ================================// -// Exact Jacobian has unphysical negative intermittecy issues, resulting in convergence stall. -// Instead of the exact Jacobian, the positivity is applied in the implicit operator -////==========================================================================// +//// Exact Jacobian // DblType PgammaDir = // flength * density * sijMag * fonset * (1.0 - 2.0 * gamint); // DblType DgammaDir = @@ -182,10 +172,7 @@ BLTGammaM2015NodeKernel::execute( // rhs(0) += (Pgamma - Dgamma) * dVol; // lhs(0, 0) += (DgammaDir - PgammaDir) * dVol; -//========= Jacobian with the Positivity in the implicit operator =============// -// The original idea by Spalart and Allmaras (1992) for the S-A turbulence model. -// The approach adpated by Lee (2021) -////==========================================================================// +//// Jacobian with the Positivity in the implicit operator DblType PgammaDir = flength * density * sijMag * fonset * (1.0 - gamint); DblType PgammaDirP = @@ -201,7 +188,7 @@ BLTGammaM2015NodeKernel::execute( rhs(0) += (Pgamma - Dgamma) * dVol; lhs(0, 0) += (gamma_pos1 + gamma_pos2*gamint) * dVol; -//==============================================================--=============// +// } diff --git a/src/node_kernels/SDRSSTBLTM2015NodeKernel.C b/src/node_kernels/SDRSSTBLTM2015NodeKernel.C index 828e7f7b3..365c536d8 100644 --- a/src/node_kernels/SDRSSTBLTM2015NodeKernel.C +++ b/src/node_kernels/SDRSSTBLTM2015NodeKernel.C @@ -89,23 +89,8 @@ SDRSSTBLTM2015NodeKernel::execute( DblType Pk = 0.0; DblType crossDiff = 0.0; -//================= original model w/o transition ================// -// for (int i = 0; i < nDim_; ++i) { -// crossDiff += dkdx_.get(node, i) * dwdx_.get(node, i); -// const int offset = nDim_ * i; -// for (int j = 0; j < nDim_; ++j) { -// const auto dudxij = dudx_.get(node, offset + j); -// Pk += dudxij * (dudxij + dudx_.get(node, j * nDim_ + i)); -// } -// } -// Pk *= tvisc; -// -// const DblType Dk = betaStar_ * density * sdr * tke; -// -// // Clip production term and clip negative productions -// Pk = stk::math::min(tkeProdLimitRatio_ * Dk, stk::math::max(Pk, 0.0)); -// -//==================Transition model============================// + +// Transition model DblType sijMag = 0.0; DblType vortMag = 0.0; @@ -125,9 +110,8 @@ SDRSSTBLTM2015NodeKernel::execute( sijMag = stk::math::sqrt(2.0*sijMag); vortMag = stk::math::sqrt(2.0*vortMag); - Pk = tvisc * sijMag * vortMag; // Pk based on Kato-Launder formulation. - -//===============================================================// + // Pk based on Kato-Launder formulation + Pk = tvisc * sijMag * vortMag; // Blend constants for SDR const DblType omf1 = (1.0 - fOneBlend); @@ -165,7 +149,6 @@ SDRSSTBLTM2015NodeKernel::execute( gammaOne_apply = gammaOne_; gammaTwo_apply = gammaTwo_; } - //const DblType gamma = fOneBlend * gammaOne_apply + omf1 * gammaTwo_apply; // Production term with appropriate clipping of tvisc const DblType Pw = gamma * density * Pk / stk::math::max(tvisc, 1.0e-16);