diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 5e919efcc440848a1fbf9454698022e1ef2bdc98..92615f765d4b78ee173bee76149dcd5885f251e8 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -27,7 +27,7 @@ Class Description Standard k-epsilon turbulence model with additional source terms - corresponding to PDR basic drag model (\link basic.H \endlink) + corresponding to PDR basic drag model (@link basic.H @endlink) The default model coefficients correspond to the following: @verbatim @@ -47,10 +47,10 @@ Description \f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to interaction with unresolved obstacles. - In the \f$ \epsilon \f$ equation \f$ C_{1} G_{R} \f$ is added as a source + In the \f$ \epsilon \f$ equation, \f$ C_{1} G_{R} \f$ is added as a source term. - In the \f$ \kappa \f$ equation \f$ G_{R} \f$ is added as a source term. + In the \f$ \kappa \f$ equation, \f$ G_{R} \f$ is added as a source term. SourceFiles PDRkEpsilon.C diff --git a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H index 576e3253abf0b9f1dc592825aab3b6e5852bb853..84dadd7acb5b80452b7992f855d7965d893ff8df 100644 --- a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H +++ b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H @@ -1,4 +1,4 @@ -if(turbulence) +if (turbulence) { if (mesh.changing()) { diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C index 02a8cbd3ab7971c7698e9d75e0379aef45ef2cc9..f094418ecc94ee97be71d0c70da5c1ff5c45682e 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C @@ -41,6 +41,10 @@ Source files: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// turbulence constants - file-scope +static const scalar Cmu(0.09); + + int main(int argc, char *argv[]) { timeSelector::addOptions(); @@ -104,8 +108,6 @@ int main(int argc, char *argv[]) if (!IOobject("omega", runTime.timeName(), mesh).headerOk()) { - const scalar Cmu = 0.09; - Info<< "creating omega" << endl; volScalarField omega ( diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 66fb1ae6e8fc3abea25e4777ab8d70ec12b719c9..c972574631d463de6bdf07948319399a169672f0 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -46,12 +46,6 @@ scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0; scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01; label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; -//! @cond fileScope -static const scalar defaultPrt_(0.85); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -121,9 +115,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(defaultPrt_), - kappa_(defaultKappa_), - E_(defaultE_) + Prt_(standardPrt), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -154,9 +148,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault<scalar>("Prt", defaultPrt_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + Prt_(dict.lookupOrDefault<scalar>("Prt", standardPrt)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) { checkType(); } @@ -318,9 +312,9 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); - writeEntryIfDifferent<scalar>(os, "Prt", defaultPrt_, Prt_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Prt", standardPrt, Prt_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H index e7f6184d814f6633342b290164b19d523abb5faf..40e81e7feb2553435ba74c6962123424e05c8a39 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H @@ -93,6 +93,12 @@ class alphaSgsJayatillekeWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("alphaSgsJayatillekeWallFunction"); diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C index f2c944220a2189081b26ea953c06adbca04362dd..8786eb996df254a6ef4ed01b3053bdd8bdf9883a 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C @@ -67,7 +67,7 @@ alphaSgsWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(0.85) + Prt_(standardPrt) { checkType(); } @@ -96,7 +96,7 @@ alphaSgsWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)) + Prt_(dict.lookupOrDefault<scalar>("Prt", standardPrt)) { checkType(); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H index fb738498e754196eeb85dddc1628ce2ef86b6621..c178f2455fc503d0c9f30f6cfabe67c744404055 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H @@ -70,6 +70,12 @@ class alphaSgsWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("alphaSgsWallFunction"); diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C index e6c779a105ba57207a1b3a2162c0ecc37643bf41..c8f2dbb14b22394502273050b7730cb7cddb7b21 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -39,14 +39,6 @@ namespace compressible namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField @@ -59,8 +51,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_("U"), rhoName_("rho"), muName_("mu"), - kappa_(defaultKappa_), - E_(defaultE_) + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) {} @@ -92,8 +84,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_(dict.lookupOrDefault<word>("U", "U")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")), muName_(dict.lookupOrDefault<word>("mu", "mu")), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) {} @@ -205,8 +197,8 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); writeEntryIfDifferent<word>(os, "mu", "mu", muName_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 6d8e6593361f9037b0de935522f962447aa980fa..a592a44970888db074a9d3df6c394b880f69b8f1 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -183,7 +183,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM ) ), - y_(mesh_), + yr_(mesh_), R_ ( @@ -371,7 +371,7 @@ void LaunderGibsonRSTM::correct() if (mesh_.changing()) { - y_.correct(); + yr_.correct(); } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); @@ -436,10 +436,10 @@ void LaunderGibsonRSTM::correct() // wall reflection terms + symm ( - I*((y_.n() & reflect) & y_.n()) - - 1.5*(y_.n()*(reflect & y_.n()) - + (y_.n() & reflect)*y_.n()) - )*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*y_*epsilon_) + I*((yr_.n() & reflect) & yr_.n()) + - 1.5*(yr_.n()*(reflect & yr_.n()) + + (yr_.n() & reflect)*yr_.n()) + )*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*yr_*epsilon_) ); REqn().relax(); diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 00db2c304f9d9338575f2de850098349a894ce02..426f964d6a973bf4f7e6bbc8b2f6754e05b6132c 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -42,10 +42,10 @@ Description C2Ref 0.3; Cs 0.25; Ceps 0.15; - sigmah 1.0; // only for compressible sigmaEps 1.3; sigmaR 0.81967; couplingFactor 0.0; + Prt 1.0; // only for compressible } @endverbatim @@ -105,7 +105,7 @@ class LaunderGibsonRSTM // Fields - wallDistReflection y_; + wallDistReflection yr_; volSymmTensorField R_; volScalarField k_; diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index b7c972a662c05b473d8b8eb2f80b4e7125593e4f..c70b558f1b6ac6f2a8eb855b493b1af81b5016da 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -40,6 +40,7 @@ Description alphah 1.0; // only for compressible alphahk 1.0; // only for compressible alphaEps 0.76923; + Prt 1.0; // only for compressible } @endverbatim diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index d83cd7bfc2557a499c27db1c5dc1b2a52146307d..df420b90b234aab234b866648844bd57d00f5a1a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -110,8 +110,11 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault<scalar> + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu75 = pow(Cmu, 0.75); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 1beb48840a68cfff8c21bda8a34e44585de8b543..ebe9f7a8bca4aef27bd1fc0f759e9bb970d3d540 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace Foam namespace compressible { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -121,8 +115,11 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", defaultCmu_); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault<scalar> + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index 676850c3cdc61fa2fbd2670b7d05d387237728f9..b4ca0d02992e608268dfc4557371fce617ec80a9 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultPrt_(0.85); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // alphatWallFunctionFvPatchScalarField:: @@ -55,7 +49,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), mutName_("mut"), - Prt_(defaultPrt_) + Prt_(standardPrt) {} @@ -84,7 +78,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), mutName_(dict.lookupOrDefault<word>("mut", "mut")), - Prt_(dict.lookupOrDefault<scalar>("Prt", defaultPrt_)) + Prt_(dict.lookupOrDefault<scalar>("Prt", standardPrt)) {} @@ -128,7 +122,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); - writeEntryIfDifferent<scalar>(os, "Prt", defaultPrt_, Prt_); + writeEntryIfDifferent<scalar>(os, "Prt", standardPrt, Prt_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index 4f21ba6472e13b70e057bb874911659fe3d1c6ba..1c1be04d544becf6253abd525a120658a72246f7 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -28,6 +28,7 @@ Class Description Boundary condition for turbulent thermal diffusivity when using wall functions + - replicates OpenFOAM v1.5 (and earlier) behaviour - Turbulent Prandtl number defaults to 0.85 if unspecified @@ -69,6 +70,12 @@ class alphatWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("compressible::alphatWallFunction"); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index bafabf5943623f8a6e237cd4dd7f1a1e0a6a51bb..4106462d167157a38eaf31d637e23760c2b6b39a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -79,9 +71,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_("rho"), muName_("mu"), mutName_("mut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -124,9 +116,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_(dict.lookupOrDefault<word>("rho", "rho")), muName_(dict.lookupOrDefault<word>("mu", "mu")), mutName_(dict.lookupOrDefault<word>("mut", "mut")), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) { checkType(); } @@ -255,9 +247,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "mu", "mu", muName_); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index 701a74291c009bc5dd73042932acf466b18c8965..7475fabadad327e6fce9e91962c0b01c2131ac33 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void mutWallFunctionFvPatchScalarField::checkType() @@ -115,9 +107,9 @@ tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); } @@ -130,9 +122,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_), + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE), yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -161,9 +153,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)), + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)), yPlusLam_(calcYPlusLam(kappa_, E_)) {} diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 01489c3917b34db6fcacd2969feb74c2216d2259..467b53774022a80a30d1b78ef47c58ecc5dd930f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -79,9 +71,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), muName_("mu"), mutName_("mut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -124,9 +116,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), muName_(dict.lookupOrDefault<word>("mu", "mu")), mutName_(dict.lookupOrDefault<word>("mut", "mut")), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) { checkType(); } @@ -244,9 +236,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "mu", "mu", muName_); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 97638e5e49cfb054a21812fd7fa94ef06c96ccb9..13f7d821c4b0952b2dc98be6a735a27f68676239 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -98,6 +98,18 @@ private: public: + // Public data + + //- Standard value for turbulence constant %Cmu + static const scalar standardCmu = 0.09; + + //- Standard value for turbulence constant %kappa + static const scalar standardKappa = 0.41; + + //- Standard value for turbulence constant %E + static const scalar standardE = 9.8; + + //- Runtime type information TypeName("turbulenceModel"); diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index aeabcca8a2e8a0a6011744e3a9ba0dbb1d19e56b..50a5e1795811475615ea0d864c319607aa3e6df9 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -25,6 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "nuSgsWallFunctionFvPatchScalarField.H" +#include "LESModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -38,13 +39,6 @@ namespace incompressible namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nuSgsWallFunctionFvPatchScalarField:: @@ -57,8 +51,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), UName_("U"), nuName_("nu"), - kappa_(defaultKappa_), - E_(defaultE_) + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) {} @@ -90,8 +84,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), UName_(dict.lookupOrDefault<word>("U", "U")), nuName_(dict.lookupOrDefault<word>("nu", "nu")), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) {} @@ -196,8 +190,8 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "U", "U", UName_); writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index e4b7c01b06c13f0b9d2a7eba68c2c131a77ef01b..cdd6282d322109abbe386ccfbb61c85da21ebcc4 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace Foam namespace incompressible { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -121,8 +115,11 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", defaultCmu_); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault<scalar> + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index e1786de41778f883606ee38ad6f37f2cf6552df6..c94355d0dfa2ec95ac224dfe545a1710887a036b 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -78,9 +70,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -121,9 +113,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), nuName_(dict.lookupOrDefault<word>("nu", "nu")), nutName_(dict.lookupOrDefault<word>("nut", "nut")), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) { checkType(); } @@ -243,9 +235,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); writeEntryIfDifferent<word>(os, "nut", "nut", nutName_); - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index 466ce5580cbdd5cf522fe417467c01dedb04c32a..2821580a370e262df54190301c7338771a53fa5a 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void nutWallFunctionFvPatchScalarField::checkType() @@ -114,9 +106,9 @@ tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); } @@ -129,9 +121,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_), + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); @@ -164,9 +156,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)), + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 1ba2d3d0db816b2e3549e90f45598d090e04cc44..27434d44083137f083fccdd14f6c7d8d08986509 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -78,9 +70,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -121,9 +113,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), nuName_(dict.lookupOrDefault<word>("nu", "nu")), nutName_(dict.lookupOrDefault<word>("nut", "nut")), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), - E_(dict.lookupOrDefault<scalar>("E", defaultE_)) + Cmu_(dict.lookupOrDefault<scalar>("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault<scalar>("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault<scalar>("E", turbulenceModel::standardE)) { checkType(); } @@ -233,9 +225,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); writeEntryIfDifferent<word>(os, "nut", "nut", nutName_); - writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); + writeEntryIfDifferent<scalar>(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent<scalar>(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent<scalar>(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 1474e5dfa340d81dded04e06344410e9c7482e82..7b769998b88c48cd9c6909fdc6ccaae67cf78a66 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -96,6 +96,18 @@ private: public: + // Public data + + //- Standard value for turbulence constant %Cmu + static const scalar standardCmu = 0.09; + + //- Standard value for turbulence constant %kappa + static const scalar standardKappa = 0.41; + + //- Standard value for turbulence constant %E + static const scalar standardE = 9.8; + + //- Runtime type information TypeName("turbulenceModel");