52 Info<<
"Storing initial values of turbulence variables" <<
endl;
85 Info<<
"Allocating mean values of turbulence variables" <<
endl;
115 mesh_.time().timeName(),
134 mesh_.time().timeName(),
189 solverControl_(SolverControl),
200 TMVar1InitPtr_(nullptr),
201 TMVar2InitPtr_(nullptr),
202 nutInitPtr_(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),
256 mesh.time().constant(),
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;
324 <<
"nutJacobianVar2 not implemented for the current turbulence model."
325 <<
"Returning zero field" <<
endl;
361 Info<<
"Resetting mean turbulent fields to zero" <<
endl;
385 const scalar avIter(iAverageIter);
386 const scalar oneOverItP1 = 1./(avIter + 1);
387 const scalar mult = avIter*oneOverItP1;
469 if (rmv.hasNut() &&
hasNut())
474 if (rmv.hasDist() &&
hasDist())
Macros for easy insertion into run-time selection tables.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
void correctBoundaryConditions()
Correct boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...
bool readCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val using any compatibility names if needed. FatalIOError if there are exc...
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.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
virtual void transfer(RASModelVariables &rmv)
Transfer turbulence fields from an another object.
refPtr< volScalarField > TMVar1Ptr_
static autoPtr< RASModelVariables > New(const fvMesh &mesh, const solverControl &SolverControl)
Return a reference to the selected turbulence model.
const volScalarField & TMVar1Inst() const
Return references to instantaneous turbulence fields.
virtual void correctBoundaryConditions(const incompressible::turbulenceModel &turbulence)
correct bounday conditions of turbulent fields
refPtr< volScalarField > distPtr_
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
RASModelVariables(const fvMesh &mesh, const solverControl &SolverControl)
Construct from components.
refPtr< volScalarField > TMVar2Ptr_
void copyAndRename(volScalarField &f1, volScalarField &f2)
const volScalarField & nutRefInst() const
virtual void computeMeanFields()
Compute mean fields on the fly.
tmp< volSymmTensorField > devReff(const singlePhaseTransportModel &laminarTransport, const volVectorField &U) const
Return stress tensor based on the mean flow variables.
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 & TMVar2Inst() const
tmp< volScalarField > nut() const
refPtr< volScalarField > TMVar2InitPtr_
refPtr< volScalarField > nutPtr_
A class for managing references or pointers (no reference counting).
static refPtr< T > New(Args &&... args)
Construct refPtr with forwarding arguments.
virtual void rename(const word &newName)
Rename.
A simple single-phase transport model based on viscosityModel.
Base class for solver control classes.
bool doAverageIter() const
Whether or not to add fields of the current iteration to the average fields.
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.
static const word propertiesName
Default name of the turbulence properties dictionary.
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)
IncompressibleTurbulenceModel< transportModel > turbulenceModel
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
singlePhaseTransportModel laminarTransport(U, phi)