31 template<
class BasicMomentumTransportModel>
43 BasicMomentumTransportModel
54 turbulence_(LESDict().template lookupOrDefault<
Switch>(
"turbulence", true)),
56 nutMaxCoeff_(
"nutMaxCoeff",
dimless, LESDict(), 1e5),
60 coeffDict().
found(
"viscosityModel")
61 ? laminarModels::generalisedNewtonianViscosityModel::
New
67 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
69 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
82 this->groupName(
"delta"),
90 this->mesh_.deltaCoeffs();
96 template<
class BasicMomentumTransportModel>
117 const word modelType =
120 {
"model",
"LESModel"}
124 <<
"Selecting LES turbulence model " << modelType <<
endl;
126 typename dictionaryConstructorTable::iterator cstrIter =
127 dictionaryConstructorTablePtr_->find(modelType);
129 if (cstrIter == dictionaryConstructorTablePtr_->end())
132 <<
"Unknown LESModel type "
133 << modelType <<
nl <<
nl
134 <<
"Valid LESModel types:" <<
endl
135 << dictionaryConstructorTablePtr_->sortedToc()
154 template<
class BasicMomentumTransportModel>
158 return this->subDict(
"LES");
162 template<
class BasicMomentumTransportModel>
170 template<
class BasicMomentumTransportModel>
175 turbulence_.readIfPresent(
"turbulence", LESDict());
176 delta_().read(LESDict());
178 kMin_.readIfPresent(LESDict());
179 nutMaxCoeff_.readIfPresent(LESDict());
190 template<
class BasicMomentumTransportModel>
193 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
const dictionary & LESDict() const
Const access to the LES dictionary.
LESModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
static autoPtr< LESModel > 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 LES model.
virtual bool read()
Read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
Abstract base class for LES deltas.
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.