39 template<
class BasicTurbulenceModel>
42 this->nut_ = this->Cmu_*
sqr(k_)/epsilon_;
43 this->nut_.correctBoundaryConditions();
46 BasicTurbulenceModel::correctNut();
52 template<
class BasicTurbulenceModel>
61 const word& propertiesName,
192 this->runTime_.timeName(),
204 this->runTime_.timeName(),
212 if (type == typeName)
214 this->printCoeffs(type);
216 this->boundNormalStress(this->R_);
217 bound(epsilon_, this->epsilonMin_);
218 k_ = 0.5*
tr(this->R_);
225 template<
class BasicTurbulenceModel>
230 Cmu_.readIfPresent(this->coeffDict());
231 C1_.readIfPresent(this->coeffDict());
232 C1s_.readIfPresent(this->coeffDict());
233 C2_.readIfPresent(this->coeffDict());
234 C3_.readIfPresent(this->coeffDict());
235 C3s_.readIfPresent(this->coeffDict());
236 C4_.readIfPresent(this->coeffDict());
237 C5_.readIfPresent(this->coeffDict());
239 Ceps1_.readIfPresent(this->coeffDict());
240 Ceps2_.readIfPresent(this->coeffDict());
241 Cs_.readIfPresent(this->coeffDict());
242 Ceps_.readIfPresent(this->coeffDict());
253 template<
class BasicTurbulenceModel>
261 (Cs_*(this->k_/this->epsilon_))*this->R_ +
I*this->
nu()
267 template<
class BasicTurbulenceModel>
275 (Ceps_*(this->k_/this->epsilon_))*this->R_ +
I*this->
nu()
281 template<
class BasicTurbulenceModel>
284 if (!this->turbulence_)
306 epsilon_.boundaryFieldRef().updateCoeffs();
315 Ceps1_*alpha*rho*G*epsilon_/k_
316 -
fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
320 epsEqn.
ref().relax();
322 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
325 bound(epsilon_, this->epsilonMin_);
336 if (isA<wallFvPatch>(curPatch))
343 G[faceCelli]/(0.5*
mag(
tr(P[faceCelli])) + SMALL),
360 +
fvm::Sp(((C1_/2)*epsilon_ + (C1s_/2)*G)*alpha*rho/k_, R)
363 - ((1.0/3.0)*
I)*(((2.0 - C1_)*epsilon_ - C1s_*G)*alpha*rho)
367 (C3_ - C3s_*
mag(b))*
dev(S)
379 this->boundNormalStress(R);
386 this->correctWallShearStress(R);
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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)
BasicTurbulenceModel::rhoField rhoField
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Generic dimensioned Type class.
Speziale, Sarkar and Gatski Reynolds-stress turbulence model for incompressible and compressible flow...
BasicTurbulenceModel::transportModel transportModel
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Templated abstract base class for RAS turbulence models.
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
static const Identity< scalar > I
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
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)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
dimensionedSymmTensor innerSqr(const dimensionedSymmTensor &dt)
virtual const labelUList & faceCells() const
Return faceCells.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
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 bool read()
Read model coefficients if they have changed.
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
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)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
dimensioned< scalar > mag(const dimensioned< Type > &)
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...
virtual void correctNut()
Update the eddy-viscosity.
BasicTurbulenceModel::alphaField alphaField
Reynolds-stress turbulence model base class.