31 template<
class BasicMomentumTransportModel>
36 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
43 template<
class BasicMomentumTransportModel>
52 const viscosity& viscosity
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")),
106 coeffDict_.found(
"viscosityModel")
113 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
115 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
136 this->mesh_.deltaCoeffs();
142 template<
class BasicMomentumTransportModel>
151 const viscosity& viscosity
156 momentumTransportModel::readModelDict
163 const word modelType =
166 {
"model",
"LESModel"}
169 Info<<
"Selecting LES turbulence model " << modelType <<
endl;
171 typename dictionaryConstructorTable::iterator cstrIter =
172 dictionaryConstructorTablePtr_->find(modelType);
174 if (cstrIter == dictionaryConstructorTablePtr_->end())
177 <<
"Unknown LESModel type " 178 << modelType <<
nl <<
nl 179 <<
"Valid LESModel types:" << endl
180 << dictionaryConstructorTablePtr_->sortedToc()
193 template<
class BasicMomentumTransportModel>
198 LESDict_ <<= this->subDict(
"LES");
199 LESDict_.lookup(
"turbulence") >> turbulence_;
201 coeffDict_ <<= LESDict_.optionalSubDict(
type() +
"Coeffs");
203 delta_().read(LESDict_);
205 kMin_.readIfPresent(LESDict_);
216 template<
class BasicMomentumTransportModel>
219 viscosityModel_->correct();
const char *const group
Group name for atomic constants.
static word group(const word &name)
Return group (extension part of name)
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)
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/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()
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Abstract base class for LES deltas.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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.
const dimensionSet dimless
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.
const dimensionSet dimTime
A class for handling words, derived from string.
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, simple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Reading field pa\"<< endl;volScalarField pa(IOobject("pa", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Ua\"<< endl;volVectorField Ua(IOobject("Ua", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);# 65 "/home/ubuntu/OpenFOAM-10/applications/solvers/incompressible/adjointShapeOptimisationFoam/createFields.H" 2label paRefCell=0;scalar paRefValue=0.0;setRefCell(pa, simple.dict(), paRefCell, paRefValue);mesh.schemes().setFluxRequired(pa.name());autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
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.
const dimensionSet dimVelocity
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
BasicMomentumTransportModel::rhoField rhoField
virtual bool read()
Read model coefficients if they have changed.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
BasicMomentumTransportModel::alphaField alphaField
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const objectRegistry & db() const
Return the local objectRegistry.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.