Revert "file-scoped (static const) variables for default turbulence parameters"

This reverts commit e2968b6a36.
This commit is contained in:
Mark Olesen
2009-08-03 19:58:16 +02:00
parent 8bad166975
commit db8eadd66e
12 changed files with 82 additions and 170 deletions

View File

@ -46,13 +46,6 @@ scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0;
scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01; scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01;
label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType() void alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType()
@ -121,9 +114,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
Prt_(defaultPrt_), Prt_(0.85),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{ {
checkType(); checkType();
} }
@ -154,9 +147,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
Prt_(dict.lookupOrDefault<scalar>("Prt", defaultPrt_)), Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{ {
checkType(); checkType();
} }
@ -318,9 +311,9 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeEntryIfDifferent<scalar>(os, "Prt", defaultPrt_, Prt_); writeEntryIfDifferent<scalar>(os, "Prt", 0.85, Prt_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -39,14 +39,6 @@ namespace compressible
namespace LESModels namespace LESModels
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
static const scalar defaultKappa_(0.41);
static const scalar defaultE_(9.8);
//! @endcond fileScope
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
@ -59,8 +51,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
UName_("U"), UName_("U"),
rhoName_("rho"), rhoName_("rho"),
muName_("mu"), muName_("mu"),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{} {}
@ -92,8 +84,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
UName_(dict.lookupOrDefault<word>("U", "U")), UName_(dict.lookupOrDefault<word>("U", "U")),
rhoName_(dict.lookupOrDefault<word>("rho", "rho")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
muName_(dict.lookupOrDefault<word>("mu", "mu")), muName_(dict.lookupOrDefault<word>("mu", "mu")),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{} {}
@ -205,8 +197,8 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
writeEntryIfDifferent<word>(os, "mu", "mu", muName_); writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -38,12 +38,6 @@ namespace Foam
namespace compressible namespace compressible
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
static const scalar defaultCmu_(0.09);
//! @endcond fileScope
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentMixingLengthFrequencyInletFvPatchScalarField:: turbulentMixingLengthFrequencyInletFvPatchScalarField::
@ -54,7 +48,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
) )
: :
fixedValueFvPatchField<scalar>(p, iF), fixedValueFvPatchField<scalar>(p, iF),
mixingLength_(0.001), mixingLength_(0.0),
kName_("k") kName_("k")
{} {}
@ -122,7 +116,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu = const scalar Cmu =
rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", defaultCmu_); rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09);
const scalar Cmu25 = pow(Cmu, 0.25); const scalar Cmu25 = pow(Cmu, 0.25);

View File

@ -38,12 +38,6 @@ namespace compressible
namespace RASModels namespace RASModels
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
static const scalar defaultPrt_(0.85);
//! @endcond fileScope
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
alphatWallFunctionFvPatchScalarField:: alphatWallFunctionFvPatchScalarField::
@ -55,7 +49,7 @@ alphatWallFunctionFvPatchScalarField
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
mutName_("mut"), mutName_("mut"),
Prt_(defaultPrt_) Prt_(0.85)
{} {}
@ -84,7 +78,7 @@ alphatWallFunctionFvPatchScalarField
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
mutName_(dict.lookupOrDefault<word>("mut", "mut")), mutName_(dict.lookupOrDefault<word>("mut", "mut")),
Prt_(dict.lookupOrDefault<scalar>("Prt", defaultPrt_)) Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85))
{} {}
@ -128,7 +122,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
writeEntryIfDifferent<scalar>(os, "Prt", defaultPrt_, Prt_); writeEntryIfDifferent<scalar>(os, "Prt", 0.85, Prt_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -40,14 +40,6 @@ namespace compressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void epsilonWallFunctionFvPatchScalarField::checkType() void epsilonWallFunctionFvPatchScalarField::checkType()
@ -79,9 +71,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
rhoName_("rho"), rhoName_("rho"),
muName_("mu"), muName_("mu"),
mutName_("mut"), mutName_("mut"),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{ {
checkType(); checkType();
} }
@ -124,9 +116,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
rhoName_(dict.lookupOrDefault<word>("rho", "rho")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
muName_(dict.lookupOrDefault<word>("mu", "mu")), muName_(dict.lookupOrDefault<word>("mu", "mu")),
mutName_(dict.lookupOrDefault<word>("mut", "mut")), mutName_(dict.lookupOrDefault<word>("mut", "mut")),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{ {
checkType(); checkType();
} }
@ -255,9 +247,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "mu", "mu", muName_); writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -40,14 +40,6 @@ namespace compressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void mutkWallFunctionFvPatchScalarField::checkType() void mutkWallFunctionFvPatchScalarField::checkType()
@ -115,9 +107,9 @@ tmp<scalarField> mutkWallFunctionFvPatchScalarField::calcMut() const
void mutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const void mutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
{ {
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
} }
@ -130,9 +122,9 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_), E_(9.8),
yPlusLam_(calcYPlusLam(kappa_, E_)) yPlusLam_(calcYPlusLam(kappa_, E_))
{} {}
@ -161,9 +153,9 @@ mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)), E_(dict.lookupOrDefault<scalar>("E", 9.8)),
yPlusLam_(calcYPlusLam(kappa_, E_)) yPlusLam_(calcYPlusLam(kappa_, E_))
{} {}

View File

@ -40,14 +40,6 @@ namespace compressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void omegaWallFunctionFvPatchScalarField::checkType() void omegaWallFunctionFvPatchScalarField::checkType()
@ -79,9 +71,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
GName_("RASModel::G"), GName_("RASModel::G"),
muName_("mu"), muName_("mu"),
mutName_("mut"), mutName_("mut"),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{ {
checkType(); checkType();
} }
@ -124,9 +116,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
muName_(dict.lookupOrDefault<word>("mu", "mu")), muName_(dict.lookupOrDefault<word>("mu", "mu")),
mutName_(dict.lookupOrDefault<word>("mut", "mut")), mutName_(dict.lookupOrDefault<word>("mut", "mut")),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{ {
checkType(); checkType();
} }
@ -244,9 +236,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "mu", "mu", muName_); writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -38,13 +38,6 @@ namespace incompressible
namespace LESModels namespace LESModels
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
static const scalar defaultKappa_(0.41);
static const scalar defaultE_(9.8);
//! @endcond fileScope
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nuSgsWallFunctionFvPatchScalarField:: nuSgsWallFunctionFvPatchScalarField::
@ -57,8 +50,8 @@ nuSgsWallFunctionFvPatchScalarField
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
UName_("U"), UName_("U"),
nuName_("nu"), nuName_("nu"),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{} {}
@ -90,8 +83,8 @@ nuSgsWallFunctionFvPatchScalarField
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
UName_(dict.lookupOrDefault<word>("U", "U")), UName_(dict.lookupOrDefault<word>("U", "U")),
nuName_(dict.lookupOrDefault<word>("nu", "nu")), nuName_(dict.lookupOrDefault<word>("nu", "nu")),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{} {}
@ -196,8 +189,8 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "U", "U", UName_); writeEntryIfDifferent<word>(os, "U", "U", UName_);
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -38,12 +38,6 @@ namespace Foam
namespace incompressible namespace incompressible
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
static const scalar defaultCmu_(0.09);
//! @endcond fileScope
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentMixingLengthFrequencyInletFvPatchScalarField:: turbulentMixingLengthFrequencyInletFvPatchScalarField::
@ -122,7 +116,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu = const scalar Cmu =
rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", defaultCmu_); rasModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09);
const scalar Cmu25 = pow(Cmu, 0.25); const scalar Cmu25 = pow(Cmu, 0.25);
@ -143,7 +137,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << mixingLength_ << token::END_STATEMENT << nl;
writeEntryIfDifferent<word>(os, "k", "k", kName_); writeEntryIfDifferent<word>(os, "k", "k", kName_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -40,14 +40,6 @@ namespace incompressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void epsilonWallFunctionFvPatchScalarField::checkType() void epsilonWallFunctionFvPatchScalarField::checkType()
@ -78,9 +70,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
GName_("RASModel::G"), GName_("RASModel::G"),
nuName_("nu"), nuName_("nu"),
nutName_("nut"), nutName_("nut"),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{ {
checkType(); checkType();
} }
@ -121,9 +113,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
nuName_(dict.lookupOrDefault<word>("nu", "nu")), nuName_(dict.lookupOrDefault<word>("nu", "nu")),
nutName_(dict.lookupOrDefault<word>("nut", "nut")), nutName_(dict.lookupOrDefault<word>("nut", "nut")),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{ {
checkType(); checkType();
} }
@ -243,9 +235,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_); writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -40,14 +40,6 @@ namespace incompressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void nutkWallFunctionFvPatchScalarField::checkType() void nutkWallFunctionFvPatchScalarField::checkType()
@ -114,9 +106,9 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
void nutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const void nutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
{ {
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
} }
@ -129,9 +121,9 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_), E_(9.8),
yPlusLam_(calcYPlusLam(kappa_, E_)) yPlusLam_(calcYPlusLam(kappa_, E_))
{ {
checkType(); checkType();
@ -164,9 +156,9 @@ nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)), E_(dict.lookupOrDefault<scalar>("E", 9.8)),
yPlusLam_(calcYPlusLam(kappa_, E_)) yPlusLam_(calcYPlusLam(kappa_, E_))
{ {
checkType(); checkType();

View File

@ -40,14 +40,6 @@ namespace incompressible
namespace RASModels 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 * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void omegaWallFunctionFvPatchScalarField::checkType() void omegaWallFunctionFvPatchScalarField::checkType()
@ -78,9 +70,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
GName_("RASModel::G"), GName_("RASModel::G"),
nuName_("nu"), nuName_("nu"),
nutName_("nut"), nutName_("nut"),
Cmu_(defaultCmu_), Cmu_(0.09),
kappa_(defaultKappa_), kappa_(0.41),
E_(defaultE_) E_(9.8)
{ {
checkType(); checkType();
} }
@ -121,9 +113,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")), GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
nuName_(dict.lookupOrDefault<word>("nu", "nu")), nuName_(dict.lookupOrDefault<word>("nu", "nu")),
nutName_(dict.lookupOrDefault<word>("nut", "nut")), nutName_(dict.lookupOrDefault<word>("nut", "nut")),
Cmu_(dict.lookupOrDefault<scalar>("Cmu", defaultCmu_)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", defaultKappa_)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", defaultE_)) E_(dict.lookupOrDefault<scalar>("E", 9.8))
{ {
checkType(); checkType();
} }
@ -233,9 +225,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_); writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_); writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
writeEntryIfDifferent<scalar>(os, "Cmu", defaultCmu_, Cmu_); writeEntryIfDifferent<scalar>(os, "Cmu", 0.09, Cmu_);
writeEntryIfDifferent<scalar>(os, "kappa", defaultKappa_, kappa_); writeEntryIfDifferent<scalar>(os, "kappa", 0.41, kappa_);
writeEntryIfDifferent<scalar>(os, "E", defaultE_, E_); writeEntryIfDifferent<scalar>(os, "E", 9.8, E_);
writeEntry("value", os); writeEntry("value", os);
} }