31 template<
class BasicMomentumTransportModel>
39 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
46 template<
class BasicMomentumTransportModel>
58 BasicMomentumTransportModel
69 laminarDict_(this->subOrEmptyDict(
"laminar")),
70 printCoeffs_(laminarDict_.lookupOrDefault<
Switch>(
"printCoeffs",
false)),
71 coeffDict_(laminarDict_.optionalSubDict(type +
"Coeffs"))
75 this->mesh_.deltaCoeffs();
81 template<
class BasicMomentumTransportModel>
95 momentumTransportModel::readModelDict
102 if (modelDict.
found(
"laminar"))
111 Info<<
"Selecting laminar stress model " << modelType <<
endl;
113 typename dictionaryConstructorTable::iterator cstrIter =
114 dictionaryConstructorTablePtr_->find(modelType);
116 if (cstrIter == dictionaryConstructorTablePtr_->end())
119 <<
"Unknown laminarModel type " 120 << modelType <<
nl <<
nl 121 <<
"Valid laminarModel types:" << endl
122 << dictionaryConstructorTablePtr_->sortedToc()
141 Info<<
"Selecting laminar stress model " 163 template<
class BasicMomentumTransportModel>
168 laminarDict_ <<= this->subDict(
"laminar");
170 coeffDict_ <<= laminarDict_.optionalSubDict(
type() +
"Coeffs");
181 template<
class BasicMomentumTransportModel>
187 IOobject::groupName(
"nut", this->alphaRhoPhi_.group()),
194 template<
class BasicMomentumTransportModel>
208 template<
class BasicMomentumTransportModel>
214 IOobject::groupName(
"nuEff", this->alphaRhoPhi_.group()),
220 template<
class BasicMomentumTransportModel>
227 return this->nu(patchi);
231 template<
class BasicMomentumTransportModel>
237 IOobject::groupName(
"k", this->alphaRhoPhi_.group()),
244 template<
class BasicMomentumTransportModel>
250 IOobject::groupName(
"epsilon", this->alphaRhoPhi_.group()),
257 template<
class BasicMomentumTransportModel>
263 IOobject::groupName(
"R", this->alphaRhoPhi_.group()),
270 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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity, i.e. the laminar viscosity.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimViscosity
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.
BasicMomentumTransportModel::rhoField rhoField
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::transportModel transportModel
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.
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.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate,.
volScalarField scalarField(fieldObject, mesh)
virtual tmp< volScalarField > nut() const
Return the turbulence viscosity, i.e. 0 for laminar flow.
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()
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy, i.e. 0 for laminar flow.
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
virtual void printCoeffs(const word &type)
Print model coefficients.
virtual tmp< volSymmTensorField > sigma() const
Return the stress tensor [m^2/s^2], i.e. 0 for laminar flow.
laminarModel(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()
Correct the laminar transport.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Turbulence model for Stokes flow.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
const objectRegistry & db() const
Return the local objectRegistry.
static autoPtr< laminarModel > 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 laminar model.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.