31 template<
class BasicMomentumTransportModel>
36 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
43 template<
class BasicMomentumTransportModel>
52 const viscosity& viscosity
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")),
106 coeffDict_.found(
"viscosityModel")
113 :
autoPtr<laminarModels::generalisedNewtonianViscosityModel>
115 new laminarModels::generalisedNewtonianViscosityModels::Newtonian
126 this->mesh_.deltaCoeffs();
132 template<
class BasicMomentumTransportModel>
141 const viscosity& viscosity
146 momentumTransportModel::readModelDict
153 const word modelType =
156 {
"model",
"RASModel"}
159 Info<<
"Selecting RAS turbulence model " << modelType <<
endl;
161 typename dictionaryConstructorTable::iterator cstrIter =
162 dictionaryConstructorTablePtr_->find(modelType);
164 if (cstrIter == dictionaryConstructorTablePtr_->end())
167 <<
"Unknown RASModel type " 168 << modelType <<
nl <<
nl 169 <<
"Valid RASModel types:" << endl
170 << dictionaryConstructorTablePtr_->sortedToc()
183 template<
class BasicMomentumTransportModel>
188 RASDict_ <<= this->subDict(
"RAS");
189 RASDict_.lookup(
"turbulence") >> turbulence_;
191 coeffDict_ <<= RASDict_.optionalSubDict(
type() +
"Coeffs");
193 kMin_.readIfPresent(RASDict_);
194 epsilonMin_.readIfPresent(RASDict_);
195 omegaMin_.readIfPresent(RASDict_);
206 template<
class BasicMomentumTransportModel>
209 viscosityModel_->correct();
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)
#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)
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.
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.
virtual bool read()
Read model coefficients if they have changed.
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 representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
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.
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))
virtual void printCoeffs(const word &type)
Print model coefficients.
const dimensionSet dimVelocity
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.
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.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.