Go to the documentation of this file.
29 #include "kineticTheoryModel.H"
31 #include "twoPhaseSystem.H"
36 Foam::RASModels::kineticTheoryModel::kineticTheoryModel
43 const transportModel& phase,
44 const word& propertiesName,
67 kineticTheoryModels::viscosityModel::
New
74 kineticTheoryModels::conductivityModel::
New
81 kineticTheoryModels::radialModel::
New
86 granularPressureModel_
88 kineticTheoryModels::granularPressureModel::
New
93 frictionalStressModel_
95 kineticTheoryModels::frictionalStressModel::
New
101 equilibrium_(coeffDict_.get<
bool>(
"equilibrium")),
103 alphaMax_(
"alphaMax",
dimless, coeffDict_),
104 alphaMinFriction_(
"alphaMinFriction",
dimless, coeffDict_),
105 residualAlpha_(
"residualAlpha",
dimless, coeffDict_),
112 IOobject::groupName(
"Theta", phase.
name()),
125 IOobject::groupName(
"lambda", phase.
name()),
139 IOobject::groupName(
"gs0", phase.
name()),
153 IOobject::groupName(
"kappa", phase.
name()),
167 IOobject::groupName(
"nuFric", phase.
name()),
177 if (
type == typeName)
198 RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
202 coeffDict().readEntry(
"equilibrium", equilibrium_);
203 e_.readIfPresent(coeffDict());
204 alphaMax_.readIfPresent(coeffDict());
205 alphaMinFriction_.readIfPresent(coeffDict());
207 viscosityModel_->read();
208 conductivityModel_->read();
209 radialModel_->read();
210 granularPressureModel_->read();
211 frictionalStressModel_->read();
247 return tmp<volSymmTensorField>
271 tmp<volScalarField> tpPrime
274 *granularPressureModel_->granularPressureCoeffPrime
277 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
278 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
282 + frictionalStressModel_->frictionalPressurePrime
290 volScalarField::Boundary& bpPrime =
291 tpPrime.ref().boundaryFieldRef();
295 if (!bpPrime[patchi].coupled())
297 bpPrime[patchi] == 0;
315 return tmp<volSymmTensorField>
357 const twoPhaseSystem&
fluid = refCast<const twoPhaseSystem>(phase_.fluid());
368 tmp<volScalarField> tda(phase_.d());
371 tmp<volTensorField> tgradU(
fvc::grad(U_));
376 gs0_ = radialModel_->g0(
alpha, alphaMinFriction_, alphaMax_);
381 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
386 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
391 rho*(2.0*nut_*
D + (lambda_ - (2.0/3.0)*nut_)*
tr(
D)*
I)
400 *
rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
406 fluid.lookupSubModel<dragModel>
409 fluid.otherPhase(phase_)
421 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
428 granularPressureModel_->granularPressureCoeff
438 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
460 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
479 (sqrtPi/(3.0*(3.0 - e_)))
480 *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*
alpha*gs0_)
481 +1.6*
alpha*gs0_*(1.0 + e_)/sqrtPi
488 4.0*da*
rho*(1.0 + e_)*
alpha*gs0_/(3.0*sqrtPi) - 2.0*
K3/3.0
511 *(2.0*
K3*trD2 +
K2*tr2D)
520 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
528 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
533 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
538 frictionalStressModel_->frictionalPressure
546 nuFric_ = frictionalStressModel_->nu
557 nuFric_ =
min(nuFric_, maxNut_ - nut_);
563 Info<< typeName <<
':' <<
nl
564 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl
565 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
int debug
Static debugging option.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
virtual bool read()
Re-read model coefficients if they have changed.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
A class for managing temporary objects.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
static constexpr const zero Zero
Global zero (0)
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
bool read(const char *buf, int32_t &val)
Same as readInt32.
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
CGAL::Exact_predicates_exact_constructions_kernel K
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
fvMatrix< scalar > fvScalarMatrix
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
messageStream Info
Information stream (uses stdout - output is on the master only)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static const SymmTensor I
word name(const complex &c)
Return string representation of complex.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimViscosity
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.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
virtual ~kineticTheoryModel()
Destructor.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
constexpr scalar pi(M_PI)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensionedScalar sqrt(const dimensionedScalar &ds)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionedScalar & D
virtual void printCoeffs(const word &type)
Print model coefficients.
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
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.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
static const Identity< scalar > I
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)