42 template<
class BasicTurbulenceModel>
45 this->nut_ = this->Cmu_*
sqr(k_)/epsilon_;
46 this->nut_.correctBoundaryConditions();
49 BasicTurbulenceModel::correctNut();
55 template<
class BasicTurbulenceModel>
58 const alphaField&
alpha,
64 const word& propertiesName,
206 if (
type == typeName)
219 template<
class BasicTurbulenceModel>
224 Cmu_.readIfPresent(this->coeffDict());
225 C1_.readIfPresent(this->coeffDict());
226 C2_.readIfPresent(this->coeffDict());
227 Ceps1_.readIfPresent(this->coeffDict());
228 Ceps2_.readIfPresent(this->coeffDict());
229 Cs_.readIfPresent(this->coeffDict());
230 Ceps_.readIfPresent(this->coeffDict());
232 wallReflection_.readIfPresent(
"wallReflection", this->coeffDict());
233 kappa_.readIfPresent(this->coeffDict());
234 Cref1_.readIfPresent(this->coeffDict());
235 Cref2_.readIfPresent(this->coeffDict());
244 template<
class BasicTurbulenceModel>
252 (Cs_*(this->k_/this->epsilon_))*this->R_ +
I*this->
nu()
258 template<
class BasicTurbulenceModel>
266 (Ceps_*(this->k_/this->epsilon_))*this->R_ +
I*this->
nu()
272 template<
class BasicTurbulenceModel>
275 if (!this->turbulence_)
281 const alphaField&
alpha = this->alpha_;
282 const rhoField&
rho = this->rho_;
297 epsilon_.boundaryFieldRef().updateCoeffs();
299 epsilon_.boundaryFieldRef().template evaluateCoupled<coupledFvPatch>();
313 epsEqn.ref().relax();
315 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
318 bound(epsilon_, this->epsilonMin_);
329 if (isA<wallFvPatch>(curPatch))
333 label celli = curPatch.
faceCells()[facei];
336 G[celli]/(0.5*
mag(
tr(P[celli])) + SMALL),
344 tmp<fvSymmTensorMatrix> REqn
352 - (2.0/3.0*(1 - C1_)*
I)*
alpha*
rho*epsilon_
365 Cref1_*
R - ((Cref2_*C2_)*(k_/epsilon_))*
dev(P)
378 this->boundNormalStress(
R);
385 this->correctWallShearStress(
R);
void correct(GeometricField< Type, PatchField, GeoMesh > &field)
Apply correction to field.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
static const wallDist & New(const fvMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
const dimensionedScalar G
Newtonian constant of gravitation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
SymmTensor< Cmpt > devSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of the symmetric part of a SymmTensor.
Generic dimensioned Type class.
virtual bool read()
Read model coefficients if they have changed.
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
bool read(const char *buf, int32_t &val)
Same as readInt32.
#define forAll(list, i)
Loop across all elements in list.
Templated abstract base class for RAS turbulence models.
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.
Launder, Reece and Rodi Reynolds-stress turbulence model for incompressible and compressible flows...
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
static const Identity< scalar > I
virtual void correctNut()
Update the eddy-viscosity.
A class for handling words, derived from Foam::string.
virtual const labelUList & faceCells() const
Return faceCells.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
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.
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
void boundNormalStress(volSymmTensorField &R) const
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
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)
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
#define R(A, B, C, D, E, F, K, M)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Base-class for all transport models used by the incompressible turbulence models. ...
const polyBoundaryMesh & patches
A class for managing temporary objects.
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.
Reynolds-stress turbulence model base class.