31 template<
class BasicMomentumTransportModel>
36 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
43 template<
class BasicMomentumTransportModel>
55 BasicMomentumTransportModel
66 LESDict_(this->subOrEmptyDict(
"LES")),
67 turbulence_(LESDict_.lookup(
"turbulence")),
68 printCoeffs_(LESDict_.lookupOrDefault<
Switch>(
"printCoeffs", false)),
69 coeffDict_(LESDict_.optionalSubDict(
type +
"Coeffs")),
95 coeffDict_.
found(
"viscosityModel")
96 ? laminarModels::generalisedNewtonianViscosityModel::
New
102 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
104 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
117 this->groupName(
"delta"),
125 this->mesh_.deltaCoeffs();
131 template<
class BasicMomentumTransportModel>
152 const word modelType =
155 {
"model",
"LESModel"}
158 Info<<
"Selecting LES turbulence model " << modelType <<
endl;
160 typename dictionaryConstructorTable::iterator cstrIter =
161 dictionaryConstructorTablePtr_->find(modelType);
163 if (cstrIter == dictionaryConstructorTablePtr_->end())
166 <<
"Unknown LESModel type "
167 << modelType <<
nl <<
nl
168 <<
"Valid LESModel types:" <<
endl
169 << dictionaryConstructorTablePtr_->sortedToc()
182 template<
class BasicMomentumTransportModel>
187 LESDict_ <<= this->subDict(
"LES");
188 LESDict_.lookup(
"turbulence") >> turbulence_;
190 coeffDict_ <<= LESDict_.optionalSubDict(
type() +
"Coeffs");
192 delta_().read(LESDict_);
194 kMin_.readIfPresent(LESDict_);
195 nutMaxCoeff_.readIfPresent(LESDict_);
206 template<
class BasicMomentumTransportModel>
209 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
virtual void printCoeffs(const word &type)
Print model coefficients.
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.
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...
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.
Generic dimensioned Type class.
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, const SuType &Su)
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)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
const dimensionSet dimVelocity
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.