33 template<
class BasicTurbulenceModel>
39 scalar kMin = this->kMin_.value();
58 template<
class BasicTurbulenceModel>
72 if (isA<wallFvPatch>(curPatch))
80 this->U_.boundaryField()[
patchi].snGrad()
84 = this->mesh_.Sf().boundaryField()[
patchi];
87 = this->mesh_.magSf().boundaryField()[
patchi];
93 = (faceAreas[facei]/magFaceAreas[facei])*snGradU[facei];
98 Rw[facei] = -nutw[facei]*2*
dev(
symm(gradUw));
107 template<
class BasicTurbulenceModel>
110 const word& modelName,
117 const word& propertiesName
146 IOobject::groupName(
"R", alphaRhoPhi.
group()),
147 this->runTime_.timeName(),
159 IOobject::groupName(
"nut", alphaRhoPhi.
group()),
160 this->runTime_.timeName(),
168 if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
171 <<
"couplingFactor = " << couplingFactor_
172 <<
" is not in range 0 - 1" <<
nl 180 template<
class BasicTurbulenceModel>
187 template<
class BasicTurbulenceModel>
195 template<
class BasicTurbulenceModel>
205 template<
class BasicTurbulenceModel>
215 IOobject::groupName(
"devRhoReff", this->alphaRhoPhi_.group()),
216 this->runTime_.timeName(),
221 this->alpha_*this->rho_*R_
222 - (this->alpha_*this->rho_*this->
nu())
229 template<
class BasicTurbulenceModel>
230 template<
class RhoFieldType>
234 const RhoFieldType& rho,
238 if (couplingFactor_.value() > 0.0)
244 (1.0 - couplingFactor_)*this->alpha_*rho*this->
nut(),
265 this->alpha_*rho*this->
nut(),
277 template<
class BasicTurbulenceModel>
284 return DivDevRhoReff(this->rho_, U);
288 template<
class BasicTurbulenceModel>
296 return DivDevRhoReff(rho, U);
300 template<
class BasicTurbulenceModel>
307 template<
class BasicTurbulenceModel>
void correctWallShearStress(volSymmTensorField &R) const
static word group(const word &name)
Return group (extension part of name)
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< fvVectorMatrix > DivDevRhoReff(const RhoFieldType &rho, volVectorField &U) const
Return the source term for the momentum equation.
T & ref() const
Return non-const reference or generate a fatal error.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
BasicTurbulenceModel::rhoField rhoField
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Generic dimensioned Type class.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
BasicTurbulenceModel::transportModel transportModel
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
const dimensionSet & dimensions() const
Return dimensions.
virtual bool read()=0
Re-read model coefficients if they have changed.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
A class for handling words, derived from string.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
virtual void validate()
Validate the turbulence fields after construction.
void boundNormalStress(volSymmTensorField &R) const
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-6/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 rename(const word &newName)
Rename.
ReynoldsStress(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
Construct from components.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void max(const dimensioned< Type > &)
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
BasicTurbulenceModel::alphaField alphaField