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>
112 template<
class BasicTurbulenceModel>
125 template<
class BasicTurbulenceModel>
128 const alphaField&
alpha,
134 const word& propertiesName,
214 if (type == typeName)
223 template<
class BasicTurbulenceModel>
228 A0_.readIfPresent(this->coeffDict());
229 C2_.readIfPresent(this->coeffDict());
230 sigmak_.readIfPresent(this->coeffDict());
231 sigmaEps_.readIfPresent(this->coeffDict());
240 template<
class BasicTurbulenceModel>
243 if (!this->turbulence_)
249 const alphaField&
alpha = this->alpha_;
250 const rhoField&
rho = this->rho_;
256 eddyViscosity<RASModel<BasicTurbulenceModel>>
::correct();
270 epsilon_.boundaryFieldRef().updateCoeffs();
272 epsilon_.boundaryFieldRef().template evaluateCoupled<coupledFvPatch>();
286 tmp<fvScalarMatrix> epsEqn
302 epsEqn.ref().relax();
304 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
307 bound(epsilon_, this->epsilonMin_);
312 tmp<fvScalarMatrix> kEqn
329 bound(k_, this->kMin_);
331 correctNut(tgradU(), S2, magS);
void correct(GeometricField< Type, PatchField, GeoMesh > &field)
Apply correction to field.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
MinMax< scalar > scalarMinMax
A scalar min/max range.
dimensionedScalar kMin_
Lower limit of k.
dimensionedTensor skew(const dimensionedTensor &dt)
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)
SymmTensor< Cmpt > devSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of the symmetric part of a SymmTensor.
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.
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...
dimensionedScalar cos(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
virtual void printCoeffs(const word &type)
Print model coefficients.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
edgeScalarField phis(IOobject("phis", runTime.timeName(), aMesh.thisDb(), IOobject::NO_READ, IOobject::NO_WRITE), linearEdgeInterpolate(Us) &aMesh.Le())
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/v2406/OpenFOAM-v2406/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});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.
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()
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)
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
static constexpr const zero Zero
Global zero (0)