41 template<
class BasicEddyViscosityModel>
44 return nuTilda_/this->
nu();
48 template<
class BasicEddyViscosityModel>
55 return chi3/(chi3 +
pow3(Cv1_));
59 template<
class BasicEddyViscosityModel>
66 return scalar(1) - chi/(scalar(1) + chi*fv1);
70 template<
class BasicEddyViscosityModel>
78 return Ct3_*
exp(-Ct4_*
sqr(chi));
86 this->runTime_.timeName(),
97 template<
class BasicEddyViscosityModel>
107 template<
class BasicEddyViscosityModel>
118 min(nur/(
max(Stilda, eps)*
sqr(kappa_*dTilda)), scalar(10));
120 tr.ref().boundaryFieldRef() == 0;
126 template<
class BasicEddyViscosityModel>
140 template<
class BasicEddyViscosityModel>
154 Omega + fv2(chi, fv1)*nuTilda_/
sqr(kappa_*dTilda),
160 template<
class BasicEddyViscosityModel>
166 this->nut_ = nuTilda_*fv1;
172 template<
class BasicEddyViscosityModel>
175 correctNut(fv1(this->chi()));
181 template<
class BasicEddyViscosityModel>
185 const alphaField&
alpha,
191 const word& propertiesName
194 BasicEddyViscosityModel
242 Cw1_(Cb1_/
sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_),
333 Info<<
"ft2 term: active" <<
nl;
337 Info<<
"ft2 term: inactive" <<
nl;
344 template<
class BasicEddyViscosityModel>
349 sigmaNut_.readIfPresent(this->coeffDict());
350 kappa_.readIfPresent(this->coeffDict());
352 Cb1_.readIfPresent(this->coeffDict());
353 Cb2_.readIfPresent(this->coeffDict());
354 Cw1_ = Cb1_/
sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_;
356 Cw3_.readIfPresent(this->coeffDict());
357 Cv1_.readIfPresent(this->coeffDict());
358 Cs_.readIfPresent(this->coeffDict());
359 ck_.readIfPresent(this->coeffDict());
361 ft2_.readIfPresent(
"ft2", this->coeffDict());
362 Ct3_.readIfPresent(this->coeffDict());
363 Ct4_.readIfPresent(this->coeffDict());
367 Info<<
" ft2 term: active" <<
nl;
371 Info<<
" ft2 term: inactive" <<
nl;
381 template<
class BasicEddyViscosityModel>
387 IOobject::groupName(
"DnuTildaEff", this->alphaRhoPhi_.group()),
388 (nuTilda_ + this->
nu())/sigmaNut_
393 template<
class BasicEddyViscosityModel>
397 const scalar Cmu = 0.09;
398 const auto fv1 = this->fv1(chi());
402 IOobject::groupName(
"k", this->alphaRhoPhi_.group()),
407 template<
class BasicEddyViscosityModel>
412 const scalar Cmu = 0.09;
413 const auto fv1 = this->fv1(chi());
418 IOobject::groupName(
"epsilon", this->alphaRhoPhi_.group()),
419 sqrt(fv1)*
sqr(::
sqrt(Cmu)*this->
k())/(nuTilda_ + this->nut_ + nutSMALL)
424 template<
class BasicEddyViscosityModel>
428 const scalar betaStar = 0.09;
433 IOobject::groupName(
"omega", this->alphaRhoPhi_.group()),
434 this->
epsilon()/(betaStar*(this->
k() + k0))
439 template<
class BasicEddyViscosityModel>
442 if (!this->turbulence_)
449 const alphaField&
alpha = this->alpha_;
450 const rhoField&
rho = this->rho_;
466 tmp<fvScalarMatrix> nuTildaEqn
473 Cb1_*
alpha()*
rho()*Stilda()*nuTilda_()*(scalar(1) - ft2())
476 (Cw1_*fw(Stilda, dTilda) - Cb1_/
sqr(kappa_)*ft2())
483 nuTildaEqn.ref().relax();
488 nuTilda_.correctBoundaryConditions();
tmp< volScalarField > chi() const
void correct(GeometricField< Type, PatchField, GeoMesh > &field)
Apply correction to field.
tmp< volScalarField > fv1(const volScalarField &chi) const
tmp< volScalarField > Omega(const volTensorField &gradU) const
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedTensor skew(const dimensionedTensor &dt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool readIfPresent(const dictionary &dict)
Update the value of dimensioned<Type> if found in the dictionary, lookup in dictionary with the name(...
constexpr char nl
The newline '\n' character (0x0a)
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
dimensionedScalar sqrt(const dimensionedScalar &ds)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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.
virtual tmp< volScalarField > Stilda(const volScalarField &chi, const volScalarField &fv1, const volTensorField &gradU, const volScalarField &dTilda) const
tmp< volScalarField > r(const volScalarField &nur, const volScalarField &Stilda, const volScalarField &dTilda) const
label k
Boltzmann constant.
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< volScalarField > ft2(const volScalarField &chi) const
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.
tmp< volScalarField > fv2(const volScalarField &chi, const volScalarField &fv1) const
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
dimensionedScalar cbrt(const dimensionedScalar &ds)
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
tmp< volScalarField::Internal > fw(const volScalarField &Stilda, const volScalarField &dTilda) const
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const uniformDimensionedVectorField & g
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)
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.
Base-class for all transport models used by the incompressible turbulence models. ...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual void correctNut()
void correctBoundaryConditions()
Correct boundary field.
dimensionedScalar pow6(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Interface to run-time selectable methods to calculate the distance-to-wall and normal-to-wall fields...
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...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)