32#include "twoPhaseSystem.H"
34#include "virtualMassModel.H"
48template<
class BasicTurbulenceModel>
57 const word& propertiesName,
73 liquidTurbulencePtr_(nullptr),
143 IOobject::groupName(
"k", alphaRhoPhi.group()),
155 IOobject::groupName(
"epsilon", alphaRhoPhi.group()),
167 if (
type == typeName)
169 this->printCoeffs(
type);
174template<
class BasicTurbulenceModel>
186 if (isA<fixedValueFvPatchScalarField>(ebf[patchi]))
188 ebt[patchi] = fixedValueFvPatchScalarField::typeName;
196template<
class BasicTurbulenceModel>
211 isA<inletOutletFvPatchScalarField>(bf[patchi])
212 && isA<inletOutletFvPatchScalarField>(refBf[patchi])
215 refCast<inletOutletFvPatchScalarField>
216 (bf[patchi]).refValue() =
217 refCast<const inletOutletFvPatchScalarField>
218 (refBf[patchi]).refValue();
224template<
class BasicTurbulenceModel>
240 this->runTime_.timeName(this->runTime_.startTime().value())
291 correctInletOutlet(km_(), kl);
305 mix(epsilonl, epsilong),
306 epsilonBoundaryTypes(epsilonl)
309 correctInletOutlet(epsilonm_(), epsilonl);
315template<
class BasicTurbulenceModel>
320 Cmu_.readIfPresent(this->coeffDict());
321 C1_.readIfPresent(this->coeffDict());
322 C2_.readIfPresent(this->coeffDict());
323 C3_.readIfPresent(this->coeffDict());
324 Cp_.readIfPresent(this->coeffDict());
325 sigmak_.readIfPresent(this->coeffDict());
326 sigmaEps_.readIfPresent(this->coeffDict());
335template<
class BasicTurbulenceModel>
338 this->nut_ = Cmu_*
sqr(k_)/epsilon_;
339 this->nut_.correctBoundaryConditions();
342 BasicTurbulenceModel::correctNut();
346template<
class BasicTurbulenceModel>
350 if (!liquidTurbulencePtr_)
356 refCast<const twoPhaseSystem>(gas.fluid());
359 liquidTurbulencePtr_ =
373 return *liquidTurbulencePtr_;
377template<
class BasicTurbulenceModel>
381 this->liquidTurbulence();
393 (6*this->Cmu_/(4*
sqrt(3.0/2.0)))
395 *(liquidTurbulence.
k_/liquidTurbulence.
epsilon_)
398 volScalarField fAlphad((180 + (-4.71e3 + 4.26e4*alphag)*alphag)*alphag);
400 return sqr(1 + (Ct0 - 1)*
exp(-fAlphad));
404template<
class BasicTurbulenceModel>
409 return fluid.otherPhase(gas).rho();
413template<
class BasicTurbulenceModel>
422 + virtualMass.
Cvm()*
fluid.otherPhase(gas).rho();
426template<
class BasicTurbulenceModel>
432 return alphal*rholEff() + alphag*rhogEff();
436template<
class BasicTurbulenceModel>
446 return (
alphal*rholEff()*fc + alphag*rhogEff()*fd)/rhom_();
450template<
class BasicTurbulenceModel>
461 (
alphal*rholEff()*fc + alphag*rhogEff()*Ct2_()*fd)
462 /(
alphal*rholEff() + alphag*rhogEff()*Ct2_());
466template<
class BasicTurbulenceModel>
488template<
class BasicTurbulenceModel>
492 this->liquidTurbulence();
526template<
class BasicTurbulenceModel>
529 return fvm::Su(bubbleG()/rhom_(), km_());
533template<
class BasicTurbulenceModel>
536 return fvm::Su(C3_*epsilonm_()*bubbleG()/(rhom_()*km_()), epsilonm_());
540template<
class BasicTurbulenceModel>
547 if (&gas != &
fluid.phase1())
551 this->liquidTurbulence();
556 if (!this->turbulence_)
574 this->liquidTurbulence();
655 bound(km, this->kMin_);
656 epsilonm == mix(epsilonl, epsilong);
657 bound(epsilonm, this->epsilonMin_);
668 -
fvm::SuSp(((2.0/3.0)*C1_)*divUm, epsilonm)
669 -
fvm::Sp(C2_*epsilonm/km, epsilonm)
674 epsEqn.
ref().relax();
679 bound(epsilonm, this->epsilonMin_);
701 bound(km, this->kMin_);
707 epsilonl = Cc2*epsilonm;
714 epsilong = Ct2_()*epsilonl;
716 nutg = Ct2_()*(liquidTurbulence.nu()/this->
nu())*nutl;
Bound the given scalar field if it has gone unbounded.
wordList types() const
Return a list of the patch types.
void updateCoeffs()
Update the boundary condition coefficients.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Templated abstract base class for RAS turbulence models.
Mixture k-epsilon turbulence model for two-phase gas-liquid systems.
BasicTurbulenceModel::alphaField alphaField
virtual tmp< fvScalarMatrix > epsilonSource() const
BasicTurbulenceModel::rhoField rhoField
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
void correctInletOutlet(volScalarField &vsf, const volScalarField &refVsf) const
virtual void correctNut()
virtual tmp< fvScalarMatrix > kSource() const
BasicTurbulenceModel::transportModel transportModel
tmp< surfaceScalarField > mixFlux(const surfaceScalarField &fc, const surfaceScalarField &fd) const
wordList epsilonBoundaryTypes(const volScalarField &epsilon) const
tmp< volScalarField > rholEff() const
tmp< volScalarField > mix(const volScalarField &fc, const volScalarField &fd) const
virtual bool read()
Re-read model coefficients if they have changed.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
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].
A class for managing temporary objects.
void clear() const noexcept
Base-class for all transport models used by the incompressible turbulence models.
static const word propertiesName
Default name of the turbulence properties dictionary.
Class which solves the volume fraction equations for two phases.
virtual tmp< volScalarField > Cvm() const =0
Return the virtual mass coefficient.
A class for handling words, derived from Foam::string.
surfaceScalarField phig("phig", -rhorAUf *ghf *fvc::snGrad(rho) *mesh.magSf())
Calculate the finiteVolume matrix for implicit and explicit sources.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given relative flux in absolute form.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
zeroField Su(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar exp(const dimensionedScalar &ds)
bool read(const char *buf, int32_t &val)
Same as readInt32.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
volScalarField & bound(volScalarField &, const dimensionedScalar &lowerBound)
Bound the given scalar field if it has gone unbounded.
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Info<< "Reading strained laminar flame speed field Su\n"<< endl;volScalarField Su(IOobject("Su", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field betav\n"<< endl;volScalarField betav(IOobject("betav", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field Lobs\n"<< endl;volScalarField Lobs(IOobject("Lobs", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field CT\n"<< endl;volSymmTensorField CT(IOobject("CT", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field Nv\n"<< endl;volScalarField Nv(IOobject("Nv", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);Info<< "Reading field nsv\n"<< endl;volSymmTensorField nsv(IOobject("nsv", mesh.facesInstance(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE), mesh);IOdictionary PDRProperties(IOobject("PDRProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));autoPtr< PDRDragModel > drag
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.