39 template<
class BasicTurbulenceModel>
52 (2*
sqrt(2.0))*((S&S)&&S)
68 return 1.0/(A0_ + As*Us*k_/epsilon_);
72 template<
class BasicTurbulenceModel>
80 this->nut_ = rCmu(gradU, S2, magS)*
sqr(k_)/epsilon_;
81 this->nut_.correctBoundaryConditions();
84 BasicTurbulenceModel::correctNut();
88 template<
class BasicTurbulenceModel>
94 correctNut(tgradU(), S2, magS);
98 template<
class BasicTurbulenceModel>
106 dimVolume*this->rho_.dimensions()*k_.dimensions()
113 template<
class BasicTurbulenceModel>
121 dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
130 template<
class BasicTurbulenceModel>
139 const word& propertiesName,
206 this->runTime_.timeName(),
218 this->runTime_.timeName(),
226 bound(k_, this->kMin_);
227 bound(epsilon_, this->epsilonMin_);
229 if (type == typeName)
231 this->printCoeffs(type);
238 template<
class BasicTurbulenceModel>
243 Cmu_.readIfPresent(this->coeffDict());
244 A0_.readIfPresent(this->coeffDict());
245 C2_.readIfPresent(this->coeffDict());
246 sigmak_.readIfPresent(this->coeffDict());
247 sigmaEps_.readIfPresent(this->coeffDict());
258 template<
class BasicTurbulenceModel>
261 if (!this->turbulence_)
288 epsilon_.boundaryFieldRef().updateCoeffs();
297 C1*alpha*rho*magS*epsilon_
300 C2_*alpha*rho*epsilon_/(k_ +
sqrt(this->
nu()*epsilon_)),
307 epsEqn.
ref().relax();
309 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
312 bound(epsilon_, this->epsilonMin_);
325 -
fvm::Sp(alpha*rho*epsilon_/k_, k_)
334 bound(k_, this->kMin_);
336 correctNut(tgradU(), S2, magS);
virtual tmp< fvScalarMatrix > epsilonSource() const
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
fvMatrix< scalar > fvScalarMatrix
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedTensor skew(const dimensionedTensor &dt)
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
const dimensionedScalar G
Newtonian constant of gravitation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
BasicTurbulenceModel::rhoField rhoField
dimensionedScalar sqrt(const dimensionedScalar &ds)
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
BasicTurbulenceModel::transportModel transportModel
virtual bool read()
Re-read model coefficients if they have changed.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Templated abstract base class for RAS turbulence models.
tmp< volScalarField > rCmu(const volTensorField &gradU, const volScalarField &S2, const volScalarField &magS)
void clear() const
If object pointer points to valid object:
const dimensionSet dimVolume(pow3(dimLength))
Dimension set for the base types.
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
tmp< fvMatrix< Type > > SuSp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
A class for handling words, derived from string.
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual tmp< fvScalarMatrix > kSource() const
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
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.
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/ubuntu/OpenFOAM-4.1/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()
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
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.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
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 void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual void correctNut()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
realizableKE(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
Construct from components.
volScalarField divU(fvc::div(fvc::absolute(phi, U)))
A class for managing temporary objects.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
T & ref() const
Return non-const reference or generate a fatal error.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
BasicTurbulenceModel::alphaField alphaField