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];
99 Rw[facei].xy() = tauw.
xy();
100 Rw[facei].xz() = tauw.
xz();
101 Rw[facei].yz() = tauw.
yz();
110 template<
class BasicTurbulenceModel>
113 const word& modelName,
120 const word& propertiesName
149 IOobject::groupName(
"R", U.
group()),
150 this->runTime_.timeName(),
162 IOobject::groupName(
"nut", U.
group()),
163 this->runTime_.timeName(),
171 if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
174 <<
"couplingFactor = " << couplingFactor_
175 <<
" is not in range 0 - 1" <<
nl 183 template<
class BasicTurbulenceModel>
190 template<
class BasicTurbulenceModel>
198 template<
class BasicTurbulenceModel>
208 template<
class BasicTurbulenceModel>
218 IOobject::groupName(
"devRhoReff", this->U_.group()),
219 this->runTime_.timeName(),
224 this->alpha_*this->rho_*R_
225 - (this->alpha_*this->rho_*this->
nu())
232 template<
class BasicTurbulenceModel>
239 if (couplingFactor_.value() > 0.0)
245 (1.0 - couplingFactor_)*this->alpha_*this->rho_*this->
nut(),
251 this->alpha_*this->rho_*R_
266 this->alpha_*this->rho_*this->
nut(),
270 +
fvc::div(this->alpha_*this->rho_*R_)
284 template<
class BasicTurbulenceModel>
300 template<
class BasicTurbulenceModel>
307 template<
class BasicTurbulenceModel>
BasicTurbulenceModel::alphaField alphaField
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.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
Generic dimensioned Type class.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
BasicTurbulenceModel::transportModel transportModel
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
bool read(const char *, int32_t &)
virtual bool read()=0
Re-read model coefficients if they have changed.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
void correctWallShearStress(volSymmTensorField &R) const
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
A class for handling words, derived from string.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
BasicTurbulenceModel::rhoField rhoField
virtual void validate()
Validate the turbulence fields after construction.
const dimensionSet & dimensions() const
Return dimensions.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
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 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 > &)
void boundNormalStress(volSymmTensorField &R) const
A class for managing temporary objects.
word group() const
Return group (extension part of name)
T & ref() const
Return non-const reference or generate a fatal error.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...