30 template<
class BasicMomentumTransportModel>
35 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
42 template<
class BasicMomentumTransportModel>
54 BasicMomentumTransportModel
65 LESDict_(this->subOrEmptyDict(
"LES")),
66 turbulence_(LESDict_.lookup(
"turbulence")),
67 printCoeffs_(LESDict_.lookupOrDefault<
Switch>(
"printCoeffs",
false)),
68 coeffDict_(LESDict_.optionalSubDict(type +
"Coeffs")),
107 IOobject::groupName(
"delta", alphaRhoPhi.
group()),
115 this->mesh_.deltaCoeffs();
121 template<
class BasicMomentumTransportModel>
135 momentumTransportModel::readModelDict
149 Info<<
"Selecting LES turbulence model " << modelType <<
endl;
151 typename dictionaryConstructorTable::iterator cstrIter =
152 dictionaryConstructorTablePtr_->find(modelType);
154 if (cstrIter == dictionaryConstructorTablePtr_->end())
157 <<
"Unknown LESModel type " 158 << modelType <<
nl <<
nl 159 <<
"Valid LESModel types:" << endl
160 << dictionaryConstructorTablePtr_->sortedToc()
173 template<
class BasicMomentumTransportModel>
178 LESDict_ <<= this->subDict(
"LES");
179 LESDict_.lookup(
"turbulence") >> turbulence_;
181 coeffDict_ <<= LESDict_.optionalSubDict(
type() +
"Coeffs");
183 delta_().read(LESDict_);
185 kMin_.readIfPresent(LESDict_);
196 template<
class BasicMomentumTransportModel>
static word group(const word &name)
Return group (extension part of name)
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void printCoeffs(const word &type)
Print model coefficients.
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/any.
Generic dimensioned Type class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
LESModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport)
Construct from components.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-8/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()
BasicMomentumTransportModel::rhoField rhoField
BasicMomentumTransportModel::transportModel transportModel
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual bool read()
Read model coefficients if they have changed.
static autoPtr< LESModel > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport)
Return a reference to the selected LES model.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
BasicMomentumTransportModel::alphaField alphaField
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
const objectRegistry & db() const
Return the local objectRegistry.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dimensionSet dimVelocity