41 template<
class BasicTurbulenceModel>
45 this->nut_ = Cmu_*phit_*k_*T_;
46 this->nut_.correctBoundaryConditions();
49 BasicTurbulenceModel::correctNut();
53 template<
class BasicTurbulenceModel>
73 template<
class BasicTurbulenceModel>
80 pow(k_, 1.5)/epsilon_,
98 template<
class BasicTurbulenceModel>
101 const alphaField&
alpha,
107 const word& propertiesName,
323 if (type == typeName)
336 <<
"Non-zero values are required for the model constants:" <<
nl 347 template<
class BasicTurbulenceModel>
352 includeNu_.readIfPresent(
"includeNu", this->coeffDict());
353 Cmu_.readIfPresent(this->coeffDict());
354 Ceps1a_.readIfPresent(this->coeffDict());
355 Ceps1b_.readIfPresent(this->coeffDict());
356 Ceps1c_.readIfPresent(this->coeffDict());
357 Ceps2_.readIfPresent(this->coeffDict());
358 Cf1_.readIfPresent(this->coeffDict());
359 Cf2_.readIfPresent(this->coeffDict());
360 CL_.readIfPresent(this->coeffDict());
361 Ceta_.readIfPresent(this->coeffDict());
362 CT_.readIfPresent(this->coeffDict());
363 sigmaK_.readIfPresent(this->coeffDict());
364 sigmaEps_.readIfPresent(this->coeffDict());
365 sigmaPhit_.readIfPresent(this->coeffDict());
374 template<
class BasicTurbulenceModel>
377 if (!this->turbulence_)
383 const alphaField&
alpha = this->alpha_;
384 const rhoField&
rho = this->rho_;
390 eddyViscosity<RASModel<BasicTurbulenceModel>>
::correct();
409 Ceps1a_*(Ceps1b_ + Ceps1c_*
sqrt(1.0/phit_()))
414 epsilon_.boundaryFieldRef().updateCoeffs();
416 epsilon_.boundaryFieldRef().template evaluateCoupled<coupledFvPatch>();
420 tmp<fvScalarMatrix> epsEqn
436 epsEqn.ref().relax();
438 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
441 bound(epsilon_, this->epsilonMin_);
446 tmp<fvScalarMatrix> kEqn
462 bound(k_, this->kMin_);
467 tmp<fvScalarMatrix> fEqn
473 (Cf1_ - 1.0)*(phit_() - 2.0/3.0)/T_()
475 +(Cf2_*(2.0/3.0)*
divU)
488 tmp<fvScalarMatrix> phitEqn
502 /(k_()*sigmaPhit_*phit_())
509 phitEqn.ref().relax();
513 bound(phit_, phitMin_);
virtual void correct()
Solve the transport equations and correct the turbulent viscosity.
void correct(GeometricField< Type, PatchField, GeoMesh > &field)
Apply correction to field.
const Type & value() const noexcept
Return const reference to value.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField phit_
Normalised wall-normal fluctuating velocity scale [-].
volScalarField f_
Elliptic relaxation factor [1/s].
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar kMin_
Lower limit of k.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
dimensionedScalar sigmaEps_
tmp< volScalarField > Ls() const
Return the turbulent length scale, L.
Eddy viscosity turbulence model base class.
GeometricField< vector, fvPatchField, volMesh > volVectorField
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
bool read(const char *buf, int32_t &val)
Same as readInt32.
Templated abstract base class for RAS turbulence models.
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.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar phitMin_
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 correctNut()
Update nut with the latest available k, phit, and T.
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.
dimensionedScalar sigmaPhit_
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()
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
virtual bool read()
Re-read model coefficients if they have changed.
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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)
Base-class for all transport models used by the incompressible turbulence models. ...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
tmp< volScalarField > Ts() const
Return the turbulent time scale, T.
The k-epsilon-phit-f turbulence closure model for incompressible and compressible flows...
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.
volScalarField epsilon_
Turbulent kinetic energy dissipation rate [m2/s3].
volScalarField k_
Turbulent kinetic energy [m2/s2].
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.
dimensionedScalar sigmaK_
static constexpr const zero Zero
Global zero (0)