diff --git a/src/node_kernels/BLTGammaM2015NodeKernel.C b/src/node_kernels/BLTGammaM2015NodeKernel.C index c74989c24c..76606b7779 100644 --- a/src/node_kernels/BLTGammaM2015NodeKernel.C +++ b/src/node_kernels/BLTGammaM2015NodeKernel.C @@ -148,7 +148,8 @@ BLTGammaM2015NodeKernel::execute( const DblType fonset1 = Rev / 2.2 / Re0c; const DblType fonset2 = stk::math::min(fonset1, 2.0); const DblType rt = density * tke / sdr / visc; - const DblType fonset3 = stk::math::max(1.0 - stk::math::pow(rt / 3.5, 3), 0.0); + const DblType fonset3 = + stk::math::max(1.0 - stk::math::pow(rt / 3.5, 3), 0.0); const DblType fonset = stk::math::max(fonset2 - fonset3, 0.0); const DblType fturb = stk::math::exp(-rt * rt * rt * rt / 16.0); @@ -167,14 +168,15 @@ BLTGammaM2015NodeKernel::execute( // lhs(0, 0) += (DgammaDir - PgammaDir) * dVol; // Jacobian with the Positivity in the implicit operator - const DblType PgammaDir = flength * density * sijMag * fonset * (1.0 - gamint); + const DblType PgammaDir = + flength * density * sijMag * fonset * (1.0 - gamint); const DblType PgammaDirP = -flength * density * sijMag * fonset; const DblType DgammaDir = caTwo * density * vortMag * fturb * (ceTwo * gamint - 1.0); const DblType DgammaDirP = caTwo * density * vortMag * fturb * ceTwo; - const DblType gamma_pos1 = stk::math::max(DgammaDir - PgammaDir, 0.0); + const DblType gamma_pos1 = stk::math::max(DgammaDir - PgammaDir, 0.0); const DblType gamma_pos2 = stk::math::max(DgammaDirP - PgammaDirP, 0.0); rhs(0) += (Pgamma - Dgamma) * dVol; diff --git a/src/node_kernels/TKESSTBLTM2015NodeKernel.C b/src/node_kernels/TKESSTBLTM2015NodeKernel.C index 48ca3d3a32..84022053a9 100644 --- a/src/node_kernels/TKESSTBLTM2015NodeKernel.C +++ b/src/node_kernels/TKESSTBLTM2015NodeKernel.C @@ -109,9 +109,9 @@ TKESSTBLTM2015NodeKernel::execute( // Pk based on Kato-Launder formulation const DblType Pk = gamint * tvisc * sijMag * vortMag; - const DblType Pklim = 5.0 * Ck_BLT * stk::math::max(gamint - 0.2, 0.0) * (1.0 - gamint) * - Fonlim * stk::math::max(3.0 * CSEP * visc - tvisc, 0.0) * sijMag * - vortMag; + const DblType Pklim = + 5.0 * Ck_BLT * stk::math::max(gamint - 0.2, 0.0) * (1.0 - gamint) * Fonlim * + stk::math::max(3.0 * CSEP * visc - tvisc, 0.0) * sijMag * vortMag; const DblType Dk = betaStar_ * density * sdr * tke * stk::math::max(gamint, 0.1); diff --git a/unit_tests/kernels/UnitTestKernelUtils.C b/unit_tests/kernels/UnitTestKernelUtils.C index 714f89a081..bdb7c564b4 100644 --- a/unit_tests/kernels/UnitTestKernelUtils.C +++ b/unit_tests/kernels/UnitTestKernelUtils.C @@ -166,8 +166,9 @@ struct TrigFieldFunction // Range should be from 0.02 to 1.0 qField[0] = - gamma_intermittencynot + abs(std::cos(a * pi * x) * std::sin(a * pi * y) * - std::sin(a * pi * z))/(1.0 - gamma_intermittencynot); + gamma_intermittencynot + + abs(std::cos(a * pi * x) * std::sin(a * pi * y) * std::sin(a * pi * z)) / + (1.0 - gamma_intermittencynot); } void dwalldistdx(const double* coords, double* qField) const diff --git a/unit_tests/kernels/UnitTestKernelUtils.h b/unit_tests/kernels/UnitTestKernelUtils.h index 1ad27defd3..6eeaa4caa5 100644 --- a/unit_tests/kernels/UnitTestKernelUtils.h +++ b/unit_tests/kernels/UnitTestKernelUtils.h @@ -748,8 +748,10 @@ class SSTKernelHex8Mesh : public LowMachKernelHex8Mesh stk::topology::NODE_RANK, "turbulent_viscosity")), gamma_intermittency_(&meta_->declare_field( stk::topology::NODE_RANK, "gamma_transition")), - dwalldistdx_(&meta_->declare_field(stk::topology::NODE_RANK, "dwalldistdx")), - dnDotVdx_(&meta_->declare_field(stk::topology::NODE_RANK, "dnDotVdx")), + dwalldistdx_( + &meta_->declare_field(stk::topology::NODE_RANK, "dwalldistdx")), + dnDotVdx_( + &meta_->declare_field(stk::topology::NODE_RANK, "dnDotVdx")), maxLengthScale_(&meta_->declare_field( stk::topology::NODE_RANK, "sst_max_length_scale")), minDistance_(&meta_->declare_field( @@ -778,7 +780,8 @@ class SSTKernelHex8Mesh : public LowMachKernelHex8Mesh stk::mesh::put_field_on_mesh(*sdrbc_, meta_->universal_part(), nullptr); stk::mesh::put_field_on_mesh(*visc_, meta_->universal_part(), nullptr); stk::mesh::put_field_on_mesh(*tvisc_, meta_->universal_part(), nullptr); - stk::mesh::put_field_on_mesh(*gamma_intermittency_, meta_->universal_part(), nullptr); + stk::mesh::put_field_on_mesh( + *gamma_intermittency_, meta_->universal_part(), nullptr); stk::mesh::put_field_on_mesh( *maxLengthScale_, meta_->universal_part(), nullptr); stk::mesh::put_field_on_mesh( @@ -798,10 +801,12 @@ class SSTKernelHex8Mesh : public LowMachKernelHex8Mesh stk::io::set_field_output_type(*dwdx_, stk::io::FieldOutputType::VECTOR_3D); stk::mesh::put_field_on_mesh( *dwalldistdx_, meta_->universal_part(), spatialDim_, nullptr); - stk::io::set_field_output_type(*dwalldistdx_, stk::io::FieldOutputType::VECTOR_3D); + stk::io::set_field_output_type( + *dwalldistdx_, stk::io::FieldOutputType::VECTOR_3D); stk::mesh::put_field_on_mesh( *dnDotVdx_, meta_->universal_part(), spatialDim_, nullptr); - stk::io::set_field_output_type(*dnDotVdx_, stk::io::FieldOutputType::VECTOR_3D); + stk::io::set_field_output_type( + *dnDotVdx_, stk::io::FieldOutputType::VECTOR_3D); double initOpenMassFlowRate[sierra::nalu::AlgTraitsQuad4::numScsIp_]; for (int i = 0; i < sierra::nalu::AlgTraitsQuad4::numScsIp_; ++i) { initOpenMassFlowRate[i] = 10.0; @@ -833,7 +838,8 @@ class SSTKernelHex8Mesh : public LowMachKernelHex8Mesh *bulk_, *coordinates_, *density_); unit_test_kernel_utils::tke_test_function(*bulk_, *coordinates_, *tke_); unit_test_kernel_utils::sdr_test_function(*bulk_, *coordinates_, *sdr_); - unit_test_kernel_utils::gamma_intermittency_test_function(*bulk_, *coordinates_, *gamma_intermittency_); + unit_test_kernel_utils::gamma_intermittency_test_function( + *bulk_, *coordinates_, *gamma_intermittency_); unit_test_kernel_utils::minimum_distance_to_wall_test_function( *bulk_, *coordinates_, *minDistance_); unit_test_kernel_utils::sst_f_one_blending_test_function( diff --git a/unit_tests/node_kernels/UnitTestBLTGammaM2015NodeKernel.C b/unit_tests/node_kernels/UnitTestBLTGammaM2015NodeKernel.C index 846e55c375..c7ae735cc0 100644 --- a/unit_tests/node_kernels/UnitTestBLTGammaM2015NodeKernel.C +++ b/unit_tests/node_kernels/UnitTestBLTGammaM2015NodeKernel.C @@ -17,14 +17,7 @@ namespace { namespace hex8_golds { namespace blt_gamma { static constexpr double rhs[8] = { - 0, - 0, - 0, - 0.12823826807242, - 0, - 0, - -0.043287170452808, - 0.43035793150449, + 0, 0, 0, 0.12823826807242, 0, 0, -0.043287170452808, 0.43035793150449, }; static constexpr double lhs[8][8] = { diff --git a/unit_tests/node_kernels/UnitTestSSTNodeKernel.C b/unit_tests/node_kernels/UnitTestSSTNodeKernel.C index 04447bd495..e548d9381e 100644 --- a/unit_tests/node_kernels/UnitTestSSTNodeKernel.C +++ b/unit_tests/node_kernels/UnitTestSSTNodeKernel.C @@ -410,17 +410,11 @@ static constexpr double rhs[8] = { }; } // namespace tke_sst_des_sust - namespace tke_sst_trans { static constexpr double rhs[8] = { - -0.004499999980007, - -0.0026450336235646, - -0.0037149722043966, - -0.0013217844303503, - -0.0026450336153232, - -0.0015547117509048, - -0.017568942314324, - 0.0073065228754648, + -0.004499999980007, -0.0026450336235646, -0.0037149722043966, + -0.0013217844303503, -0.0026450336153232, -0.0015547117509048, + -0.017568942314324, 0.0073065228754648, }; static constexpr double lhs[8][8] = { @@ -505,7 +499,7 @@ static constexpr double lhs[8][8] = { 0.0022476729243034, }, }; -} // // namespace tke_sst_trans +} // namespace tke_sst_trans namespace sdr_sst { static constexpr double rhs[8] = { @@ -1147,7 +1141,8 @@ TEST_F(SSTKernelHex8Mesh, NGP_tke_sst_trans_node) unit_test_utils::NodeHelperObjects helperObjs( bulk_, stk::topology::HEX_8, 1, partVec_[0]); - helperObjs.nodeAlg->add_kernel(*meta_); + helperObjs.nodeAlg->add_kernel( + *meta_); helperObjs.execute(); @@ -1365,7 +1360,8 @@ TEST_F(SSTKernelHex8Mesh, NGP_sdr_sst_trans_node) unit_test_utils::NodeHelperObjects helperObjs( bulk_, stk::topology::HEX_8, 1, partVec_[0]); - helperObjs.nodeAlg->add_kernel(*meta_); + helperObjs.nodeAlg->add_kernel( + *meta_); helperObjs.execute();