33 template<
class BasicMomentumTransportModel>
39 scalar kMin = this->kMin_.value();
58 template<
class BasicMomentumTransportModel>
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));
105 template<
class BasicMomentumTransportModel>
122 template<
class BasicMomentumTransportModel>
125 const word& modelName,
134 BasicMomentumTransportModel
159 IOobject::groupName(
"R", alphaRhoPhi.
group()),
160 this->runTime_.timeName(),
172 IOobject::groupName(
"nut", alphaRhoPhi.
group()),
173 this->runTime_.timeName(),
181 if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
184 <<
"couplingFactor = " << couplingFactor_
185 <<
" is not in range 0 - 1" <<
nl 193 template<
class BasicMomentumTransportModel>
200 template<
class BasicMomentumTransportModel>
208 template<
class BasicMomentumTransportModel>
218 template<
class BasicMomentumTransportModel>
224 IOobject::groupName(
"devTau", this->alphaRhoPhi_.group()),
225 this->alpha_*this->rho_*R_
226 - (this->alpha_*this->rho_*this->nu())
232 template<
class BasicMomentumTransportModel>
233 template<
class RhoFieldType>
237 const RhoFieldType& rho,
241 if (couplingFactor_.value() > 0.0)
247 (1.0 - couplingFactor_)*this->alpha_*rho*this->
nut(),
268 this->alpha_*rho*this->
nut(),
280 template<
class BasicMomentumTransportModel>
287 return DivDevRhoReff(this->rho_, U);
291 template<
class BasicMomentumTransportModel>
299 return DivDevRhoReff(rho, U);
303 template<
class BasicMomentumTransportModel>
310 template<
class BasicMomentumTransportModel>
void correctWallShearStress(volSymmTensorField &R) const
static word group(const word &name)
Return group (extension part of name)
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
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.
ReynoldsStress(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport)
Construct from components.
virtual tmp< volSymmTensorField > sigma() const
Return the Reynolds stress tensor [m^2/s^2].
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual tmp< fvSymmTensorMatrix > RSource() const
Source term for the R equation.
#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)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
fvMatrix< symmTensor > fvSymmTensorMatrix
Generic dimensioned Type class.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
virtual bool read()=0
Re-read model coefficients if they have changed.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
A class for handling words, derived from string.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/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()
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
virtual void validate()
Validate the turbulence fields after construction.
void boundNormalStress(volSymmTensorField &R) const
BasicMomentumTransportModel::rhoField rhoField
virtual void rename(const word &newName)
Rename.
BasicMomentumTransportModel::transportModel transportModel
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
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.
const dimensionSet dimVolume
BasicMomentumTransportModel::alphaField alphaField
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...