33 template<
class BasicTurbulenceModel>
38 Info<< coeffDict_.dictName() << coeffDict_ <<
endl;
45 template<
class BasicTurbulenceModel>
49 const alphaField&
alpha,
55 const word& propertiesName
69 LESDict_(this->subOrEmptyDict(
"LES")),
70 turbulence_(LESDict_.getOrDefault<
Switch>(
"turbulence", true)),
71 printCoeffs_(LESDict_.getOrDefault<
Switch>(
"printCoeffs", false)),
72 coeffDict_(LESDict_.optionalSubDict(
type +
"Coeffs")),
124 this->mesh_.deltaCoeffs();
130 template<
class BasicTurbulenceModel>
140 const word& propertiesName
164 Info<<
"Selecting LES turbulence model " << modelType <<
endl;
166 auto* ctorPtr = dictionaryConstructorTable(modelType);
175 *dictionaryConstructorTablePtr_
179 return autoPtr<LESModel>
181 ctorPtr(
alpha,
rho,
U, alphaRhoPhi,
phi, transport, propertiesName)
188 template<
class BasicTurbulenceModel>
193 LESDict_ <<= this->subDict(
"LES");
194 LESDict_.readEntry(
"turbulence", turbulence_);
196 coeffDict_ <<= LESDict_.optionalSubDict(
type() +
"Coeffs");
198 delta_().read(LESDict_);
200 Ce_.readIfPresent(LESDict_);
202 kMin_.readIfPresent(LESDict_);
211 template<
class BasicTurbulenceModel>
220 this->mesh_.time().timeName(),
228 template<
class BasicTurbulenceModel>
232 const scalar betaStar = 0.09;
240 this->mesh_.time().timeName(),
243 this->
epsilon()/(betaStar*(this->
k() + k0))
248 template<
class BasicTurbulenceModel>
BasicTurbulenceModel::transportModel transportModel
static word group(const word &name)
Return group (extension part of name)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Abstract base class for LES deltas.
Ostream & endl(Ostream &os)
Add newline and flush stream.
BasicTurbulenceModel::alphaField alphaField
virtual void printCoeffs(const word &type)
Print model coefficients.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
label k
Boltzmann constant.
Generic dimensioned Type class.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
constexpr const char *const group
Group name for atomic constants.
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
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.
A class for handling words, derived from Foam::string.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
BasicTurbulenceModel::rhoField rhoField
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/chef2/andy/OpenFOAM/release/v2306/OpenFOAM-v2306/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T using any compatibility names if needed. FatalIOError if not found, or if there are excess tokens.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual bool read()
Read model coefficients if they have changed.
Base-class for all transport models used by the incompressible turbulence models. ...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
LESModel(const LESModel &)=delete
No copy construct.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static autoPtr< LESModel > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected LES model.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Do not request registration (bool: false)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
const dimensionSet dimVelocity