diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index e70273449b32d3ae0779bb1e7dba4e92ee150809..86bb0fc14ce3ca0086f682f10773a9d9de0b81e4 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -261,7 +261,6 @@ private: params["Mpfa.Q"] = "0.0"; // parameters in the RANS group - params["RANS.KarmanConstant"] = "0.41"; params["RANS.EddyViscosityModel"] = "1"; } }; diff --git a/dumux/freeflow/rans/problem.hh b/dumux/freeflow/rans/problem.hh index b5e456f6888db8fe7b07facd4af009f01d28eadc..02d7a597b1c3b32c42f0fb307c770594e15f0594 100644 --- a/dumux/freeflow/rans/problem.hh +++ b/dumux/freeflow/rans/problem.hh @@ -315,6 +315,12 @@ public: return 0.0; } + /*! + * \brief Returns the Karman constant + */ + const Scalar karmanConstant() const + { return 0.41; } + public: std::vector<unsigned int> wallElementID_; std::vector<Scalar> wallDistance_; diff --git a/dumux/freeflow/rans/zeroeq/problem.hh b/dumux/freeflow/rans/zeroeq/problem.hh index 3911ec5d0cfc5f687ff97b502ac5a056a2d09a41..2d6804870a84d3e119fd5dbea6c0766e22df1928 100644 --- a/dumux/freeflow/rans/zeroeq/problem.hh +++ b/dumux/freeflow/rans/zeroeq/problem.hh @@ -175,9 +175,6 @@ public: const Scalar cWake = 0.25; const Scalar cKleb = 0.3; - static const auto karmanConstant - = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "RANS.KarmanConstant"); - std::vector<Scalar> storedFMax; std::vector<Scalar> storedYFMax; storedFMax.resize(this->fvGridGeometry().elementMapper().size(), 0.0); @@ -197,7 +194,7 @@ public: Scalar uStar = sqrt(this->kinematicViscosity_[wallElementID] * abs(this->velocityGradients_[wallElementID][flowNormalAxis][wallNormalAxis])); Scalar yPlus = wallDistance * uStar / this->kinematicViscosity_[elementID]; - Scalar mixingLength = karmanConstant * wallDistance * (1.0 - exp(-yPlus / aPlus)); + Scalar mixingLength = this->karmanConstant() * wallDistance * (1.0 - exp(-yPlus / aPlus)); kinematicEddyViscosityInner[elementID] = mixingLength * mixingLength * omegaAbs; Scalar f = wallDistance * omegaAbs * (1.0 - exp(-yPlus / aPlus)); diff --git a/dumux/freeflow/rans/zeroeq/volumevariables.hh b/dumux/freeflow/rans/zeroeq/volumevariables.hh index dc23ef7f3e953c407062ba86d39df3712123aeb6..4a981e90201450ebc5182c6ca7f04326582d17c8 100644 --- a/dumux/freeflow/rans/zeroeq/volumevariables.hh +++ b/dumux/freeflow/rans/zeroeq/volumevariables.hh @@ -109,8 +109,6 @@ public: using std::exp; using std::sqrt; Scalar kinematicEddyViscosity = 0.0; - static const auto karmanConstant - = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "RANS.KarmanConstant"); static const auto eddyViscosityModel = getParamFromGroup<int>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "RANS.EddyViscosityModel"); unsigned int elementID = problem.fvGridGeometry().elementMapper().index(element); @@ -124,12 +122,12 @@ public: } else if (eddyViscosityModel == EddyViscosityModels::prandtl) { - Scalar mixingLength = karmanConstant * asImp_().wallDistanceRough(); + Scalar mixingLength = problem.karmanConstant() * asImp_().wallDistanceRough(); kinematicEddyViscosity = mixingLength * mixingLength * velGrad; } else if (eddyViscosityModel == EddyViscosityModels::modifiedVanDriest) { - Scalar mixingLength = karmanConstant * asImp_().wallDistanceRough() + Scalar mixingLength = problem.karmanConstant() * asImp_().wallDistanceRough() * (1.0 - exp(-asImp_().yPlusRough() / 26.0)) / sqrt(1.0 - exp(-0.26 * asImp_().yPlusRough())); kinematicEddyViscosity = mixingLength * mixingLength * velGrad;