38 namespace incompressible
40 namespace RASVariables
146 <<
"Using GMean" <<
endl;
150 <<
"Using instantaneous G" <<
endl;
161 scalar avIter(iAverageIter);
162 scalar oneOverItP1 = 1./(avIter + 1);
163 scalar mult = avIter*oneOverItP1;
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual tmp< volScalarField::Internal > G()
Return the turbulence production term.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
refPtr< volScalarField > TMVar2Ptr_
Type & lookupObjectRef(const word &name, const bool recursive=false) const
Lookup and return non-const reference to the object of the given Type. Fatal if not found or the wron...
const volVectorField & U() const
Access function to velocity field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void computeMeanFields()
Compute mean fields on the fly.
refPtr< volScalarField > nutPtr_
static const wallDist & New(const fvMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
Ostream & endl(Ostream &os)
Add newline and flush stream.
kOmegaSST(const fvMesh &mesh, const solverControl &SolverControl)
Construct from components.
const solverControl & solverControl_
const volScalarField & TMVar2() const
const volScalarField & nutRef() const
const Time & time() const
Return the top-level database.
virtual void allocateInitValues()
word GName() const
Helper function to return the name of the turbulence G field.
Macros for easy insertion into run-time selection tables.
constexpr const char *const group
Group name for atomic constants.
Templated abstract base class for single-phase incompressible turbulence models.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
refPtr< volScalarField > distPtr_
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
static const word propertiesName
Default name of the turbulence properties dictionary.
Base class for solver control classes.
Reading is optional [identical to LAZY_READ].
defineTypeNameAndDebug(kEpsilon, 0)
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
virtual void allocateMeanFields()
virtual void correctBoundaryConditions(const incompressible::turbulenceModel &turbulence)
Correct boundary conditions of turbulent fields.
#define DebugInfo
Report an information message using Foam::Info.
autoPtr< volScalarField::Internal > GMean_
Average of the production term.
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.
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
bool doAverageIter() const
Whether or not to add fields of the current iteration to the average fields.
const volScalarField & TMVar2Inst() const
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual void allocateMeanFields()
const volScalarField & nutRefInst() const
addToRunTimeSelectionTable(RASModelVariables, kEpsilon, dictionary)
bool average() const
Whether averaging is enabled or not.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Automatically write from objectRegistry::writeObject()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
refPtr< volScalarField > TMVar1Ptr_
label & averageIter()
Return average iteration index reference.
A class for managing temporary objects.
bool useAveragedFields() const
Use averaged fields? For solving the adjoint equations or computing sensitivities based on averaged f...
tmp< volScalarField::Internal > computeG()
Defines the attributes of an object for which implicit objectRegistry management is supported...
Request registration (bool: true)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual void correctBoundaryConditions(const incompressible::turbulenceModel &turbulence)
correct bounday conditions of turbulent fields
const dimensionSet dimArea(sqr(dimLength))
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
static constexpr const zero Zero
Global zero (0)
virtual void computeMeanFields()
Compute mean fields on the fly.