40 template<
class BasicMomentumTransportModel>
44 epsilon_ =
max(epsilon_, tCmuk2()/(this->nutMaxCoeff_*this->nu()));
49 template<
class BasicMomentumTransportModel>
52 return max(k_/epsilon_, 6.0*
sqrt(this->nu()/epsilon_));
56 template<
class BasicMomentumTransportModel>
61 /epsilon_, Ceta_*
pow025(
pow3(this->nu())/epsilon_));
65 template<
class BasicMomentumTransportModel>
68 this->nut_ =
min(boundEpsilon()/epsilon_, this->Cmu_*v2_*Ts());
69 this->nut_.correctBoundaryConditions();
76 template<
class BasicMomentumTransportModel>
100 Cmu_(
"Cmu", this->coeffDict(), 0.22),
101 CmuKEps_(
"CmuKEps", this->coeffDict(), 0.09),
102 C1_(
"C1", this->coeffDict(), 1.4),
103 C2_(
"C2", this->coeffDict(), 0.3),
104 CL_(
"CL", this->coeffDict(), 0.23),
105 Ceta_(
"Ceta", this->coeffDict(), 70.0),
106 Ceps2_(
"Ceps2", this->coeffDict(), 1.9),
107 Ceps3_(
"Ceps3", this->coeffDict(), -0.33),
108 sigmaK_(
"sigmaK", this->coeffDict(), 1.0),
109 sigmaEps_(
"sigmaEps", this->coeffDict(), 1.3),
115 this->groupName(
"k"),
116 this->runTime_.
name(),
127 this->groupName(
"epsilon"),
128 this->runTime_.
name(),
139 this->groupName(
"v2"),
140 this->runTime_.
name(),
151 this->groupName(
"f"),
152 this->runTime_.
name(),
171 template<
class BasicMomentumTransportModel>
176 Cmu_.readIfPresent(this->coeffDict());
177 CmuKEps_.readIfPresent(this->coeffDict());
178 C1_.readIfPresent(this->coeffDict());
179 C2_.readIfPresent(this->coeffDict());
180 CL_.readIfPresent(this->coeffDict());
181 Ceta_.readIfPresent(this->coeffDict());
182 Ceps2_.readIfPresent(this->coeffDict());
183 Ceps3_.readIfPresent(this->coeffDict());
184 sigmaK_.readIfPresent(this->coeffDict());
185 sigmaEps_.readIfPresent(this->coeffDict());
196 template<
class BasicMomentumTransportModel>
199 if (!this->turbulence_)
232 1.0/Ts*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0))
238 1.4*(1.0 + 0.05*
min(
sqrt(k_/v2_), scalar(100.0)))
242 epsilon_.boundaryFieldRef().updateCoeffs();
257 epsEqn.
ref().relax();
259 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
282 bound(k_, this->kMin_);
291 - 1.0/L2/k_*(v2fAlpha - C2_*
G)
Bound the given scalar field where it is below the specified minimum.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated abstract base class for RAS turbulence models.
Abstract base-class for v2-f models to provide BCs access to the v2 and f fields.
volScalarField k_
Turbulence kinetic energy.
v2f(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
tmp< volScalarField > boundEpsilon()
Bound epsilon and return Cmu*sqr(k) for nut.
tmp< volScalarField > Ts() const
Return time scale, Ts.
virtual void correctNut()
Correct the eddy-viscosity nut.
volScalarField f_
Damping function.
tmp< volScalarField > Ls() const
Return length scale, Ls.
virtual bool read()
Read RASProperties dictionary.
volScalarField v2_
Turbulence stress normal to streamlines.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Eddy viscosity turbulence model base class.
Finite volume constraints.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::rhoField rhoField
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
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)
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
bool read(const char *, int32_t &)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
void dev(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void pow025(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
const dimensionSet dimless
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void symm(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
word typedName(Name name)
Return the name of the object within the given type.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
bool bound(volScalarField &, const dimensionedScalar &min)
Bound the given scalar field where it is below the specified min value.
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.