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()),
116 IOobject::AUTO_WRITE,
126 IOobject::groupName(
"lambda", phase.
name()),
140 IOobject::groupName(
"gs0", phase.
name()),
154 IOobject::groupName(
"kappa", phase.
name()),
168 IOobject::groupName(
"nuFric", phase.
name()),
172 IOobject::AUTO_WRITE,
179 if (
type == typeName)
200 RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
204 coeffDict().readEntry(
"equilibrium", equilibrium_);
205 e_.readIfPresent(coeffDict());
206 alphaMax_.readIfPresent(coeffDict());
207 alphaMinFriction_.readIfPresent(coeffDict());
209 viscosityModel_->read();
210 conductivityModel_->read();
211 radialModel_->read();
212 granularPressureModel_->read();
213 frictionalStressModel_->read();
266 tmp<volScalarField> tpPrime
269 *granularPressureModel_->granularPressureCoeffPrime
272 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
273 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
277 + frictionalStressModel_->frictionalPressurePrime
286 tpPrime.ref().boundaryFieldRef();
290 if (!bpPrime[patchi].
coupled())
292 bpPrime[patchi] == 0;
310 return devRhoReff(U_);
355 const twoPhaseSystem&
fluid = refCast<const twoPhaseSystem>(phase_.fluid());
366 tmp<volScalarField> tda(phase_.d());
369 tmp<volTensorField> tgradU(
fvc::grad(U_));
374 gs0_ = radialModel_->g0(
alpha, alphaMinFriction_, alphaMax_);
379 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
384 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
389 rho*(2.0*nut_*
D + (lambda_ - (2.0/3.0)*nut_)*
tr(
D)*
I)
398 *
rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
404 fluid.lookupSubModel<dragModel>
407 fluid.otherPhase(phase_)
419 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
426 granularPressureModel_->granularPressureCoeff
436 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
458 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
477 (sqrtPi/(3.0*(3.0 - e_)))
478 *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*
alpha*gs0_)
479 +1.6*
alpha*gs0_*(1.0 + e_)/sqrtPi
486 4.0*da*
rho*(1.0 + e_)*
alpha*gs0_/(3.0*sqrtPi) - 2.0*
K3/3.0
509 *(2.0*
K3*trD2 +
K2*tr2D)
518 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
521 Theta_.clamp_range(0, 100);
525 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
530 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi;
535 frictionalStressModel_->frictionalPressure
543 nuFric_ = frictionalStressModel_->nu
555 nuFric_ =
min(nuFric_, maxNut_ - nut_);
561 Info<< typeName <<
':' <<
nl 562 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl 563 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
fvMatrix< scalar > fvScalarMatrix
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
constexpr char nl
The newline '\n' character (0x0a)
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
const dimensionSet dimViscosity
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
const dimensionSet dimless
Dimensionless.
GeometricField< vector, fvPatchField, volMesh > volVectorField
CGAL::Exact_predicates_exact_constructions_kernel K
virtual bool read()
Re-read model coefficients if they have changed.
bool read(const char *buf, int32_t &val)
Same as readInt32.
#define forAll(list, i)
Loop across all elements in list.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual ~kineticTheoryModel()
Destructor.
static const SymmTensor I
static const Identity< scalar > I
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
constexpr scalar pi(M_PI)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
virtual void printCoeffs(const word &type)
Print model coefficients.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< symmTensor >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
int debug
Static debugging option.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
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.
void clamp_max(const Type &upper)
Impose upper (ceiling) clamp on the field values (in-place)
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
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)
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
const dimensionedScalar & D
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Do not request registration (bool: false)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
static constexpr const zero Zero
Global zero (0)