35 Foam::RASModels::kineticTheoryModel::continuousPhase()
const 37 const phaseSystem& fluid = phase_.
fluid();
41 if (fluid.movingPhases().size() != 2)
44 <<
"Continuous phase name must be specified " 45 <<
"when there are more than two moving phases." 49 forAll(fluid.movingPhases(), movingPhasei)
51 const phaseModel& otherPhase = fluid.movingPhases()[movingPhasei];
53 if (&otherPhase != &phase_)
60 return fluid.phases()[continuousPhaseName_];
73 const viscosity& viscosity,
88 phase_(
refCast<const phaseModel>(viscosity)),
97 kineticTheoryModels::viscosityModel::
New 104 kineticTheoryModels::conductivityModel::
New 111 kineticTheoryModels::radialModel::
New 116 granularPressureModel_
118 kineticTheoryModels::granularPressureModel::
New 123 frictionalStressModel_
125 kineticTheoryModels::frictionalStressModel::
New 149 dimensionSet(0, 2, -1, 0, 0),
222 if (type == typeName)
241 eddyViscosity<RASModel<phaseCompressible::momentumTransportModel>>::
245 coeffDict().lookup(
"equilibrium") >> equilibrium_;
246 e_.readIfPresent(coeffDict());
247 alphaMinFriction_.readIfPresent(coeffDict());
249 viscosityModel_->read();
250 conductivityModel_->read();
251 radialModel_->read();
252 granularPressureModel_->read();
253 frictionalStressModel_->read();
291 return tmp<volSymmTensorField>
308 tmp<volScalarField> tpPrime
314 *granularPressureModel_->granularPressureCoeffPrime
323 radialModel_->g0prime
332 + frictionalStressModel_->frictionalPressurePrime
345 if (!bpPrime[
patchi].coupled())
369 return tmp<volSymmTensorField>
396 "divDevTau(" + U_.
name() +
')' 406 const phaseSystem& fluid = phase_.fluid();
407 const phaseModel& continuousPhase = this->continuousPhase();
417 tmp<volScalarField> tda(phase_.d());
420 tmp<volTensorField> tgradU(
fvc::grad(U_));
425 gs0_ = radialModel_->g0(alpha, alphaMinFriction_, phase_.alphaMax());
430 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
435 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
440 rho*(2*nut_*D + (lambda_ - (2.0/3.0)*nut_)*
tr(D)*I)
448 *
max(
sqr(alpha), residualAlpha_)
449 *rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
453 const dispersedPhaseInterface interface(phase_, continuousPhase);
456 fluid.foundInterfacialModel<dragModel>(interface)
457 ? fluid.lookupInterfacialModel<dragModel>(interface).K()
473 max(alpha, residualAlpha_)*rho
474 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
481 granularPressureModel_->granularPressureCoeff
491 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
513 -
fvm::SuSp((PsCoeff*I) && gradU, Theta_)
517 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
518 +
fvModels.source(alpha, rho, Theta_)
536 (sqrtPi/(3*(3.0 - e_)))
537 *(1 + 0.4*(1 + e_)*(3*e_ - 1)*alpha*gs0_)
538 +1.6*alpha*gs0_*(1 + e_)/sqrtPi
545 4*da*rho*(1 + e_)*alpha*gs0_/(3*sqrtPi) - 2*
K3/3.0
553 alpha/(alpha + residualAlpha_)
568 *(2*
K3*trD2 +
K2*tr2D)
574 /(2*
max(alpha, residualAlpha_)*
K4)
577 kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
585 nut_ = viscosityModel_->nu(alpha, Theta_, gs0_, rho, da, e_);
590 lambda_ = (4.0/3.0)*
sqr(alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
595 frictionalStressModel_->frictionalPressure
608 frictionalStressModel_->nu
625 Info<< typeName <<
':' <<
nl 626 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl 627 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual tmp< volSymmTensorField > sigma() const
Return the stress tensor [m^2/s^2].
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)
eddyViscosity(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
const Time & time() const
To & refCast(From &r)
Reference type cast template function.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< symmTensor, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< symmTensor >> &)
Return a temporary field constructed from name,.
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)
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of the boundary field.
const dimensionSet dimless
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
kineticTheoryModel(const volScalarField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const fvMesh & mesh() const
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dictionary coeffDict_
Model coefficients dictionary.
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
const fileName & name() const
Return the dictionary name.
static const SymmTensor I
static autoPtr< RASModel > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected RAS model.
Foam::fvConstraints & fvConstraints
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
static const dictionary null
Null dictionary.
static const word null
An empty word.
momentumTransportModel(const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
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)
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
const word & name() const
Return const reference to name.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
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.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
static const dimensionSet dimK
Coefficient dimensions.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Finite volume constraints.
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'.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
virtual bool read()
Re-read model coefficients if they have changed.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
RASModel(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
const doubleScalar e
Elementary charge.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.