40 template<
class BasicMomentumTransportModel>
51 const scalar Cpm = pm.
dict().
lookup<scalar>(C.name());
56 this->mesh_.cellZones()[cellZoneIDs[zonei]];
60 const label celli = cells[i];
68 template<
class BasicMomentumTransportModel>
80 const scalar Cpm = pm.
dict().
lookup<scalar>(C.name());
85 this->mesh_.cellZones()[cellZoneIDs[zonei]];
89 const label celli = cells[i];
90 C[celli] = Cpm*Sigma[celli];
97 template<
class BasicMomentumTransportModel>
105 if (isA<fv::explicitPorositySource>(fvOptions[i]))
108 refCast<const fv::explicitPorositySource>(fvOptions[i]);
110 if (isA<porosityModels::powerLawLopesdaCosta>(eps.
model()))
113 refCast<const porosityModels::powerLawLopesdaCosta>
118 setPorosityCoefficient(Cmu_, pm);
119 setPorosityCoefficient(C1_, pm);
120 setPorosityCoefficient(C2_, pm);
121 setPorosityCoefficient(sigmak_, pm);
122 setPorosityCoefficient(sigmaEps_, pm);
124 setCdSigma(CdSigma_, pm);
125 setPorosityCoefficient(betap_, pm);
126 setPorosityCoefficient(betad_, pm);
127 setPorosityCoefficient(C4_, pm);
128 setPorosityCoefficient(C5_, pm);
135 template<
class BasicMomentumTransportModel>
138 this->nut_ = Cmu_*
sqr(k_)/epsilon_;
139 this->nut_.correctBoundaryConditions();
144 template<
class BasicMomentumTransportModel>
151 return fvm::Su(CdSigma_*(betap_*magU3 - betad_*magU*k_()), k_);
155 template<
class BasicMomentumTransportModel>
166 *(C4_*betap_*epsilon_()/k_()*magU3 - C5_*betad_*magU*epsilon_()),
174 template<
class BasicMomentumTransportModel>
202 this->runTime_.timeName(),
218 this->runTime_.timeName(),
234 this->runTime_.timeName(),
250 this->runTime_.timeName(),
266 this->runTime_.timeName(),
283 this->runTime_.timeName(),
294 this->runTime_.timeName(),
305 this->runTime_.timeName(),
316 this->runTime_.timeName(),
327 this->runTime_.timeName(),
339 this->runTime_.timeName(),
351 this->runTime_.timeName(),
359 bound(k_, this->kMin_);
360 bound(epsilon_, this->epsilonMin_);
362 if (type == typeName)
364 this->printCoeffs(type);
367 setPorosityCoefficients();
373 template<
class BasicMomentumTransportModel>
387 template<
class BasicMomentumTransportModel>
390 if (!this->turbulence_)
414 nut.
v()*(
dev(
twoSymm(tgradU().v())) && tgradU().v())
419 epsilon_.boundaryFieldRef().updateCoeffs();
434 + epsilonSource(magU, magU3)
438 epsEqn.
ref().relax();
440 epsEqn.
ref().boundaryManipulate(epsilon_.boundaryFieldRef());
443 bound(epsilon_, this->epsilonMin_);
455 + kSource(magU, magU3)
463 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.
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)
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)
BasicMomentumTransportModel::transportModel transportModel
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
optionList(const fvMesh &mesh)
Construct null.
void setCdSigma(volScalarField::Internal &C, const porosityModels::powerLawLopesdaCosta &pm)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
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(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-8/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()
BasicMomentumTransportModel::rhoField rhoField
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)
kEpsilonLopesdaCosta(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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
void setPorosityCoefficients()
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Explicit porosity source.
const dimensionedScalar & G
Newtonian constant of gravitation.
BasicMomentumTransportModel::alphaField alphaField
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.