39 template<
class BasicTurbulenceModel>
42 this->nut_ = Cmu_*
sqr(k_)/epsilon_;
43 this->nut_.correctBoundaryConditions();
46 BasicTurbulenceModel::correctNut();
50 template<
class BasicTurbulenceModel>
58 dimVolume*this->rho_.dimensions()*k_.dimensions()
65 template<
class BasicTurbulenceModel>
73 dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
82 template<
class BasicTurbulenceModel>
91 const word& propertiesName,
185 this->runTime_.timeName(),
197 this->runTime_.timeName(),
205 bound(k_, this->kMin_);
206 bound(epsilon_, this->epsilonMin_);
208 if (type == typeName)
210 this->printCoeffs(type);
217 template<
class BasicTurbulenceModel>
222 Cmu_.readIfPresent(this->coeffDict());
223 C1_.readIfPresent(this->coeffDict());
224 C2_.readIfPresent(this->coeffDict());
225 C3_.readIfPresent(this->coeffDict());
226 sigmak_.readIfPresent(this->coeffDict());
227 sigmaEps_.readIfPresent(this->coeffDict());
228 eta0_.readIfPresent(this->coeffDict());
229 beta_.readIfPresent(this->coeffDict());
240 template<
class BasicTurbulenceModel>
243 if (!this->turbulence_)
271 ((eta*(-eta/eta0_ + scalar(1)))/(beta_*eta3 + scalar(1)))
275 epsilon_.boundaryFieldRef().updateCoeffs();
284 (C1_ - R)*alpha*rho*G*epsilon_/k_
285 -
fvm::SuSp(((2.0/3.0)*C1_ + C3_)*alpha*rho*divU, epsilon_)
286 -
fvm::Sp(C2_*alpha*rho*epsilon_/k_, epsilon_)
291 epsEqn.
ref().relax();
293 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
296 bound(epsilon_, this->epsilonMin_);
308 -
fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
309 -
fvm::Sp(alpha*rho*epsilon_/k_, k_)
318 bound(k_, this->kMin_);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
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)
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
BasicTurbulenceModel::rhoField rhoField
dimensionedScalar sqrt(const dimensionedScalar &ds)
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
BasicTurbulenceModel::transportModel transportModel
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Templated abstract base class for RAS turbulence models.
void clear() const
If object pointer points to valid object:
const dimensionSet dimVolume(pow3(dimLength))
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
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.
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual tmp< fvScalarMatrix > kSource() const
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
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()
virtual void correctNut()
Renormalization group k-epsilon turbulence model for incompressible and compressible flows...
virtual tmp< fvScalarMatrix > epsilonSource() const
virtual bool read()
Re-read model coefficients if they have changed.
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.
#define R(A, B, C, D, E, F, K, M)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensioned< scalar > mag(const dimensioned< Type > &)
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