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>
166 const viscosity& viscosity,
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>
352 <<
"Turbulence specific dissipation rate not defined for " 353 <<
"Spalart-Allmaras model. Returning zero field" 365 template<
class BasicMomentumTransportModel>
368 if (!this->turbulence_)
397 Cb1_*
alpha()*
rho()*Stilda*nuTilda_()
399 + fvModels.source(alpha, rho, nuTilda_)
402 nuTildaEqn.
ref().relax();
403 fvConstraints.
constrain(nuTildaEqn.ref());
407 nuTilda_.correctBoundaryConditions();
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/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()
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.
const dimensionSet dimless
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
const dimensionSet dimTime
Dimension set for the base types.
bool read(const char *, int32_t &)
Foam::fvConstraints & fvConstraints
A class for handling words, derived from string.
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, simple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Reading field pa\"<< endl;volScalarField pa(IOobject("pa", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Ua\"<< endl;volVectorField Ua(IOobject("Ua", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);# 65 "/home/ubuntu/OpenFOAM-10/applications/solvers/incompressible/adjointShapeOptimisationFoam/createFields.H" 2label paRefCell=0;scalar paRefValue=0.0;setRefCell(pa, simple.dict(), paRefCell, paRefValue);mesh.schemes().setFluxRequired(pa.name());autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
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)
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
virtual void correctNut()
Foam::fvModels & fvModels
SpalartAllmaras(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
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...