42 template<
class BasicTurbulenceModel>
55 (2*
sqrt(2.0))*((S&S)&&S)
71 return 1.0/(A0_ + As*
Us*k_/epsilon_);
75 template<
class BasicTurbulenceModel>
83 this->nut_ = rCmu(gradU, S2, magS)*
sqr(k_)/epsilon_;
84 this->nut_.correctBoundaryConditions();
87 BasicTurbulenceModel::correctNut();
91 template<
class BasicTurbulenceModel>
97 correctNut(tgradU(), S2, magS);
101 template<
class BasicTurbulenceModel>
109 dimVolume*this->rho_.dimensions()*k_.dimensions()
116 template<
class BasicTurbulenceModel>
124 dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
133 template<
class BasicTurbulenceModel>
136 const alphaField&
alpha,
142 const word& propertiesName,
222 if (type == typeName)
231 template<
class BasicTurbulenceModel>
236 A0_.readIfPresent(this->coeffDict());
237 C2_.readIfPresent(this->coeffDict());
238 sigmak_.readIfPresent(this->coeffDict());
239 sigmaEps_.readIfPresent(this->coeffDict());
248 template<
class BasicTurbulenceModel>
251 if (!this->turbulence_)
257 const alphaField&
alpha = this->alpha_;
258 const rhoField&
rho = this->rho_;
264 eddyViscosity<RASModel<BasicTurbulenceModel>>
::correct();
278 epsilon_.boundaryFieldRef().updateCoeffs();
292 tmp<fvScalarMatrix> epsEqn
308 epsEqn.ref().relax();
310 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
313 bound(epsilon_, this->epsilonMin_);
318 tmp<fvScalarMatrix> kEqn
335 bound(k_, this->kMin_);
337 correctNut(tgradU(), S2, magS);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
fvMatrix< scalar > fvScalarMatrix
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
dimensionedScalar kMin_
Lower limit of k.
dimensionedTensor skew(const dimensionedTensor &dt)
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
const dimensionedScalar G
Newtonian constant of gravitation.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
virtual tmp< fvScalarMatrix > kSource() const
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual bool read()
Re-read model coefficients if they have changed.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
bool read(const char *buf, int32_t &val)
Same as readInt32.
Templated abstract base class for RAS turbulence models.
tmp< volScalarField > rCmu(const volTensorField &gradU, const volScalarField &S2, const volScalarField &magS)
constexpr const char *const group
Group name for atomic constants.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionSet dimVolume(pow3(dimLength))
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
virtual void printCoeffs(const word &type)
Print model coefficients.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Bound the given scalar field if it has gone unbounded.
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/chef2/andy/OpenFOAM/release/v2212/OpenFOAM-v2212/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 tmp< fvScalarMatrix > epsilonSource() const
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Base-class for all transport models used by the incompressible turbulence models. ...
virtual void correctNut()
edgeScalarField phis(IOobject("phis", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), linearEdgeInterpolate(Us) &aMesh.Le())
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
realizableKE(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
Construct from components.
void clear() const noexcept
If object pointer points to valid object: delete object and set pointer to nullptr.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
dimensionedScalar epsilonMin_
Lower limit of epsilon.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)