26 #include "kineticTheoryModel.H" 28 #include "twoPhaseSystem.H" 33 Foam::RASModels::kineticTheoryModel::kineticTheoryModel
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();
254 return tmp<volSymmTensorField>
278 tmp<volScalarField> tpPrime
281 *granularPressureModel_->granularPressureCoeffPrime
284 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
285 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
289 + frictionalStressModel_->frictionalPressurePrime
297 volScalarField::Boundary& bpPrime =
298 tpPrime.
ref().boundaryFieldRef();
302 if (!bpPrime[
patchi].coupled())
322 return tmp<volSymmTensorField>
369 refCast<const twoPhaseSystem>(phase_.fluid()).otherPhase(phase_).U();
375 tmp<volScalarField> tda(phase_.d());
378 tmp<volTensorField> tgradU(
fvc::grad(U_));
383 gs0_ = radialModel_->g0(alpha, alphaMinFriction_, alphaMax_);
388 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
393 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
398 rho*(2*nut_*D + (lambda_ - (2.0/3.0)*nut_)*
tr(D)*I)
406 *
max(
sqr(alpha), residualAlpha_)
407 *rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
413 refCast<const twoPhaseSystem>(phase_.fluid()).
Kd()
423 max(alpha, residualAlpha_)*rho
424 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
431 granularPressureModel_->granularPressureCoeff
441 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
459 -
fvm::SuSp((PsCoeff*I) && gradU, Theta_)
463 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
482 (sqrtPi/(3*(3.0 - e_)))
483 *(1 + 0.4*(1 + e_)*(3*e_ - 1)*alpha*gs0_)
484 +1.6*alpha*gs0_*(1 + e_)/sqrtPi
491 4*da*rho*(1 + e_)*alpha*gs0_/(3*sqrtPi) - 2*
K3/3.0
499 alpha/(alpha + residualAlpha_)
514 *(2*
K3*trD2 +
K2*tr2D)
520 /(2*
max(alpha, residualAlpha_)*
K4)
523 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
531 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
536 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
541 frictionalStressModel_->frictionalPressure
549 nuFric_ = frictionalStressModel_->nu
560 nuFric_ =
min(nuFric_, maxNut_ - nut_);
566 Info<< typeName <<
':' <<
nl 567 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl 568 <<
" 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)
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
const volScalarField Kd(fluid.Kd())
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
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.
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
const doubleScalar e
Elementary charge.
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.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.