41 template<
class BasicMomentumTransportModel>
48 template<
class BasicMomentumTransportModel>
59 template<
class BasicMomentumTransportModel>
69 1.0 - chi/(1.0 + chi*fv1)
74 template<
class BasicMomentumTransportModel>
95 + fv2(chi, fv1)*nuTilda_/
sqr(kappa_*y_),
103 template<
class BasicMomentumTransportModel>
137 template<
class BasicMomentumTransportModel>
143 this->nut_ = nuTilda_*fv1;
149 template<
class BasicMomentumTransportModel>
152 correctNut(fv1(this->chi()));
158 template<
class BasicMomentumTransportModel>
218 Cw1_(Cb1_/
sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_),
261 this->runTime_.timeName(),
271 if (type == typeName)
273 this->printCoeffs(type);
280 template<
class BasicMomentumTransportModel>
285 sigmaNut_.readIfPresent(this->coeffDict());
286 kappa_.readIfPresent(this->coeffDict());
288 Cb1_.readIfPresent(this->coeffDict());
289 Cb2_.readIfPresent(this->coeffDict());
290 Cw1_ = Cb1_/
sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_;
292 Cw3_.readIfPresent(this->coeffDict());
293 Cv1_.readIfPresent(this->coeffDict());
294 Cs_.readIfPresent(this->coeffDict());
305 template<
class BasicMomentumTransportModel>
312 (nuTilda_ + this->nu())/sigmaNut_
317 template<
class BasicMomentumTransportModel>
329 template<
class BasicMomentumTransportModel>
334 <<
"Turbulence kinetic energy dissipation rate not defined for " 335 <<
"Spalart-Allmaras model. Returning zero field" 347 template<
class BasicMomentumTransportModel>
350 if (!this->turbulence_)
379 Cb1_*
alpha()*
rho()*Stilda*nuTilda_()
381 + fvModels.source(alpha, rho, nuTilda_)
384 nuTildaEqn.
ref().relax();
385 fvConstraints.
constrain(nuTildaEqn.ref());
389 nuTilda_.correctBoundaryConditions();
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedTensor skew(const dimensionedTensor &dt)
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< volScalarField::Internal > fw(const volScalarField::Internal &Stilda) const
bool readIfPresent(const dictionary &)
Update the value of dimensioned<Type> if found in the dictionary.
Generic dimensioned Type class.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
Eddy viscosity turbulence model base class.
tmp< volScalarField > chi() const
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
BasicMomentumTransportModel::alphaField alphaField
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Templated abstract base class for RAS turbulence models.
tmp< volScalarField::Internal > Stilda(const volScalarField::Internal &chi, const volScalarField::Internal &fv1) const
SpalartAllmaras(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.
Dimension set for the base types.
bool read(const char *, int32_t &)
BasicMomentumTransportModel::transportModel transportModel
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()
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< volScalarField > DnuTildaEff() const
Return the effective diffusivity for nuTilda.
virtual bool read()
Read RASProperties dictionary.
tmp< volScalarField::Internal > fv2(const volScalarField::Internal &chi, const volScalarField::Internal &fv1) const
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
static wallDist & New(fvMesh &mesh)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
virtual void correctNut()
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
BasicMomentumTransportModel::rhoField rhoField
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
#define WarningInFunction
Report a warning using Foam::Warning.
Finite volume constraints.
tmp< volScalarField > fv1(const volScalarField &chi) const
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
void correctBoundaryConditions()
Correct boundary field.
dimensionedScalar pow6(const dimensionedScalar &ds)
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.
const dimensionedVector & g
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...