31 template<
class BasicMomentumTransportModel>
36 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
43 template<
class BasicMomentumTransportModel>
55 BasicMomentumTransportModel
66 RASDict_(this->subOrEmptyDict(
"RAS")),
67 turbulence_(RASDict_.lookup(
"turbulence")),
68 printCoeffs_(RASDict_.lookupOrDefault<
Switch>(
"printCoeffs", false)),
69 coeffDict_(RASDict_.optionalSubDict(
type +
"Coeffs")),
95 coeffDict_.
found(
"viscosityModel")
96 ? laminarModels::generalisedNewtonianViscosityModel::
New
102 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
104 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
115 this->mesh_.deltaCoeffs();
121 template<
class BasicMomentumTransportModel>
142 const word modelType =
145 {
"model",
"RASModel"}
148 Info<<
"Selecting RAS turbulence model " << modelType <<
endl;
150 typename dictionaryConstructorTable::iterator cstrIter =
151 dictionaryConstructorTablePtr_->find(modelType);
153 if (cstrIter == dictionaryConstructorTablePtr_->end())
156 <<
"Unknown RASModel type "
157 << modelType <<
nl <<
nl
158 <<
"Valid RASModel types:" <<
endl
159 << dictionaryConstructorTablePtr_->sortedToc()
172 template<
class BasicMomentumTransportModel>
177 RASDict_ <<= this->subDict(
"RAS");
178 RASDict_.lookup(
"turbulence") >> turbulence_;
180 coeffDict_ <<= RASDict_.optionalSubDict(
type() +
"Coeffs");
182 kMin_.readIfPresent(RASDict_);
183 nutMaxCoeff_.readIfPresent(RASDict_);
194 template<
class BasicMomentumTransportModel>
197 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.
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.
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.
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...
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.