26 #include "kineticTheoryModel.H" 28 #include "twoPhaseSystem.H" 40 const transportModel& phase,
41 const word& propertiesName,
64 kineticTheoryModels::viscosityModel::
New 71 kineticTheoryModels::conductivityModel::
New 78 kineticTheoryModels::radialModel::
New 83 granularPressureModel_
85 kineticTheoryModels::granularPressureModel::
New 90 frictionalStressModel_
92 kineticTheoryModels::frictionalStressModel::
New 98 equilibrium_(coeffDict_.
lookup(
"equilibrium")),
100 alphaMax_(
"alphaMax",
dimless, coeffDict_),
117 dimensionSet(0,2,-1,0,0),
118 coeffDict_.lookupOrDefault<scalar>(
"maxNut",1000)
125 IOobject::groupName(
"Theta", phase.
name()),
138 IOobject::groupName(
"lambda", phase.
name()),
152 IOobject::groupName(
"gs0", phase.
name()),
166 IOobject::groupName(
"kappa", phase.
name()),
180 IOobject::groupName(
"nuFric", phase.
name()),
190 if (type == typeName)
211 RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
215 coeffDict().lookup(
"equilibrium") >> equilibrium_;
216 e_.readIfPresent(coeffDict());
217 alphaMax_.readIfPresent(coeffDict());
218 alphaMinFriction_.readIfPresent(coeffDict());
220 viscosityModel_->read();
221 conductivityModel_->read();
222 radialModel_->read();
223 granularPressureModel_->read();
224 frictionalStressModel_->read();
268 tmp<volScalarField> tpPrime
271 *granularPressureModel_->granularPressureCoeffPrime
274 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
275 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
279 + frictionalStressModel_->frictionalPressurePrime
287 volScalarField::Boundary& bpPrime =
288 tpPrime.
ref().boundaryFieldRef();
292 if (!bpPrime[
patchi].coupled())
344 const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(phase_.fluid());
355 tmp<volScalarField> tda(phase_.d());
358 tmp<volTensorField> tgradU(
fvc::grad(U_));
363 gs0_ = radialModel_->g0(alpha, alphaMinFriction_, alphaMax_);
368 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
373 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
378 rho*(2.0*nut_*D + (lambda_ - (2.0/3.0)*nut_)*
tr(D)*I)
386 *
max(
sqr(alpha), residualAlpha_)
387 *rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
393 fluid.lookupSubModel<dragModel>
396 fluid.otherPhase(phase_)
407 max(alpha, residualAlpha_)*rho
408 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
415 granularPressureModel_->granularPressureCoeff
425 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
443 -
fvm::SuSp((PsCoeff*I) && gradU, Theta_)
447 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
466 (sqrtPi/(3.0*(3.0 - e_)))
467 *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha*gs0_)
468 +1.6*alpha*gs0_*(1.0 + e_)/sqrtPi
475 4.0*da*rho*(1.0 + e_)*alpha*gs0_/(3.0*sqrtPi) - 2.0*
K3/3.0
483 alpha/(alpha + residualAlpha_)
498 *(2.0*
K3*trD2 +
K2*tr2D)
504 /(2.0*
max(alpha, residualAlpha_)*
K4)
507 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
515 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
520 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
525 frictionalStressModel_->frictionalPressure
533 nuFric_ = frictionalStressModel_->nu
544 nuFric_ =
min(nuFric_, maxNut_ - nut_);
550 Info<< typeName <<
':' <<
nl 551 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl 552 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
kineticTheoryModel(const volScalarField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const phaseModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
Construct from components.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
GeometricField< vector, fvPatchField, volMesh > volVectorField
CGAL::Exact_predicates_exact_constructions_kernel K
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, const Mesh &, const dimensionSet &, const word &patchFieldType=fvPatchField< symmTensor >::calculatedType())
Return a temporary field constructed from name, mesh, dimensionSet.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
static const SymmTensor I
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
void min(const dimensioned< Type > &)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
virtual ~kineticTheoryModel()
Destructor.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
word name(const complex &)
Return a string representation of a complex.
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.
Internal & ref()
Return a reference to the dimensioned internal field.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
virtual bool read()
Re-read model coefficients if they have changed.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
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.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.