40 template<
class BasicMomentumTransportModel>
43 this->nut_ = this->Cmu_*
sqr(k_)/epsilon_;
44 this->nut_.correctBoundaryConditions();
49 template<
class BasicMomentumTransportModel>
65 template<
class BasicMomentumTransportModel>
203 this->runTime_.timeName(),
215 this->runTime_.timeName(),
223 if (type == typeName)
225 this->printCoeffs(type);
227 this->boundNormalStress(this->R_);
228 bound(epsilon_, this->epsilonMin_);
229 k_ = 0.5*
tr(this->R_);
236 template<
class BasicMomentumTransportModel>
241 Cmu_.readIfPresent(this->coeffDict());
242 C1_.readIfPresent(this->coeffDict());
243 C1s_.readIfPresent(this->coeffDict());
244 C2_.readIfPresent(this->coeffDict());
245 C3_.readIfPresent(this->coeffDict());
246 C3s_.readIfPresent(this->coeffDict());
247 C4_.readIfPresent(this->coeffDict());
248 C5_.readIfPresent(this->coeffDict());
250 Ceps1_.readIfPresent(this->coeffDict());
251 Ceps2_.readIfPresent(this->coeffDict());
252 Cs_.readIfPresent(this->coeffDict());
253 Ceps_.readIfPresent(this->coeffDict());
264 template<
class BasicMomentumTransportModel>
270 (Cs_*(this->k_/this->epsilon_))*this->R_ +
I*this->nu()
275 template<
class BasicMomentumTransportModel>
281 (Ceps_*(this->k_/this->epsilon_))*this->R_ +
I*this->nu()
286 template<
class BasicMomentumTransportModel>
289 if (!this->turbulence_)
315 epsilon_.boundaryFieldRef().updateCoeffs();
324 Ceps1_*alpha*rho*G*epsilon_/k_
325 -
fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
327 + fvModels.source(alpha, rho, epsilon_)
330 epsEqn.
ref().relax();
332 epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
335 bound(epsilon_, this->epsilonMin_);
346 if (isA<wallFvPatch>(curPatch))
353 G[celli]/(0.5*
mag(
tr(P[celli])) + small),
370 +
fvm::Sp(((C1_/2)*epsilon_ + (C1s_/2)*G)*alpha*rho/k_, R)
373 - ((1.0/3.0)*
I)*(((2.0 - C1_)*epsilon_ - C1s_*G)*alpha*rho)
377 (C3_ - C3s_*
mag(b))*
dev(S)
382 + fvModels.source(alpha, rho, R)
390 this->boundNormalStress(R);
397 this->correctWallShearStress(R);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
dimensionedTensor skew(const dimensionedTensor &dt)
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< symmTensor >> &)
Return a temporary field constructed from name,.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Generic dimensioned Type class.
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
BasicMomentumTransportModel::alphaField alphaField
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
SSG(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &type=typeName)
Construct from components.
Templated abstract base class for RAS turbulence models.
const dimensionSet dimTime
bool read(const char *, int32_t &)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
BasicMomentumTransportModel::transportModel transportModel
static const Identity< scalar > I
Foam::fvConstraints & fvConstraints
A class for handling words, derived from string.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/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 const labelUList & faceCells() const
Return faceCells.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const GeometricField< Type, fvPatchField, volMesh > &)
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor innerSqr(const dimensionedSymmTensor &dt)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
virtual bool read()
Read model coefficients if they have changed.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
BasicMomentumTransportModel::rhoField rhoField
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)
Finite volume constraints.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimVolume
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
virtual tmp< fvScalarMatrix > epsilonSource() const
Source term for the epsilon equation.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual void correctNut()
Update the eddy-viscosity.
Reynolds-stress turbulence model base class.