26 #include "kineticTheoryModel.H" 28 #include "twoPhaseSystem.H" 32 Foam::RASModels::kineticTheoryModel::kineticTheoryModel
39 const transportModel& phase,
40 const word& propertiesName,
46 RASModel<EddyDiffusivity<ThermalDiffusivity
48 PhaseCompressibleTurbulenceModel<phaseModel>
66 kineticTheoryModels::viscosityModel::
New 73 kineticTheoryModels::conductivityModel::
New 80 kineticTheoryModels::radialModel::
New 85 granularPressureModel_
87 kineticTheoryModels::granularPressureModel::
New 92 frictionalStressModel_
94 kineticTheoryModels::frictionalStressModel::
New 100 equilibrium_(coeffDict_.
lookup(
"equilibrium")),
102 alphaMax_(
"alphaMax",
dimless, coeffDict_),
120 IOobject::groupName(
"Theta", phase.
name()),
133 IOobject::groupName(
"lambda", phase.
name()),
147 IOobject::groupName(
"gs0", phase.
name()),
161 IOobject::groupName(
"kappa", phase.
name()),
171 if (type == typeName)
192 RASModel<EddyDiffusivity<ThermalDiffusivity
194 PhaseCompressibleTurbulenceModel<phaseModel>
199 coeffDict().lookup(
"equilibrium") >> equilibrium_;
200 e_.readIfPresent(coeffDict());
201 alphaMax_.readIfPresent(coeffDict());
202 alphaMinFriction_.readIfPresent(coeffDict());
204 viscosityModel_->read();
205 conductivityModel_->read();
206 radialModel_->read();
207 granularPressureModel_->read();
208 frictionalStressModel_->read();
238 return tmp<volSymmTensorField>
262 tmp<volScalarField> tpPrime
265 *granularPressureModel_->granularPressureCoeffPrime
268 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
269 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
273 + frictionalStressModel_->frictionalPressurePrime
281 volScalarField::Boundary& bpPrime =
282 tpPrime.
ref().boundaryFieldRef();
286 if (!bpPrime[
patchi].coupled())
306 return tmp<volSymmTensorField>
353 refCast<const twoPhaseSystem>(phase_.fluid()).otherPhase(phase_).U();
359 tmp<volScalarField> tda(phase_.d());
362 tmp<volTensorField> tgradU(
fvc::grad(U_));
367 gs0_ = radialModel_->g0(alpha, alphaMinFriction_, alphaMax_);
372 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
377 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
382 rho*(2.0*nut_*D + (lambda_ - (2.0/3.0)*nut_)*
tr(D)*I)
390 *
max(
sqr(alpha), residualAlpha_)
391 *rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
397 refCast<const twoPhaseSystem>(phase_.fluid()).
drag(phase_).K()
407 max(alpha, residualAlpha_)*rho
408 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
415 granularPressureModel_->granularPressureCoeff
425 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
441 -
fvm::SuSp((PsCoeff*I) && gradU, Theta_)
445 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
461 (sqrtPi/(3.0*(3.0 - e_)))
462 *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha*gs0_)
463 +1.6*alpha*gs0_*(1.0 + e_)/sqrtPi
470 4.0*da*rho*(1.0 + e_)*alpha*gs0_/(3.0*sqrtPi) - 2.0*
K3/3.0
478 alpha/(alpha + residualAlpha_)
493 *(2.0*
K3*trD2 +
K2*tr2D)
499 /(2.0*
max(alpha, residualAlpha_)*
K4)
502 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
510 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
515 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
520 frictionalStressModel_->frictionalPressure
529 nut_ += frictionalStressModel_->nu
544 Info<< typeName <<
':' <<
nl 545 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl 546 <<
" 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.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
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.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
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
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)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
static const SymmTensor I
tmp< fvMatrix< Type > > SuSp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
void min(const dimensioned< Type > &)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
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)
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
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 bool read()
Re-read model coefficients if they have changed.
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.