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()
86 this->mesh_.magSf().boundaryField()[
patchi];
92 = (Sf[facei]/magSf[facei])*snGradUw[facei];
104 template<
class BasicMomentumTransportModel>
121 template<
class BasicMomentumTransportModel>
124 const word& modelName,
130 const viscosity& viscosity
133 BasicMomentumTransportModel
158 IOobject::groupName(
"R", alphaRhoPhi.
group()),
159 this->runTime_.timeName(),
171 IOobject::groupName(
"nut", alphaRhoPhi.
group()),
172 this->runTime_.timeName(),
180 if (couplingFactor_.value() < 0 || couplingFactor_.value() > 1)
183 <<
"couplingFactor = " << couplingFactor_
184 <<
" is not in range 0 - 1" <<
nl 192 template<
class BasicMomentumTransportModel>
199 template<
class BasicMomentumTransportModel>
207 template<
class BasicMomentumTransportModel>
217 template<
class BasicMomentumTransportModel>
223 IOobject::groupName(
"devTau", this->alphaRhoPhi_.group()),
224 this->alpha_*this->rho_*R_
225 - (this->alpha_*this->rho_*this->nu())
231 template<
class BasicMomentumTransportModel>
232 template<
class RhoFieldType>
236 const RhoFieldType& rho,
271 template<
class BasicMomentumTransportModel>
278 return DivDevRhoReff(this->rho_, U);
282 template<
class BasicMomentumTransportModel>
290 return DivDevRhoReff(rho, U);
294 template<
class BasicMomentumTransportModel>
301 template<
class BasicMomentumTransportModel>
void correctWallShearStress(volSymmTensorField &R) const
const fvPatchList & patches
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
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.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
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.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/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()
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.
ReynoldsStress(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
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.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
virtual void validate()
Validate the turbulence fields after construction.
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
void boundNormalStress(volSymmTensorField &R) const
BasicMomentumTransportModel::rhoField rhoField
virtual void rename(const word &newName)
Rename.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
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...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)