48 template<
class BasicMomentumTransportModel>
57 Cmu_*
sqr(k_)/(this->nutMaxCoeff_*Cc2*this->nu())
62 template<
class BasicMomentumTransportModel>
65 this->nut_ = Cmu_*
sqr(k_)/epsilon_;
66 this->nut_.correctBoundaryConditions();
73 template<
class BasicMomentumTransportModel>
96 gasTurbulencePtr_(nullptr),
98 Cmu_(
"Cmu", this->coeffDict(), 0.09),
99 C1_(
"C1", this->coeffDict(), 1.44),
100 C2_(
"C2", this->coeffDict(), 1.92),
101 C3_(
"C3", this->coeffDict(), C2_.value()),
102 Cp_(
"Cp", this->coeffDict(), 0.25),
103 alphap_(
"alphap", this->coeffDict(), 1),
104 sigmak_(
"sigmak", this->coeffDict(), 1.0),
105 sigmaEps_(
"sigmaEps", this->coeffDict(), 1.3),
111 this->groupName(
"k"),
112 this->runTime_.
name(),
123 this->groupName(
"epsilon"),
124 this->runTime_.
name(),
134 const phaseModel& phase = refCast<const phaseModel>(this->properties());
137 if (phase.
index() == 1)
146 this->runTime_.name(),
162 this->runTime_.name(),
178 this->runTime_.name(),
195 this->runTime_.name(),
208 template<
class BasicMomentumTransportModel>
211 static bool initialised =
false;
224 template<
class BasicMomentumTransportModel>
229 Cmu_.readIfPresent(this->coeffDict());
230 C1_.readIfPresent(this->coeffDict());
231 C2_.readIfPresent(this->coeffDict());
232 C3_.readIfPresent(this->coeffDict());
233 Cp_.readIfPresent(this->coeffDict());
234 sigmak_.readIfPresent(this->coeffDict());
235 sigmaEps_.readIfPresent(this->coeffDict());
246 template<
class BasicMomentumTransportModel>
250 if (!gasTurbulencePtr_)
255 refCast<const phaseModel>(this->properties());
269 momentumTransportModel::typeName,
276 return *gasTurbulencePtr_;
280 template<
class BasicMomentumTransportModel>
284 this->gasTurbulence();
299 (6*this->Cmu_/(4*
sqrt(3.0/2.0)))
304 volScalarField fAlphad((180 + (-4.71e3 + 4.26e4*alphag)*alphag)*alphag);
306 return sqr(1 + (Ct0 - 1)*
exp(-fAlphad));
310 template<
class BasicMomentumTransportModel>
319 template<
class BasicMomentumTransportModel>
336 template<
class BasicMomentumTransportModel>
342 return alphal*rholEff() + alphag*rhogEff();
346 template<
class BasicMomentumTransportModel>
356 return (alphal*rholEff()*fc + alphag*rhogEff()*fd)/rhom_();
360 template<
class BasicMomentumTransportModel>
371 (alphal*rholEff()*fc + alphag*rhogEff()*Ct2_()*fd)
372 /(alphal*rholEff() + alphag*rhogEff()*Ct2_());
376 template<
class BasicMomentumTransportModel>
398 template<
class BasicMomentumTransportModel>
403 this->gasTurbulence();
439 template<
class BasicMomentumTransportModel>
443 return fvm::Su(bubbleG()/rhom_(), km_());
447 template<
class BasicMomentumTransportModel>
451 return fvm::Su(C3_*epsilonm_()*bubbleG()/(rhom_()*km_()), epsilonm_());
455 template<
class BasicMomentumTransportModel>
458 const phaseModel& phase = refCast<const phaseModel>(this->properties());
461 if (phase.
index() == 0)
465 this->gasTurbulence();
474 if (!this->turbulence_)
489 this->gasTurbulence();
574 epsilonm == mix(epsilonl, epsilong);
585 -
fvm::SuSp(((2.0/3.0)*C1_)*divUm, epsilonm)
586 -
fvm::Sp(C2_*epsilonm/km, epsilonm)
591 epsEqn.
ref().relax();
597 const volScalarField Cc2(rhom/(alphal*rholEff() + alphag*rhogEff()*Ct2_()));
619 bound(km, this->kMin_);
625 epsilonl = Cc2*epsilonm;
632 epsilong = Ct2_()*epsilonl;
634 nutg = Ct2_()*(this->nu()/gasTurbulence.nu())*nutl;
Bound the given scalar field where it is below the specified minimum.
void updateCoeffs()
Update the boundary condition coefficients.
Generic GeometricField class.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static word groupName(Name name, const word &group)
Templated abstract base class for RAS turbulence models.
Mixture k-epsilon turbulence model for two-phase gas-liquid systems.
virtual tmp< fvScalarMatrix > epsilonSource() const
tmp< volScalarField > Ct2() const
tmp< volScalarField > rhogEff() const
tmp< volScalarField > mixU(const volScalarField &fc, const volScalarField &fd) const
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
tmp< volScalarField > rhom() const
tmp< volScalarField > bubbleG() const
autoPtr< volScalarField > rhom_
autoPtr< volScalarField > km_
autoPtr< volScalarField > Ct2_
virtual void correctNut()
Correct the eddy-viscosity nut.
virtual tmp< fvScalarMatrix > kSource() const
tmp< surfaceScalarField > mixFlux(const surfaceScalarField &fc, const surfaceScalarField &fd) const
tmp< volScalarField > rholEff() const
autoPtr< volScalarField > epsilonm_
tmp< volScalarField > mix(const volScalarField &fc, const volScalarField &fd) const
void boundEpsilonm(const volScalarField &Cc2)
Bound epsilonm.
virtual bool read()
Re-read model coefficients if they have changed.
mixtureKEpsilon(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.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Class to represent a interface between phases where one phase is considered dispersed within the othe...
Base class for Lagrangian drag models.
Eddy viscosity turbulence model base class.
Finite volume constraints.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::rhoField rhoField
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
tmp< volScalarField > d() const
Return the Sauter-mean diameter.
label index() const
Return the index of the phase.
const word & name() const
Return the name of this phase.
virtual const volScalarField & rho() const =0
Return the density field.
Class to represent a system of phases.
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument in a two-phase system.
const ModelType & lookupInterfacialModel(const phaseInterface &interface) const
Return a sub model for an interface.
A class for managing temporary objects.
void clear() const
If object pointer points to valid object:
T & ref() const
Return non-const reference or generate a fatal error.
virtual tmp< volScalarField > Cvm() const =0
Return the virtual mass coefficient.
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp)
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > Su(const DimensionedField< Type, volMesh > &, const VolField< Type > &)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
bool read(const char *, int32_t &)
void dev(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void twoSymm(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
const dimensionSet dimless
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimDensity
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
bool bound(volScalarField &, const dimensionedScalar &min)
Bound the given scalar field where it is below the specified min value.
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.