37namespace incompressible
52 Info<<
"Storing initial values of turbulence variables" <<
endl;
85 Info<<
"Allocating mean values of turbulence variables" <<
endl;
189 solverControl_(SolverControl),
200 TMVar1InitPtr_(nullptr),
201 TMVar2InitPtr_(nullptr),
202 nutInitPtr_(nullptr),
204 TMVar1MeanPtr_(nullptr),
205 TMVar2MeanPtr_(nullptr),
216 solverControl_(rmv.solverControl_),
218 TMVar1BaseName_(rmv.TMVar1BaseName_),
219 TMVar2BaseName_(rmv.TMVar2BaseName_),
220 nutBaseName_(rmv.nutBaseName_),
222 TMVar1Ptr_(cloneRefPtr(rmv.TMVar1Ptr_)),
223 TMVar2Ptr_(cloneRefPtr(rmv.TMVar2Ptr_)),
224 nutPtr_(cloneRefPtr(rmv.nutPtr_)),
225 distPtr_(cloneRefPtr(rmv.distPtr_)),
227 TMVar1InitPtr_(nullptr),
228 TMVar2InitPtr_(nullptr),
229 nutInitPtr_(nullptr),
231 TMVar1MeanPtr_(nullptr),
232 TMVar2MeanPtr_(nullptr),
264 word modelType(
"laminar");
271 dictptr->
readCompat(
"model", {{
"RASModel", -2006}}, modelType);
278 Info<<
"Creating references for RASModel variables : " << modelType <<
endl;
280 auto* ctorPtr = dictionaryConstructorTable(modelType);
289 *dictionaryConstructorTablePtr_
305 <<
"jutJacobianVar1 not implemented for the current turbulence model."
306 <<
"Returning zero field" <<
endl;
330 <<
"nutJacobianVar2 not implemented for the current turbulence model."
331 <<
"Returning zero field" <<
endl;
373 Info<<
"Resetting mean turbulent fields to zero" <<
endl;
400 const scalar avIter(iAverageIter);
401 const scalar oneOverItP1 = 1./(avIter + 1);
402 const scalar mult = avIter*oneOverItP1;
Macros for easy insertion into run-time selection tables.
void correctBoundaryConditions()
Correct boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
Templated abstract base class for single-phase incompressible turbulence models.
const word & constant() const
Return constant name.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
bool readCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
virtual tmp< volSymmTensorField > devReff() const
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
const volScalarField & TMVar1Inst() const
return references to instantaneous turbulence fields
virtual void allocateMeanFields()
refPtr< volScalarField > nutInitPtr_
virtual void allocateInitValues()
autoPtr< RASModelVariables > clone() const
Clone.
void restoreInitValues()
Restore turbulent fields to their initial values.
const volScalarField & d() const
virtual bool hasNut() const
virtual bool hasTMVar2() const
refPtr< volScalarField > cloneRefPtr(const refPtr< volScalarField > &obj) const
refPtr< volScalarField > nutMeanPtr_
virtual tmp< volScalarField > nutJacobianVar1(const singlePhaseTransportModel &laminarTransport) const
Return nut Jacobian wrt the TM vars.
refPtr< volScalarField > TMVar1InitPtr_
virtual tmp< volScalarField > nutJacobianVar2(const singlePhaseTransportModel &laminarTransport) const
void copyAndRename(volScalarField &f1, volScalarField &f2)
const volScalarField & nutRefInst() const
virtual void computeMeanFields()
Compute mean fields on the fly.
void resetMeanFields()
Reset mean fields to zero.
const solverControl & solverControl_
refPtr< volScalarField > TMVar1MeanPtr_
virtual bool hasTMVar1() const
Bools to identify which turbulent fields are present.
refPtr< volScalarField > TMVar2MeanPtr_
const volScalarField & nutRef() const
const volScalarField & TMVar2Inst() const
refPtr< volScalarField > TMVar2InitPtr_
static const word propertiesName
Default name of the phase properties dictionary.
A class for managing references or pointers (no reference counting)
virtual void rename(const word &newName)
Rename.
transferModelList & transfer()
Transfer.
A simple single-phase transport model based on viscosityModel.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Base class for solver control classes.
bool doAverageIter() const
bool storeInitValues() const
Re-initialize.
label & averageIter()
Return average iteration index reference.
bool average() const
Whether averaging is enabled or not.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define WarningInFunction
Report a warning using Foam::Warning.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
singlePhaseTransportModel laminarTransport(U, phi)