40 template<
class BasicMomentumTransportModel>
43 return exp(-3.4/
sqr(scalar(1) +
sqr(k_)/(this->nu()*epsilon_)/50.0));
47 template<
class BasicMomentumTransportModel>
52 - 0.3*
exp(-
min(
sqr(
sqr(k_)/(this->nu()*epsilon_)), scalar(50.0)));
56 template<
class BasicMomentumTransportModel>
59 this->nut_ = Cmu_*fMu()*
sqr(k_)/epsilon_;
60 this->nut_.correctBoundaryConditions();
65 template<
class BasicMomentumTransportModel>
74 dimVolume*this->rho_.dimensions()*k_.dimensions()
81 template<
class BasicMomentumTransportModel>
90 dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
99 template<
class BasicMomentumTransportModel>
182 this->runTime_.timeName(),
195 this->runTime_.timeName(),
203 bound(k_, this->kMin_);
204 bound(epsilon_, this->epsilonMin_);
206 if (type == typeName)
208 this->printCoeffs(type);
215 template<
class BasicMomentumTransportModel>
220 Cmu_.readIfPresent(this->coeffDict());
221 C1_.readIfPresent(this->coeffDict());
222 C2_.readIfPresent(this->coeffDict());
223 C3_.readIfPresent(this->coeffDict());
224 sigmak_.readIfPresent(this->coeffDict());
225 sigmaEps_.readIfPresent(this->coeffDict());
236 template<
class BasicMomentumTransportModel>
239 if (!this->turbulence_)
278 C1_*alpha*rho*G*epsilon_/k_
279 -
fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha*rho*divU, epsilon_)
280 -
fvm::Sp(C2_*f2()*alpha*rho*epsilon_/k_, epsilon_)
283 + fvModels.source(alpha, rho, epsilon_)
286 epsEqn.
ref().relax();
288 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
291 bound(epsilon_, this->epsilonMin_);
301 alpha*rho*G -
fvm::SuSp(2.0/3.0*alpha*rho*divU, k_)
302 -
fvm::Sp(alpha*rho*(epsilon_ + D)/k_, k_)
304 + fvModels.source(alpha, rho, k_)
311 bound(k_, this->kMin_);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
BasicMomentumTransportModel::alphaField alphaField
fvMatrix< scalar > fvScalarMatrix
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
void clear() const
If object pointer points to valid object:
virtual bool read()
Re-read model coefficients if they have changed.
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)
tmp< volScalarField > magSqrGradGrad(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
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.
virtual tmp< fvScalarMatrix > kSource() const
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Templated abstract base class for RAS turbulence models.
BasicMomentumTransportModel::rhoField rhoField
const dimensionSet dimTime
bool read(const char *, int32_t &)
virtual tmp< fvScalarMatrix > epsilonSource() const
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar exp(const dimensionedScalar &ds)
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)
tmp< volScalarField > f2() const
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
LaunderSharmaKE(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< 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.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimVolume
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
virtual void correctNut()
tmp< volScalarField > fMu() const
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
BasicMomentumTransportModel::transportModel transportModel