40 template<
class BasicMomentumTransportModel>
43 return max(k_/epsilon_, 6.0*
sqrt(this->nu()/epsilon_));
47 template<
class BasicMomentumTransportModel>
52 /epsilon_, Ceta_*
pow025(
pow3(this->nu())/epsilon_));
56 template<
class BasicMomentumTransportModel>
59 this->nut_ =
min(CmuKEps_*
sqr(k_)/epsilon_, this->Cmu_*v2_*Ts());
60 this->nut_.correctBoundaryConditions();
67 template<
class BasicMomentumTransportModel>
187 this->runTime_.timeName(),
199 this->runTime_.timeName(),
211 this->runTime_.timeName(),
223 this->runTime_.timeName(),
233 bound(k_, this->kMin_);
234 bound(epsilon_, this->epsilonMin_);
238 if (type == typeName)
240 this->printCoeffs(type);
247 template<
class BasicMomentumTransportModel>
252 Cmu_.readIfPresent(this->coeffDict());
253 CmuKEps_.readIfPresent(this->coeffDict());
254 C1_.readIfPresent(this->coeffDict());
255 C2_.readIfPresent(this->coeffDict());
256 CL_.readIfPresent(this->coeffDict());
257 Ceta_.readIfPresent(this->coeffDict());
258 Ceps2_.readIfPresent(this->coeffDict());
259 Ceps3_.readIfPresent(this->coeffDict());
260 sigmaK_.readIfPresent(this->coeffDict());
261 sigmaEps_.readIfPresent(this->coeffDict());
272 template<
class BasicMomentumTransportModel>
275 if (!this->turbulence_)
308 1.0/Ts*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0))
314 1.4*(1.0 + 0.05*
min(
sqrt(k_/v2_), scalar(100.0)))
318 epsilon_.boundaryFieldRef().updateCoeffs();
328 -
fvm::SuSp(((2.0/3.0)*Ceps1 + Ceps3_)*alpha*rho*divU, epsilon_)
329 -
fvm::Sp(Ceps2_*alpha*rho/Ts, epsilon_)
330 + fvModels.source(alpha, rho, epsilon_)
333 epsEqn.
ref().relax();
335 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
338 bound(epsilon_, this->epsilonMin_);
349 -
fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
350 -
fvm::Sp(alpha*rho*epsilon_/k_, k_)
351 + fvModels.source(alpha, rho, k_)
358 bound(k_, this->kMin_);
367 - 1.0/L2/k_*(v2fAlpha - C2_*G)
384 alpha*rho*
min(k_*f_, C2_*G - v2fAlpha)
385 -
fvm::Sp(N*alpha*rho*epsilon_/k_, v2_)
386 + fvModels.source(alpha, rho, v2_)
v2f(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &type=typeName)
Construct from components.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
const dimensionSet dimless
Generic dimensioned Type class.
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
Eddy viscosity turbulence model base class.
BasicMomentumTransportModel::alphaField alphaField
tmp< volScalarField > Ls() const
Return length scale, Ls.
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. ...
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
BasicMomentumTransportModel::transportModel transportModel
Foam::fvConstraints & fvConstraints
A class for handling words, derived from string.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual void correctNut()
dimensioned< scalar > magSqr(const dimensioned< Type > &)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Bound the given scalar field if it has gone unbounded.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< volScalarField > divU
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
BasicMomentumTransportModel::rhoField rhoField
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
Finite volume constraints.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual bool read()
Read RASProperties dictionary.
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.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tmp< volScalarField > Ts() const
Return time scale, Ts.