31 template<
class BasicMomentumTransportModel>
43 BasicMomentumTransportModel
54 turbulence_(RASDict().template lookupOrDefault<
Switch>(
"turbulence", true)),
56 nutMaxCoeff_(
"nutMaxCoeff",
dimless, RASDict(), 1e5),
60 coeffDict().
found(
"viscosityModel")
61 ? laminarModels::generalisedNewtonianViscosityModel::
New
67 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
69 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
80 this->mesh_.deltaCoeffs();
86 template<
class BasicMomentumTransportModel>
107 const word modelType =
110 {
"model",
"RASModel"}
114 <<
"Selecting RAS turbulence model " << modelType <<
endl;
116 typename dictionaryConstructorTable::iterator cstrIter =
117 dictionaryConstructorTablePtr_->find(modelType);
119 if (cstrIter == dictionaryConstructorTablePtr_->end())
122 <<
"Unknown RASModel type "
123 << modelType <<
nl <<
nl
124 <<
"Valid RASModel types:" <<
endl
125 << dictionaryConstructorTablePtr_->sortedToc()
144 template<
class BasicMomentumTransportModel>
148 return this->subDict(
"RAS");
152 template<
class BasicMomentumTransportModel>
160 template<
class BasicMomentumTransportModel>
165 turbulence_.readIfPresent(
"turbulence", RASDict());
166 kMin_.readIfPresent(RASDict());
167 nutMaxCoeff_.readIfPresent(RASDict());
178 template<
class BasicMomentumTransportModel>
181 viscosityModel_->correct();
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static word group(const word &name)
Return group (extension part of name)
BasicMomentumTransportModel::alphaField alphaField
static autoPtr< RASModel > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected RAS model.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
RASModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
const dictionary & RASDict() const
Const access to the RAS dictionary.
virtual bool read()
Read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
static typeIOobject< IOdictionary > readModelDict(const objectRegistry &obr, const word &group, bool registerObject=false)
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimVelocity
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.