31#include "twoPhaseSystem.H"
36Foam::RASModels::kineticTheoryModel::kineticTheoryModel
38 const volScalarField&
alpha,
39 const volScalarField&
rho,
40 const volVectorField&
U,
41 const surfaceScalarField& alphaRhoPhi,
42 const surfaceScalarField&
phi,
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,
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();
270 *granularPressureModel_->granularPressureCoeffPrime
273 radialModel_->g0(alpha_, alphaMinFriction_, alphaMax_),
274 radialModel_->g0prime(alpha_, alphaMinFriction_, alphaMax_),
278 + frictionalStressModel_->frictionalPressurePrime
287 tpPrime.ref().boundaryFieldRef();
291 if (!bpPrime[patchi].
coupled())
293 bpPrime[patchi] == 0;
377 gs0_ = radialModel_->g0(
alpha, alphaMinFriction_, alphaMax_);
382 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
387 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
392 rho*(2*nut_*
D + (lambda_ - (2.0/3.0)*nut_)*
tr(
D)*
I)
401 *
rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
418 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
425 granularPressureModel_->granularPressureCoeff
435 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
457 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
476 (sqrtPi/(3*(3.0 - e_)))
477 *(1 + 0.4*(1 + e_)*(3*e_ - 1)*
alpha*gs0_)
478 +1.6*
alpha*gs0_*(1 + e_)/sqrtPi
485 4*da*
rho*(1 + e_)*
alpha*gs0_/(3*sqrtPi) - 2*
K3/3.0
508 *(2*
K3*trD2 +
K2*tr2D)
517 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
520 Theta_.clamp_range(0, 100);
524 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
529 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
534 frictionalStressModel_->frictionalPressure
542 nuFric_ = frictionalStressModel_->nu
552 nut_.clamp_max(maxNut_);
554 nuFric_ =
min(nuFric_, maxNut_ - nut_);
561 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl
562 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
Templated abstract base class for single-phase compressible turbulence models.
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())
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
@ NO_REGISTER
Do not request registration (bool: false).
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Templated abstract base class for RAS turbulence models.
virtual void printCoeffs(const word &type)
RASModel(const RASModel &)=delete
virtual const dictionary & coeffDict() const
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
virtual tmp< volScalarField > omega() const
Return the specific dissipation rate.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
virtual ~kineticTheoryModel()
Destructor.
virtual bool read()
Re-read model coefficients if they have changed.
static const SymmTensor I
virtual tmp< volScalarField > alpha() const
const alphaField & alpha_
const volScalarField & rho_
Generic dimensioned Type class.
Eddy viscosity turbulence model base class.
eddyViscosity(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
Finite-volume options, which is an IOdictionary of values and a fv::optionList.
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present otherwise lookup and return.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
const surfaceScalarField & phi_
const volVectorField & U_
const surfaceScalarField & alphaRhoPhi_
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
constexpr scalar pi(M_PI)
Namespace for handling debugging switches.
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.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
const dimensionSet dimViscosity
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
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.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
bool read(const char *buf, int32_t &val)
Same as readInt32.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
fvMatrix< scalar > fvScalarMatrix
GeometricField< scalar, fvPatchField, volMesh > volScalarField
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
messageStream Info
Information stream (stdout output on master, null elsewhere).
static const Identity< scalar > I
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensionedScalar sqrt(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
const dimensionSet dimDynamicViscosity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a).
tmp< volScalarField > trho
const dimensionedScalar & D
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.