diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 92615f765d..5e919efcc4 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 84dadd7acb..576e3253ab 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 f094418ecc..02a8cbd3ab 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C @@ -41,10 +41,6 @@ Source files: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// turbulence constants - file-scope -static const scalar Cmu(0.09); - - int main(int argc, char *argv[]) { timeSelector::addOptions(); @@ -108,6 +104,8 @@ 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 c972574631..66fb1ae6e8 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -46,6 +46,12 @@ 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 * * * * * * * * * * * // @@ -115,9 +121,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(standardPrt), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + Prt_(defaultPrt_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -148,9 +154,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", standardPrt)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + Prt_(dict.lookupOrDefault("Prt", defaultPrt_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -312,9 +318,9 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - writeEntryIfDifferent(os, "Prt", standardPrt, Prt_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Prt", defaultPrt_, Prt_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, 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 40e81e7feb..e7f6184d81 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H @@ -93,12 +93,6 @@ 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 8786eb996d..f2c944220a 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_(standardPrt) + Prt_(0.85) { checkType(); } @@ -96,7 +96,7 @@ alphaSgsWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", standardPrt)) + Prt_(dict.lookupOrDefault("Prt", 0.85)) { 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 c178f2455f..fb738498e7 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H @@ -70,12 +70,6 @@ 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 c8f2dbb14b..e6c779a105 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -39,6 +39,14 @@ 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 @@ -51,8 +59,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_("U"), rhoName_("rho"), muName_("mu"), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + kappa_(defaultKappa_), + E_(defaultE_) {} @@ -84,8 +92,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_(dict.lookupOrDefault("U", "U")), rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) {} @@ -197,8 +205,8 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntryIfDifferent(os, "mu", "mu", muName_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index a592a44970..6d8e659336 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -183,7 +183,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM ) ), - yr_(mesh_), + y_(mesh_), R_ ( @@ -371,7 +371,7 @@ void LaunderGibsonRSTM::correct() if (mesh_.changing()) { - yr_.correct(); + y_.correct(); } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); @@ -436,10 +436,10 @@ void LaunderGibsonRSTM::correct() // wall reflection terms + symm ( - 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_) + 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_) ); REqn().relax(); diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 426f964d6a..00db2c304f 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 yr_; + wallDistReflection y_; volSymmTensorField R_; volScalarField k_; diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index c70b558f1b..b7c972a662 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -40,7 +40,6 @@ 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 df420b90b2..d83cd7bfc2 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -110,11 +110,8 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = rasModel.coeffDict().lookupOrDefault - ( - "Cmu", - turbulenceModel::standardCmu - ); + const scalar Cmu = + rasModel.coeffDict().lookupOrDefault("Cmu", 0.09); 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 ebe9f7a8bc..1beb48840a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace Foam namespace compressible { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -115,11 +121,8 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = rasModel.coeffDict().lookupOrDefault - ( - "Cmu", - turbulenceModel::standardCmu - ); + const scalar Cmu = + rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); 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 b4ca0d0299..676850c3cd 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultPrt_(0.85); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // alphatWallFunctionFvPatchScalarField:: @@ -49,7 +55,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), mutName_("mut"), - Prt_(standardPrt) + Prt_(defaultPrt_) {} @@ -78,7 +84,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), mutName_(dict.lookupOrDefault("mut", "mut")), - Prt_(dict.lookupOrDefault("Prt", standardPrt)) + Prt_(dict.lookupOrDefault("Prt", defaultPrt_)) {} @@ -122,7 +128,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Prt", standardPrt, Prt_); + writeEntryIfDifferent(os, "Prt", defaultPrt_, 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 1c1be04d54..4f21ba6472 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -28,7 +28,6 @@ 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 @@ -70,12 +69,6 @@ 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 4106462d16..bafabf5943 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -71,9 +79,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_("rho"), muName_("mu"), mutName_("mut"), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -116,9 +124,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -247,9 +255,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, 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 7475fabada..701a74291c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -107,9 +115,9 @@ tmp mutWallFunctionFvPatchScalarField::calcMut() const void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); } @@ -122,9 +130,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE), + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_), yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -153,9 +161,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)), + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)), 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 467b537740..01489c3917 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -71,9 +79,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), muName_("mu"), mutName_("mut"), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -116,9 +124,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -236,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 13f7d821c4..97638e5e49 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -98,18 +98,6 @@ 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 50a5e17958..aeabcca8a2 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -25,7 +25,6 @@ License \*---------------------------------------------------------------------------*/ #include "nuSgsWallFunctionFvPatchScalarField.H" -#include "LESModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -39,6 +38,13 @@ 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:: @@ -51,8 +57,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), UName_("U"), nuName_("nu"), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + kappa_(defaultKappa_), + E_(defaultE_) {} @@ -84,8 +90,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), UName_(dict.lookupOrDefault("U", "U")), nuName_(dict.lookupOrDefault("nu", "nu")), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) {} @@ -190,8 +196,8 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "U", "U", UName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, 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 cdd6282d32..e4b7c01b06 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace Foam namespace incompressible { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -115,11 +121,8 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = rasModel.coeffDict().lookupOrDefault - ( - "Cmu", - turbulenceModel::standardCmu - ); + const scalar Cmu = + rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); 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 c94355d0df..e1786de417 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -70,9 +78,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -113,9 +121,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -235,9 +243,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, 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 2821580a37..466ce5580c 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -106,9 +114,9 @@ tmp nutWallFunctionFvPatchScalarField::calcNut() const void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); } @@ -121,9 +129,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE), + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); @@ -156,9 +164,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)), + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)), 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 27434d4408..1ba2d3d0db 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ 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() @@ -70,9 +78,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(turbulenceModel::standardCmu), - kappa_(turbulenceModel::standardKappa), - E_(turbulenceModel::standardE) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -113,9 +121,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), - kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), - E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -225,9 +233,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); - writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); - writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 7b769998b8..1474e5dfa3 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -96,18 +96,6 @@ 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");