30 template<
class BasicTurbulenceModel>
35 Info<< type <<
"Coeffs" << coeffDict_ <<
endl;
42 template<
class BasicTurbulenceModel>
52 const word& propertiesName
67 LESDict_(this->subOrEmptyDict(
"LES")),
68 turbulence_(LESDict_.lookup(
"turbulence")),
69 printCoeffs_(LESDict_.lookupOrDefault<
Switch>(
"printCoeffs",
false)),
70 coeffDict_(LESDict_.subOrEmptyDict(type +
"Coeffs")),
87 IOobject::groupName(
"delta", U.
group()),
95 this->mesh_.deltaCoeffs();
101 template<
class BasicTurbulenceModel>
111 const word& propertiesName
122 IOobject::groupName(propertiesName, U.
group()),
125 IOobject::MUST_READ_IF_MODIFIED,
132 Info<<
"Selecting LES turbulence model " << modelType <<
endl;
134 typename dictionaryConstructorTable::iterator cstrIter =
135 dictionaryConstructorTablePtr_->find(modelType);
137 if (cstrIter == dictionaryConstructorTablePtr_->end())
143 "const volScalarField&, " 144 "const volVectorField&, " 145 "const surfaceScalarField&, " 149 ) <<
"Unknown LESModel type " 150 << modelType <<
nl <<
nl 151 <<
"Valid LESModel types:" << endl
152 << dictionaryConstructorTablePtr_->sortedToc()
158 cstrIter()(
alpha,
rho,
U, alphaRhoPhi,
phi, transport, propertiesName)
165 template<
class BasicTurbulenceModel>
170 LESDict_ <<= this->subDict(
"LES");
171 LESDict_.lookup(
"turbulence") >> turbulence_;
175 coeffDict_ <<= *dictPtr;
178 delta_().read(LESDict_);
180 kMin_.readIfPresent(LESDict_);
191 template<
class BasicTurbulenceModel>
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil)-psi)*pSat, rhoMin);#1"/home/dm2/henry/OpenFOAM/OpenFOAM-3.0.x/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H"1{alphav=max(min((rho-rholSat)/(rhovSat-rholSat), scalar(1)), scalar(0));alphal=1.0-alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
static autoPtr< LESModel > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected LES model.
A class for handling words, derived from string.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Templated abstract base class for LES SGS models.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
virtual void printCoeffs(const word &type)
Print model coefficients.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual bool read()
Read model coefficients if they have changed.
const dictionary * subDictPtr(const word &) const
Find and return a sub-dictionary pointer if present.
BasicTurbulenceModel::rhoField rhoField
const word & constant() const
Return constant name.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Generic dimensioned Type class.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
BasicTurbulenceModel::transportModel transportModel
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
BasicTurbulenceModel::alphaField alphaField
word group() const
Return group (extension part of name)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const Time & time() const
Return time.
bool read(const char *, int32_t &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const objectRegistry & db() const
Return the local objectRegistry.
const dimensionSet dimVelocity
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...