40 template<
class BasicTurbulenceModel>
56 this->mesh_.cellZones()[cellZoneIDs[zonei]];
60 const label celli = cells[i];
68 template<
class BasicTurbulenceModel>
85 this->mesh_.cellZones()[cellZoneIDs[zonei]];
89 const label celli = cells[i];
90 C[celli] = Cpm*Sigma[celli];
97 template<
class BasicTurbulenceModel>
104 if (isA<fv::explicitPorositySource>(fvOptions[i]))
107 refCast<const fv::explicitPorositySource>(fvOptions[i]);
109 if (isA<porosityModels::powerLawLopesdaCosta>(eps.
model()))
112 refCast<const porosityModels::powerLawLopesdaCosta>
117 setPorosityCoefficient(Cmu_, pm);
118 setPorosityCoefficient(C1_, pm);
119 setPorosityCoefficient(C2_, pm);
120 setPorosityCoefficient(sigmak_, pm);
121 setPorosityCoefficient(sigmaEps_, pm);
123 setCdSigma(CdSigma_, pm);
124 setPorosityCoefficient(betap_, pm);
125 setPorosityCoefficient(betad_, pm);
126 setPorosityCoefficient(C4_, pm);
127 setPorosityCoefficient(C5_, pm);
134 template<
class BasicTurbulenceModel>
137 this->nut_ = Cmu_*
sqr(k_)/epsilon_;
138 this->nut_.correctBoundaryConditions();
141 BasicTurbulenceModel::correctNut();
145 template<
class BasicTurbulenceModel>
152 return fvm::Su(CdSigma_*(betap_*magU3 - betad_*magU*k_()), k_);
156 template<
class BasicTurbulenceModel>
167 *(C4_*betap_*epsilon_()/k_()*magU3 - C5_*betad_*magU*epsilon_()),
175 template<
class BasicTurbulenceModel>
184 const word& propertiesName,
205 this->runTime_.timeName(),
221 this->runTime_.timeName(),
237 this->runTime_.timeName(),
253 this->runTime_.timeName(),
269 this->runTime_.timeName(),
286 this->runTime_.timeName(),
297 this->runTime_.timeName(),
308 this->runTime_.timeName(),
319 this->runTime_.timeName(),
330 this->runTime_.timeName(),
342 this->runTime_.timeName(),
354 this->runTime_.timeName(),
362 bound(k_, this->kMin_);
363 bound(epsilon_, this->epsilonMin_);
365 if (type == typeName)
367 this->printCoeffs(type);
370 setPorosityCoefficients();
376 template<
class BasicTurbulenceModel>
390 template<
class BasicTurbulenceModel>
393 if (!this->turbulence_)
417 nut.
v()*(
dev(
twoSymm(tgradU().v())) && tgradU().v())
422 epsilon_.boundaryFieldRef().updateCoeffs();
437 + epsilonSource(magU, magU3)
441 epsEqn.
ref().relax();
443 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
446 bound(epsilon_, this->epsilonMin_);
458 + kSource(magU, magU3)
466 bound(k_, this->kMin_);
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
void setPorosityCoefficient(volScalarField::Internal &C, const porosityModels::powerLawLopesdaCosta &pm)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void clear() const
If object pointer points to valid object:
Variant of the power law porosity model with spatially varying drag coefficient.
const dictionary & dict() const
Return dictionary used for model construction.
const scalarField & Sigma() const
Return the porosity surface area per unit volume zone field.
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
const dimensionedScalar G
Newtonian constant of gravitation.
tmp< fvMatrix< Type > > Su(const DimensionedField< Type, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
BasicTurbulenceModel::rhoField rhoField
virtual tmp< fvScalarMatrix > kSource(const volScalarField::Internal &magU, const volScalarField::Internal &magU3) const
Generic dimensioned Type class.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual bool read()
Re-read model coefficients if they have changed.
Eddy viscosity turbulence model base class.
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
const labelList & cellZoneIDs() const
Return const access to the cell zone IDs.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Templated abstract base class for RAS turbulence models.
const porosityModel & model() const
virtual tmp< fvScalarMatrix > epsilonSource(const volScalarField::Internal &magU, const volScalarField::Internal &magU3) const
bool read(const char *, int32_t &)
const Internal & v() const
Return a const-reference to the dimensioned internal field.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
A class for handling words, derived from string.
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
static word groupName(Name name, const word &group)
void setCdSigma(volScalarField::Internal &C, const porosityModels::powerLawLopesdaCosta &pm)
BasicTurbulenceModel::transportModel transportModel
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
virtual void correctNut()
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.
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/ubuntu/OpenFOAM-6/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()
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
dimensionedScalar pow3(const dimensionedScalar &ds)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
void setPorosityCoefficients()
Variant of the standard k-epsilon turbulence model with additional source terms to handle the changes...
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
BasicTurbulenceModel::alphaField alphaField
Explicit porosity source.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
optionList(const optionList &)
Disallow default bitwise copy construct.