31 template<
class BasicMomentumTransportModel>
43 BasicMomentumTransportModel
56 this->mesh_.deltaCoeffs();
62 template<
class BasicMomentumTransportModel>
89 {
"model",
"laminarModel"}
93 <<
"Selecting laminar stress model " << modelType <<
endl;
95 libs.
open(laminarDict,
"libs", dictionaryConstructorTablePtr_);
97 typename dictionaryConstructorTable::iterator cstrIter =
98 dictionaryConstructorTablePtr_->find(modelType);
100 if (cstrIter == dictionaryConstructorTablePtr_->end())
103 <<
"Unknown laminarModel type "
104 << modelType <<
nl <<
nl
105 <<
"Valid laminarModel types:" <<
endl
106 << dictionaryConstructorTablePtr_->sortedToc()
124 <<
"Selecting laminar stress model "
147 template<
class BasicMomentumTransportModel>
151 return this->subDict(
"laminar");
155 template<
class BasicMomentumTransportModel>
159 return typeDict(this->
type());
163 template<
class BasicMomentumTransportModel>
174 template<
class BasicMomentumTransportModel>
188 template<
class BasicMomentumTransportModel>
194 this->groupName(
"nut"),
201 template<
class BasicMomentumTransportModel>
215 template<
class BasicMomentumTransportModel>
221 this->groupName(
"k"),
228 template<
class BasicMomentumTransportModel>
234 this->groupName(
"epsilon"),
241 template<
class BasicMomentumTransportModel>
247 this->groupName(
"omega"),
254 template<
class BasicMomentumTransportModel>
260 this->groupName(
"sigma"),
267 template<
class BasicMomentumTransportModel>
270 BasicMomentumTransportModel::predict();
274 template<
class BasicMomentumTransportModel>
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static word group(const word &name)
Return group (extension part of name)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const fileName & name() const
Return the dictionary name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
BasicMomentumTransportModel::alphaField alphaField
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate,.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor [m^2/s^2], i.e. 0 for laminar flow.
static autoPtr< laminarModel > 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 laminar model.
virtual void correct()
Predict the laminar viscosity.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy, i.e. 0 for laminar flow.
const dictionary & laminarDict() const
Const access to the laminar dictionary.
virtual void predict()
Predict the laminar viscosity.
laminarModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
const dictionary & typeDict() const
Const access to the coefficients dictionary.
virtual tmp< volScalarField > nut() const
Return the turbulence viscosity, i.e. 0 for laminar flow.
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate,.
virtual bool read()
Read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
Momentum transport model for Stokes flow.
static typeIOobject< IOdictionary > readModelDict(const objectRegistry &obr, const word &group, bool registerObject=false)
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
A class for managing temporary objects.
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dlLibraryTable libs
Table of loaded dynamic libraries.
const dimensionSet & dimless
const dimensionSet & dimKinematicViscosity
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimVelocity
const dimensionSet & dimTime
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
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.
Info<< "Reading field U\n"<< endl;volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating face flux\n"<< endl;surfaceScalarField phi(IOobject("phi", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedScalar(mesh.Sf().dimensions() *U.dimensions(), 0));autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))