ENH: Register turbulenceModel with optional name (default is 'turbulenceModel')

Now instead of looking up RASModel we can lookup turbulenceModel instead.
This commit is contained in:
mattijs
2010-06-11 16:39:16 +01:00
parent 4c3021ba61
commit 9544280e65
136 changed files with 586 additions and 412 deletions

View File

@ -50,10 +50,11 @@ PDRkEpsilon::PDRkEpsilon
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -112,7 +112,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -60,10 +60,11 @@ DeardorffDiffStress::DeardorffDiffStress
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenSGSStress(rho, U, phi, thermoPhysicalModel), GenSGSStress(rho, U, phi, thermoPhysicalModel),
ck_ ck_

View File

@ -101,7 +101,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -41,12 +41,18 @@ GenEddyVisc::GenEddyVisc
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel LESModel
( (
word("GenEddyVisc"), rho, U, phi, thermoPhysicalModel word("GenEddyVisc"),
rho,
U,
phi,
thermoPhysicalModel,
turbulenceModelName
), ),
ce_ ce_

View File

@ -90,7 +90,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -41,7 +41,8 @@ GenSGSStress::GenSGSStress
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel LESModel
@ -50,7 +51,8 @@ GenSGSStress::GenSGSStress
rho, rho,
U, U,
phi, phi,
thermoPhysicalModel thermoPhysicalModel,
turbulenceModelName
), ),
ce_ ce_

View File

@ -90,7 +90,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -58,10 +58,11 @@ LESModel::LESModel
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
turbulenceModel(rho, U, phi, thermoPhysicalModel), turbulenceModel(rho, U, phi, thermoPhysicalModel, turbulenceModelName),
IOdictionary IOdictionary
( (
@ -97,7 +98,8 @@ autoPtr<LESModel> LESModel::New
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
{ {
// get model name, but do not register the dictionary // get model name, but do not register the dictionary
@ -129,9 +131,11 @@ autoPtr<LESModel> LESModel::New
( (
"LESModel::New" "LESModel::New"
"(" "("
"const volScalarField&, "
"const volVectorField&, " "const volVectorField&, "
"const surfaceScalarField&, " "const surfaceScalarField&, "
"const basicThermo&" "const basicThermo&, "
"const word&"
")" ")"
) << "Unknown LESModel type " ) << "Unknown LESModel type "
<< modelType << nl << nl << modelType << nl << nl
@ -140,7 +144,10 @@ autoPtr<LESModel> LESModel::New
<< exit(FatalError); << exit(FatalError);
} }
return autoPtr<LESModel>(cstrIter()(rho, U, phi, thermoPhysicalModel)); return autoPtr<LESModel>
(
cstrIter()(rho, U, phi, thermoPhysicalModel, turbulenceModelName)
);
} }
@ -160,7 +167,20 @@ void LESModel::correct()
bool LESModel::read() bool LESModel::read()
{ {
if (regIOobject::read()) // Bit of trickery : we are both IOdictionary ('RASProperties') and
// an regIOobject (from the turbulenceModel). Problem is to distinguish
// between the two - we only want to reread the IOdictionary.
bool ok = IOdictionary::readData
(
IOdictionary::readStream
(
IOdictionary::type()
)
);
IOdictionary::close();
if (ok)
{ {
if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs"))
{ {

View File

@ -121,9 +121,10 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
), ),
(rho, U, phi, thermoPhysicalModel) (rho, U, phi, thermoPhysicalModel, turbulenceModelName)
); );
@ -136,7 +137,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );
@ -148,7 +150,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -68,10 +68,11 @@ Smagorinsky::Smagorinsky
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel),
ck_ ck_

View File

@ -96,7 +96,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -106,10 +106,11 @@ SpalartAllmaras::SpalartAllmaras
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
sigmaNut_ sigmaNut_
( (

View File

@ -111,7 +111,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -90,10 +90,11 @@ dynOneEqEddy::dynOneEqEddy
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel),
filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filterPtr_(LESfilter::New(U.mesh(), coeffDict())),

View File

@ -107,7 +107,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -63,10 +63,11 @@ lowReOneEqEddy::lowReOneEqEddy
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel),
ck_ ck_

View File

@ -98,7 +98,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -59,10 +59,11 @@ oneEqEddy::oneEqEddy
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
) )
: :
LESModel(typeName, rho, U, phi, thermoPhysicalModel), LESModel(typeName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel),
ck_ ck_

View File

@ -101,7 +101,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -50,10 +50,11 @@ LRR::LRR
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -116,7 +116,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -50,10 +50,11 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -125,7 +125,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -65,10 +65,11 @@ LaunderSharmaKE::LaunderSharmaKE
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -109,7 +109,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -35,12 +35,8 @@ kqRWallFunctions = $(wallFunctions)/kqRWallFunctions
$(kqRWallFunctions)/kqRWallFunction/kqRWallFunctionFvPatchFields.C $(kqRWallFunctions)/kqRWallFunction/kqRWallFunctionFvPatchFields.C
/* Patch fields */ /* Patch fields */
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
LIB = $(FOAM_LIBBIN)/libcompressibleRASModels LIB = $(FOAM_LIBBIN)/libcompressibleRASModels

View File

@ -1,6 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -59,10 +59,11 @@ RASModel::RASModel
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
turbulenceModel(rho, U, phi, thermophysicalModel), turbulenceModel(rho, U, phi, thermophysicalModel, turbulenceModelName),
IOdictionary IOdictionary
( (
@ -103,7 +104,8 @@ autoPtr<RASModel> RASModel::New
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
{ {
// get model name, but do not register the dictionary // get model name, but do not register the dictionary
@ -138,7 +140,8 @@ autoPtr<RASModel> RASModel::New
"const volScalarField&, " "const volScalarField&, "
"const volVectorField&, " "const volVectorField&, "
"const surfaceScalarField&, " "const surfaceScalarField&, "
"basicThermo&" "basicThermo&, "
"const word&"
")" ")"
) << "Unknown RASModel type " ) << "Unknown RASModel type "
<< modelType << nl << nl << modelType << nl << nl
@ -149,7 +152,7 @@ autoPtr<RASModel> RASModel::New
return autoPtr<RASModel> return autoPtr<RASModel>
( (
cstrIter()(rho, U, phi, thermophysicalModel) cstrIter()(rho, U, phi, thermophysicalModel, turbulenceModelName)
); );
} }
@ -212,7 +215,22 @@ void RASModel::correct()
bool RASModel::read() bool RASModel::read()
{ {
if (regIOobject::read()) //if (regIOobject::read())
// Bit of trickery : we are both IOdictionary ('RASProperties') and
// an regIOobject from the turbulenceModel level. Problem is to distinguish
// between the two - we only want to reread the IOdictionary.
bool ok = IOdictionary::readData
(
IOdictionary::readStream
(
IOdictionary::type()
)
);
IOdictionary::close();
if (ok)
{ {
lookup("turbulence") >> turbulence_; lookup("turbulence") >> turbulence_;

View File

@ -134,9 +134,10 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
), ),
(rho, U, phi, thermoPhysicalModel) (rho, U, phi, thermoPhysicalModel, turbulenceModelName)
); );
@ -149,7 +150,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );
@ -161,7 +163,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -49,10 +49,11 @@ RNGkEpsilon::RNGkEpsilon
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -105,7 +105,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -109,10 +109,11 @@ SpalartAllmaras::SpalartAllmaras
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
sigmaNut_ sigmaNut_
( (

View File

@ -146,7 +146,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -49,10 +49,11 @@ kEpsilon::kEpsilon
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -101,7 +101,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -92,10 +92,11 @@ kOmegaSST::kOmegaSST
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
alphaK1_ alphaK1_
( (

View File

@ -184,7 +184,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -47,10 +47,11 @@ laminar::laminar
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel) RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName)
{} {}

View File

@ -68,7 +68,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -90,10 +90,11 @@ realizableKE::realizableKE
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -123,7 +123,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -1,4 +1,11 @@
turbulenceModel.C turbulenceModel.C
laminar/laminar.C laminar/laminar.C
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C
LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel

View File

@ -1,8 +1,14 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume -lbasicSolidThermo \
-lbasicThermophysicalModels \
-lspecie \
-lfiniteVolume \
-lmeshTools

View File

@ -2,16 +2,16 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by
Free Software Foundation; either version 2 of the License, or (at your the Free Software Foundation, either version 3 of the License, or
option) any later version. (at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,15 +19,14 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "temperatureCoupledBase.H" #include "temperatureCoupledBase.H"
#include "volFields.H" #include "volFields.H"
#include "basicSolidThermo.H" #include "basicSolidThermo.H"
#include "RASModel.H" #include "turbulenceModel.H"
#include "basicThermo.H" #include "basicThermo.H"
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
@ -87,11 +86,14 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::K
{ {
case BASICTHERMO: case BASICTHERMO:
{ {
const compressible::RASModel& model = const compressible::turbulenceModel& model =
mesh.lookupObject<compressible::RASModel>("RASProperties"); mesh.lookupObject<compressible::turbulenceModel>
(
"turbulenceModel"
);
return return
model.alphaEff(patch_.index()) model.alphaEff()().boundaryField()[patch_.index()]
*model.thermo().Cp(Tp, patch_.index()); *model.thermo().Cp(Tp, patch_.index());
} }
break; break;

View File

@ -2,16 +2,16 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by
Free Software Foundation; either version 2 of the License, or (at your the Free Software Foundation, either version 3 of the License, or
option) any later version. (at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,8 +19,7 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
temperatureCoupledBase temperatureCoupledBase
@ -31,7 +30,8 @@ Description
K() : heat conduction at patch. Gets supplied how to lookup/calculate K: K() : heat conduction at patch. Gets supplied how to lookup/calculate K:
- 'lookup' : lookup volScalarField (or volSymmTensorField) with name - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K - 'basicThermo' : use basicThermo and default compressible::turbulenceModel
to calculate K
- 'solidThermo' : use basicSolidThermo K() - 'solidThermo' : use basicSolidThermo K()
- 'directionalSolidThermo' directionalK() - 'directionalSolidThermo' directionalK()
@ -68,7 +68,7 @@ public:
LOOKUP LOOKUP
}; };
//private: private:
// Private data // Private data

View File

@ -27,7 +27,6 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -62,6 +61,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
) )
: :
fixedGradientFvPatchScalarField(p, iF), fixedGradientFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
heatSource_(hsPower), heatSource_(hsPower),
q_(p.size(), 0.0) q_(p.size(), 0.0)
{} {}
@ -77,6 +77,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
) )
: :
fixedGradientFvPatchScalarField(ptf, p, iF, mapper), fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.KName()),
heatSource_(ptf.heatSource_), heatSource_(ptf.heatSource_),
q_(ptf.q_, mapper) q_(ptf.q_, mapper)
{} {}
@ -91,6 +92,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
) )
: :
fixedGradientFvPatchScalarField(p, iF), fixedGradientFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
heatSource_(heatSourceTypeNames_.read(dict.lookup("heatSource"))), heatSource_(heatSourceTypeNames_.read(dict.lookup("heatSource"))),
q_("q", dict, p.size()) q_("q", dict, p.size())
{ {
@ -106,6 +108,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
) )
: :
fixedGradientFvPatchScalarField(thftpsf), fixedGradientFvPatchScalarField(thftpsf),
temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.KName()),
heatSource_(thftpsf.heatSource_), heatSource_(thftpsf.heatSource_),
q_(thftpsf.q_) q_(thftpsf.q_)
{} {}
@ -119,6 +122,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField
) )
: :
fixedGradientFvPatchScalarField(thftpsf, iF), fixedGradientFvPatchScalarField(thftpsf, iF),
temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.KName()),
heatSource_(thftpsf.heatSource_), heatSource_(thftpsf.heatSource_),
q_(thftpsf.q_) q_(thftpsf.q_)
{} {}
@ -161,27 +165,19 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
return; return;
} }
const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalarField alphaEffp = rasModel.alphaEff(patchI);
const scalarField& Tp = *this; const scalarField& Tp = *this;
const scalarField Cpp = rasModel.thermo().Cp(Tp, patchI);
switch (heatSource_) switch (heatSource_)
{ {
case hsPower: case hsPower:
{ {
const scalar Ap = gSum(patch().magSf()); const scalar Ap = gSum(patch().magSf());
gradient() = q_/(Ap*Cpp*alphaEffp); gradient() = q_/(Ap*K(Tp));
break; break;
} }
case hsFlux: case hsFlux:
{ {
gradient() = q_/(Cpp*alphaEffp); gradient() = q_/K(Tp);
break; break;
} }
default: default:
@ -208,12 +204,11 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::write
Ostream& os Ostream& os
) const ) const
{ {
fvPatchScalarField::write(os); fixedGradientFvPatchScalarField::write(os);
os.writeKeyword("heatSource") << heatSourceTypeNames_[heatSource_] os.writeKeyword("heatSource") << heatSourceTypeNames_[heatSource_]
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
temperatureCoupledBase::write(os);
q_.writeEntry("q", os); q_.writeEntry("q", os);
gradient().writeEntry("gradient", os);
writeEntry("value", os);
} }

View File

@ -36,6 +36,7 @@ Description
type compressible::turbulentHeatFluxTemperature; type compressible::turbulentHeatFluxTemperature;
heatSource flux; // power [W]; flux [W/m2] heatSource flux; // power [W]; flux [W/m2]
q uniform 10; // heat power or flux q uniform 10; // heat power or flux
K basicThermo; // calculate K by alphaEff*thermo.Cp
value uniform 300; // initial temperature value value uniform 300; // initial temperature value
} }
@ -48,9 +49,8 @@ SourceFiles
#ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H #ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H
#define turbulentHeatFluxTemperatureFvPatchScalarFields_H #define turbulentHeatFluxTemperatureFvPatchScalarFields_H
#include "fvPatchFields.H"
#include "fixedGradientFvPatchFields.H" #include "fixedGradientFvPatchFields.H"
#include "NamedEnum.H" #include "temperatureCoupledBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,7 +65,8 @@ namespace compressible
class turbulentHeatFluxTemperatureFvPatchScalarField class turbulentHeatFluxTemperatureFvPatchScalarField
: :
public fixedGradientFvPatchScalarField public fixedGradientFvPatchScalarField,
public temperatureCoupledBase
{ {
public: public:

View File

@ -29,8 +29,6 @@ License
#include "volFields.H" #include "volFields.H"
#include "directMappedPatchBase.H" #include "directMappedPatchBase.H"
#include "regionProperties.H" #include "regionProperties.H"
#include "basicThermo.H"
#include "RASModel.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -111,8 +109,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
neighbourFieldName_("undefined-neighbourFieldName"), temperatureCoupledBase(patch(), "undefined", "undefined-K"),
KName_("undefined-K") neighbourFieldName_("undefined-neighbourFieldName")
{} {}
@ -126,8 +124,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(ptf, p, iF, mapper), fixedValueFvPatchScalarField(ptf, p, iF, mapper),
neighbourFieldName_(ptf.neighbourFieldName_), temperatureCoupledBase(patch(), ptf.KMethod(), ptf.KName()),
KName_(ptf.KName_) neighbourFieldName_(ptf.neighbourFieldName_)
{} {}
@ -140,8 +138,8 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
neighbourFieldName_(dict.lookup("neighbourFieldName")), temperatureCoupledBase(patch(), dict),
KName_(dict.lookup("K")) neighbourFieldName_(dict.lookup("neighbourFieldName"))
{ {
if (!isA<directMappedPatchBase>(this->patch().patch())) if (!isA<directMappedPatchBase>(this->patch().patch()))
{ {
@ -172,61 +170,13 @@ turbulentTemperatureCoupledBaffleFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(wtcsf, iF), fixedValueFvPatchScalarField(wtcsf, iF),
neighbourFieldName_(wtcsf.neighbourFieldName_), temperatureCoupledBase(patch(), wtcsf.KMethod(), wtcsf.KName()),
KName_(wtcsf.KName_) neighbourFieldName_(wtcsf.neighbourFieldName_)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const
{
const fvMesh& mesh = patch().boundaryMesh().mesh();
if (KName_ == "none")
{
const compressible::RASModel& model =
db().lookupObject<compressible::RASModel>("RASProperties");
tmp<volScalarField> talpha = model.alphaEff();
const basicThermo& thermo =
db().lookupObject<basicThermo>("thermophysicalProperties");
return
talpha().boundaryField()[patch().index()]
*thermo.Cp()().boundaryField()[patch().index()];
}
else if (mesh.objectRegistry::foundObject<volScalarField>(KName_))
{
return patch().lookupPatchField<volScalarField, scalar>(KName_);
}
else if (mesh.objectRegistry::foundObject<volSymmTensorField>(KName_))
{
const symmTensorField& KWall =
patch().lookupPatchField<volSymmTensorField, scalar>(KName_);
vectorField n = patch().nf();
return n & KWall & n;
}
else
{
FatalErrorIn
(
"turbulentTemperatureCoupledBaffleFvPatchScalarField::K() const"
) << "Did not find field " << KName_
<< " on mesh " << mesh.name() << " patch " << patch().name()
<< endl
<< "Please set 'K' to 'none', a valid volScalarField"
<< " or a valid volSymmTensorField." << exit(FatalError);
return scalarField(0);
}
}
void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs() void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())
@ -283,7 +233,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
); );
// Swap to obtain full local values of neighbour K*delta // Swap to obtain full local values of neighbour K*delta
scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs(); scalarField nbrKDelta = nbrField.K(nbrField)*nbrPatch.deltaCoeffs();
mapDistribute::distribute mapDistribute::distribute
( (
Pstream::defaultCommsType, Pstream::defaultCommsType,
@ -294,7 +244,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
nbrKDelta nbrKDelta
); );
tmp<scalarField> myKDelta = K()*patch().deltaCoeffs(); tmp<scalarField> myKDelta = K(*this)*patch().deltaCoeffs();
// Calculate common wall temperature. Reuse *this to store common value. // Calculate common wall temperature. Reuse *this to store common value.
scalarField Twall scalarField Twall
@ -326,7 +276,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
// (*this-intFld()) // (*this-intFld())
// * patch().deltaCoeffs(); // * patch().deltaCoeffs();
scalar Q = gSum(K()*patch().magSf()*snGrad()); scalar Q = gSum(K(*this)*patch().magSf()*snGrad());
Info<< patch().boundaryMesh().mesh().name() << ':' Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':' << patch().name() << ':'
@ -354,7 +304,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::write
fixedValueFvPatchScalarField::write(os); fixedValueFvPatchScalarField::write(os);
os.writeKeyword("neighbourFieldName")<< neighbourFieldName_ os.writeKeyword("neighbourFieldName")<< neighbourFieldName_
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; temperatureCoupledBase::write(os);
} }

View File

@ -37,14 +37,14 @@ Description
{ {
type compressible::turbulentTemperatureCoupledBaffle; type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T; neighbourFieldName T;
K K; // or none K lookup;
KName K; // or none
value uniform 300; value uniform 300;
} }
Needs to be on underlying directMapped(Wall)FvPatch. Needs to be on underlying directMapped(Wall)FvPatch.
Note: if K is "none" looks up RASModel and basicThermo, otherwise expects Note: see temperatureCoupledBase on ways to specify K.
the solver to calculate a 'K' field.
Note: runs in parallel with arbitrary decomposition. Uses directMapped Note: runs in parallel with arbitrary decomposition. Uses directMapped
functionality to calculate exchange. functionality to calculate exchange.
@ -64,6 +64,7 @@ SourceFiles
#define turbulentTemperatureCoupledBaffleFvPatchScalarField_H #define turbulentTemperatureCoupledBaffleFvPatchScalarField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "temperatureCoupledBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,16 +77,14 @@ namespace Foam
class turbulentTemperatureCoupledBaffleFvPatchScalarField class turbulentTemperatureCoupledBaffleFvPatchScalarField
: :
public fixedValueFvPatchScalarField public fixedValueFvPatchScalarField,
public temperatureCoupledBase
{ {
// Private data // Private data
//- Name of field on the neighbour region //- Name of field on the neighbour region
const word neighbourFieldName_; const word neighbourFieldName_;
//- Name of thermal conductivity field
const word KName_;
// Private Member Functions // Private Member Functions
@ -161,9 +160,6 @@ public:
// Member functions // Member functions
//- Get corresponding K field
tmp<scalarField> K() const;
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -28,9 +28,6 @@ License
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "directMappedPatchBase.H" #include "directMappedPatchBase.H"
#include "regionProperties.H"
#include "basicThermo.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,8 +49,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
) )
: :
mixedFvPatchScalarField(p, iF), mixedFvPatchScalarField(p, iF),
neighbourFieldName_("undefined-neighbourFieldName"), temperatureCoupledBase(patch(), "undefined", "undefined-K"),
KName_("undefined-K") neighbourFieldName_("undefined-neighbourFieldName")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
this->refGrad() = 0.0; this->refGrad() = 0.0;
@ -71,8 +68,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
) )
: :
mixedFvPatchScalarField(ptf, p, iF, mapper), mixedFvPatchScalarField(ptf, p, iF, mapper),
neighbourFieldName_(ptf.neighbourFieldName_), temperatureCoupledBase(patch(), ptf.KMethod(), ptf.KName()),
KName_(ptf.KName_) neighbourFieldName_(ptf.neighbourFieldName_)
{} {}
@ -85,8 +82,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
) )
: :
mixedFvPatchScalarField(p, iF), mixedFvPatchScalarField(p, iF),
neighbourFieldName_(dict.lookup("neighbourFieldName")), temperatureCoupledBase(patch(), dict),
KName_(dict.lookup("K")) neighbourFieldName_(dict.lookup("neighbourFieldName"))
{ {
if (!isA<directMappedPatchBase>(this->patch().patch())) if (!isA<directMappedPatchBase>(this->patch().patch()))
{ {
@ -134,60 +131,13 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
) )
: :
mixedFvPatchScalarField(wtcsf, iF), mixedFvPatchScalarField(wtcsf, iF),
neighbourFieldName_(wtcsf.neighbourFieldName_), temperatureCoupledBase(patch(), wtcsf.KMethod(), wtcsf.KName()),
KName_(wtcsf.KName_) neighbourFieldName_(wtcsf.neighbourFieldName_)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<scalarField>
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::K() const
{
const fvMesh& mesh = patch().boundaryMesh().mesh();
if (KName_ == "none")
{
const compressible::RASModel& model =
db().lookupObject<compressible::RASModel>("RASProperties");
const basicThermo& thermo =
db().lookupObject<basicThermo>("thermophysicalProperties");
return
model.alphaEff()().boundaryField()[patch().index()]
*thermo.Cp()().boundaryField()[patch().index()];
}
else if (mesh.objectRegistry::foundObject<volScalarField>(KName_))
{
return patch().lookupPatchField<volScalarField, scalar>(KName_);
}
else if (mesh.objectRegistry::foundObject<volSymmTensorField>(KName_))
{
const symmTensorField& KWall =
patch().lookupPatchField<volSymmTensorField, scalar>(KName_);
vectorField n = patch().nf();
return n & KWall & n;
}
else
{
FatalErrorIn
(
"turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::K()"
" const"
) << "Did not find field " << KName_
<< " on mesh " << mesh.name() << " patch " << patch().name()
<< endl
<< "Please set 'K' to 'none', a valid volScalarField"
<< " or a valid volSymmTensorField." << exit(FatalError);
return scalarField(0);
}
}
void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())
@ -240,7 +190,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
); );
// Swap to obtain full local values of neighbour K*delta // Swap to obtain full local values of neighbour K*delta
scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs(); scalarField nbrKDelta = nbrField.K(nbrField)*nbrPatch.deltaCoeffs();
mapDistribute::distribute mapDistribute::distribute
( (
Pstream::defaultCommsType, Pstream::defaultCommsType,
@ -251,7 +201,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
nbrKDelta nbrKDelta
); );
tmp<scalarField> myKDelta = K()*patch().deltaCoeffs(); tmp<scalarField> myKDelta = K(*this)*patch().deltaCoeffs();
// Both sides agree on // Both sides agree on
@ -281,7 +231,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
if (debug) if (debug)
{ {
scalar Q = gSum(K()*patch().magSf()*snGrad()); scalar Q = gSum(K(*this)*patch().magSf()*snGrad());
Info<< patch().boundaryMesh().mesh().name() << ':' Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':' << patch().name() << ':'
@ -307,7 +257,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
mixedFvPatchScalarField::write(os); mixedFvPatchScalarField::write(os);
os.writeKeyword("neighbourFieldName")<< neighbourFieldName_ os.writeKeyword("neighbourFieldName")<< neighbourFieldName_
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; temperatureCoupledBase::write(os);
} }

View File

@ -38,14 +38,18 @@ Description
{ {
type compressible::turbulentTemperatureCoupledBaffleMixed; type compressible::turbulentTemperatureCoupledBaffleMixed;
neighbourFieldName T; neighbourFieldName T;
K K; // or none K lookup;
KName K;
value uniform 300; value uniform 300;
} }
Needs to be on underlying directMapped(Wall)FvPatch. Needs to be on underlying directMapped(Wall)FvPatch.
Note: if K is "none" looks up RASModel and basicThermo, otherwise expects Note: K : heat conduction at patch. Gets supplied how to lookup/calculate K:
the solver to calculate a 'K' field. - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
- 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K
- 'solidThermo' : use basicSolidThermo K()
- 'directionalSolidThermo' directionalK()
Note: runs in parallel with arbitrary decomposition. Uses directMapped Note: runs in parallel with arbitrary decomposition. Uses directMapped
functionality to calculate exchange. functionality to calculate exchange.
@ -64,9 +68,8 @@ SourceFiles
#ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
#define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
//#include "fvPatchFields.H"
#include "mixedFvPatchFields.H" #include "mixedFvPatchFields.H"
//#include "fvPatch.H" #include "temperatureCoupledBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -81,16 +84,14 @@ namespace compressible
class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
: :
public mixedFvPatchScalarField public mixedFvPatchScalarField,
public temperatureCoupledBase
{ {
// Private data // Private data
//- Name of field on the neighbour region //- Name of field on the neighbour region
const word neighbourFieldName_; const word neighbourFieldName_;
//- Name of thermal conductivity field
const word KName_;
public: public:
@ -164,9 +165,6 @@ public:
// Member functions // Member functions
//- Get corresponding K field
tmp<scalarField> K() const;
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -51,10 +51,11 @@ laminar::laminar
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
turbulenceModel(rho, U, phi, thermophysicalModel) turbulenceModel(rho, U, phi, thermophysicalModel, turbulenceModelName)
{} {}
@ -65,10 +66,14 @@ autoPtr<laminar> laminar::New
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
{ {
return autoPtr<laminar>(new laminar(rho, U, phi, thermophysicalModel)); return autoPtr<laminar>
(
new laminar(rho, U, phi, thermophysicalModel, turbulenceModelName)
);
} }

View File

@ -66,7 +66,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );
@ -78,7 +79,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -47,9 +47,21 @@ turbulenceModel::turbulenceModel
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
: :
regIOobject
(
IOobject
(
turbulenceModelName,
U.time().constant(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
)
),
runTime_(U.time()), runTime_(U.time()),
mesh_(U.mesh()), mesh_(U.mesh()),
@ -67,7 +79,8 @@ autoPtr<turbulenceModel> turbulenceModel::New
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName
) )
{ {
// get model name, but do not register the dictionary // get model name, but do not register the dictionary
@ -99,7 +112,7 @@ autoPtr<turbulenceModel> turbulenceModel::New
( (
"turbulenceModel::New(const volScalarField&, " "turbulenceModel::New(const volScalarField&, "
"const volVectorField&, const surfaceScalarField&, " "const volVectorField&, const surfaceScalarField&, "
"basicThermo&)" "basicThermo&, const word&)"
) << "Unknown turbulenceModel type " ) << "Unknown turbulenceModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid turbulenceModel types:" << endl << "Valid turbulenceModel types:" << endl
@ -109,7 +122,7 @@ autoPtr<turbulenceModel> turbulenceModel::New
return autoPtr<turbulenceModel> return autoPtr<turbulenceModel>
( (
cstrIter()(rho, U, phi, thermophysicalModel) cstrIter()(rho, U, phi, thermophysicalModel, turbulenceModelName)
); );
} }

View File

@ -68,6 +68,8 @@ namespace compressible
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class turbulenceModel class turbulenceModel
:
public regIOobject
{ {
protected: protected:
@ -112,9 +114,10 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
), ),
(rho, U, phi, thermoPhysicalModel) (rho, U, phi, thermoPhysicalModel, turbulenceModelName)
); );
@ -126,7 +129,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = typeName
); );
@ -138,7 +142,8 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName = typeName
); );
@ -224,6 +229,13 @@ public:
//- Read LESProperties or RASProperties dictionary //- Read LESProperties or RASProperties dictionary
virtual bool read() = 0; virtual bool read() = 0;
//- Default dummy write function
virtual bool writeData(Ostream&) const
{
return true;
}
}; };

View File

@ -55,10 +55,11 @@ DeardorffDiffStress::DeardorffDiffStress
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenSGSStress(U, phi, transport), GenSGSStress(U, phi, transport),
ck_ ck_

View File

@ -100,7 +100,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -40,10 +40,11 @@ GenEddyVisc::GenEddyVisc
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(word("GenEddyVisc"), U, phi, transport), LESModel(word("GenEddyVisc"), U, phi, transport, turbulenceModelName),
ce_ ce_
( (

View File

@ -81,7 +81,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -40,10 +40,11 @@ GenSGSStress::GenSGSStress
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(word("GenSGSStress"), U, phi, transport), LESModel(word("GenSGSStress"), U, phi, transport, turbulenceModelName),
ce_ ce_
( (

View File

@ -85,7 +85,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -57,10 +57,11 @@ LESModel::LESModel
const word& type, const word& type,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
turbulenceModel(U, phi, transport), turbulenceModel(U, phi, transport, turbulenceModelName),
IOdictionary IOdictionary
( (
@ -94,7 +95,8 @@ autoPtr<LESModel> LESModel::New
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
{ {
// get model name, but do not register the dictionary // get model name, but do not register the dictionary
@ -128,7 +130,8 @@ autoPtr<LESModel> LESModel::New
"(" "("
"const volVectorField&, " "const volVectorField&, "
"const surfaceScalarField& ," "const surfaceScalarField& ,"
"transportModel&" "transportModel&, "
"const word&"
")" ")"
) << "Unknown LESModel type " ) << "Unknown LESModel type "
<< modelType << nl << nl << modelType << nl << nl
@ -137,7 +140,10 @@ autoPtr<LESModel> LESModel::New
<< exit(FatalError); << exit(FatalError);
} }
return autoPtr<LESModel>(cstrIter()(U, phi, transport)); return autoPtr<LESModel>
(
cstrIter()(U, phi, transport, turbulenceModelName)
);
} }
@ -158,7 +164,22 @@ void LESModel::correct()
bool LESModel::read() bool LESModel::read()
{ {
if (regIOobject::read()) //if (regIOobject::read())
// Bit of trickery : we are both IOdictionary ('RASProperties') and
// an regIOobject from the turbulenceModel level. Problem is to distinguish
// between the two - we only want to reread the IOdictionary.
bool ok = IOdictionary::readData
(
IOdictionary::readStream
(
IOdictionary::type()
)
);
IOdictionary::close();
if (ok)
{ {
if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs"))
{ {

View File

@ -120,9 +120,10 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
), ),
(U, phi, transport) (U, phi, transport, turbulenceModelName)
); );
@ -134,7 +135,8 @@ public:
const word& type, const word& type,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );
@ -145,7 +147,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -55,10 +55,11 @@ LRRDiffStress::LRRDiffStress
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenSGSStress(U, phi, transport), GenSGSStress(U, phi, transport),
ck_ ck_

View File

@ -99,7 +99,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -55,10 +55,11 @@ Smagorinsky::Smagorinsky
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
ck_ ck_

View File

@ -96,7 +96,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -46,10 +46,11 @@ Smagorinsky2::Smagorinsky2
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
Smagorinsky(U, phi, transport), Smagorinsky(U, phi, transport),
cD2_ cD2_

View File

@ -93,7 +93,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -149,10 +149,11 @@ SpalartAllmaras::SpalartAllmaras
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport, transportModel& transport,
const word& turbulenceModelName,
const word& modelName const word& modelName
) )
: :
LESModel(modelName, U, phi, transport), LESModel(modelName, U, phi, transport, turbulenceModelName),
sigmaNut_ sigmaNut_
( (

View File

@ -138,6 +138,7 @@ public:
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport, transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName const word& modelName = typeName
); );

View File

@ -93,10 +93,11 @@ SpalartAllmarasDDES::SpalartAllmarasDDES
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
SpalartAllmaras(U, phi, transport, typeName) SpalartAllmaras(U, phi, transport, turbulenceModelName, typeName)
{} {}

View File

@ -95,7 +95,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -143,10 +143,11 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
SpalartAllmaras(U, phi, transport, typeName), SpalartAllmaras(U, phi, transport, turbulenceModelName, typeName),
fwStar_ fwStar_
( (

View File

@ -104,7 +104,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -46,10 +46,11 @@ dynMixedSmagorinsky::dynMixedSmagorinsky
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
scaleSimilarity(U, phi, transport), scaleSimilarity(U, phi, transport),
dynSmagorinsky(U, phi, transport) dynSmagorinsky(U, phi, transport)
{ {

View File

@ -99,7 +99,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -104,10 +104,11 @@ dynOneEqEddy::dynOneEqEddy
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
k_ k_

View File

@ -110,7 +110,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -95,10 +95,11 @@ dynSmagorinsky::dynSmagorinsky
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
k_ k_

View File

@ -119,7 +119,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -121,10 +121,11 @@ kOmegaSSTSAS::kOmegaSSTSAS
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport, transportModel& transport,
const word& turbulenceModelName,
const word& modelName const word& modelName
) )
: :
LESModel(modelName, U, phi, transport), LESModel(modelName, U, phi, transport, turbulenceModelName),
alphaK1_ alphaK1_
( (

View File

@ -183,6 +183,7 @@ public:
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport, transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName const word& modelName = typeName
); );

View File

@ -47,10 +47,11 @@ laminar::laminar
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport) LESModel(typeName, U, phi, transport, turbulenceModelName)
{} {}

View File

@ -76,7 +76,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -95,10 +95,11 @@ locDynOneEqEddy::locDynOneEqEddy
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
k_ k_

View File

@ -132,7 +132,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -46,10 +46,11 @@ mixedSmagorinsky::mixedSmagorinsky
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
scaleSimilarity(U, phi, transport), scaleSimilarity(U, phi, transport),
Smagorinsky(U, phi, transport) Smagorinsky(U, phi, transport)
{ {

View File

@ -99,7 +99,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -56,10 +56,11 @@ oneEqEddy::oneEqEddy
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
k_ k_

View File

@ -102,7 +102,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -44,10 +44,11 @@ scaleSimilarity::scaleSimilarity
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filterPtr_(LESfilter::New(U.mesh(), coeffDict())),
filter_(filterPtr_()) filter_(filterPtr_())
{ {

View File

@ -84,7 +84,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -65,10 +65,11 @@ spectEddyVisc::spectEddyVisc
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
LESModel(typeName, U, phi, transport), LESModel(typeName, U, phi, transport, turbulenceModelName),
GenEddyVisc(U, phi, transport), GenEddyVisc(U, phi, transport),
cB_ cB_

View File

@ -104,7 +104,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

View File

@ -49,10 +49,11 @@ LRR::LRR
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName
) )
: :
RASModel(typeName, U, phi, transport), RASModel(typeName, U, phi, transport, turbulenceModelName),
Cmu_ Cmu_
( (

View File

@ -109,7 +109,8 @@ public:
( (
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
transportModel& transport transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName
); );

Some files were not shown because too many files have changed in this diff Show More