37 Foam::RASModels::kineticTheoryModel::continuousPhase()
const
39 const phaseSystem& fluid = phase_.
fluid();
43 if (fluid.movingPhases().size() != 2)
46 <<
"Continuous phase name must be specified "
47 <<
"when there are more than two moving phases."
51 forAll(fluid.movingPhases(), movingPhasei)
53 const phaseModel& otherPhase = fluid.movingPhases()[movingPhasei];
55 if (&otherPhase != &phase_)
62 return fluid.phases()[continuousPhaseName_];
94 coeffDict().lookupOrDefault(
"continuousPhase",
word::null)
106 kineticTheoryModels::conductivityModel::
New
113 kineticTheoryModels::radialModel::
New
118 granularPressureModel_
120 kineticTheoryModels::granularPressureModel::
New
125 frictionalStressModel_
127 kineticTheoryModels::frictionalStressModel::
New
133 equilibrium_(coeffDict().lookup(
"equilibrium")),
152 coeffDict().lookupOrDefault<scalar>(
"maxNut", 1000)
242 const dictionary& coeffDict = this->coeffDict();
243 coeffDict.
lookup(
"equilibrium") >> equilibrium_;
244 e_.readIfPresent(coeffDict);
245 alphaMinFriction_.readIfPresent(coeffDict);
247 viscosityModel_->
read(coeffDict);
248 conductivityModel_->
read(coeffDict);
249 radialModel_->
read(coeffDict);
250 granularPressureModel_->
read(coeffDict);
251 frictionalStressModel_->
read(coeffDict);
302 Foam::RASModels::kineticTheoryModel::pPrime()
const
312 *granularPressureModel_->granularPressureCoeffPrime
321 radialModel_->g0prime
330 + frictionalStressModel_->frictionalPressurePrime
343 if (!bpPrime[
patchi].coupled())
411 const phaseModel& continuousPhase = this->continuousPhase();
431 gs0_ = radialModel_->g0(
alpha, alphaMinFriction_, phase_.alphaMax());
436 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
441 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
446 rho*(2*nut_*
D + (lambda_ - (2.0/3.0)*nut_)*
tr(
D)*
I)
455 *
rho*gs0_*(1.0/da)*ThetaSqrt/sqrtPi
480 *sqrtPi*(ThetaSqrt + ThetaSmallSqrt)
487 granularPressureModel_->granularPressureCoeff
497 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
519 +
fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
538 (sqrtPi/(3*(3.0 - e_)))
539 *(1 + 0.4*(1 + e_)*(3*e_ - 1)*
alpha*gs0_)
540 +1.6*
alpha*gs0_*(1 + e_)/sqrtPi
547 4*da*
rho*(1 + e_)*
alpha*gs0_/(3*sqrtPi) - 2*
K3/3.0
570 *(2*
K3*trD2 +
K2*tr2D)
579 kappa_ = conductivityModel_->kappa(
alpha, Theta_, gs0_,
rho, da, e_);
587 nut_ = viscosityModel_->nu(
alpha, Theta_, gs0_,
rho, da, e_);
592 lambda_ = (4.0/3.0)*
sqr(
alpha)*da*gs0_*(1 + e_)*ThetaSqrt/sqrtPi;
597 frictionalStressModel_->frictionalPressure
610 frictionalStressModel_->nu
624 Info<< typeName <<
':' <<
nl
625 <<
" max(Theta) = " <<
max(Theta_).value() <<
nl
626 <<
" max(nut) = " <<
max(nut_).value() <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricBoundaryField class.
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static word groupName(Name name, const word &group)
virtual Istream & read(token &)
Return next token from stream.
virtual Istream & read(token &)=0
Return next token from stream.
Templated abstract base class for RAS turbulence models.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
virtual tmp< volSymmTensorField > R() const
Return the stress tensor [m^2/s^2].
virtual tmp< surfaceVectorField > devTau() const
Return the effective stress.
virtual void correct()
Solve the kinetic theory equations and correct the viscosity.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
virtual tmp< surfaceScalarField > pPrimef() const
Return the face-phase-pressure'.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
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.
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
virtual ~kineticTheoryModel()
Destructor.
virtual bool read()
Re-read model coefficients if they have changed.
static const SymmTensor I
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Dimension set for the base types.
Class to represent a interface between phases where one phase is considered dispersed within the othe...
Model for drag between phases.
virtual tmp< volScalarField > K() const =0
Return the drag coefficient K.
static const dimensionSet dimK
Coefficient dimensions.
Eddy viscosity turbulence model base class.
Finite volume constraints.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
Abstract base class for turbulence models (RAS, LES and laminar).
const phaseSystem & fluid() const
Return the system to which this phase belongs.
virtual tmp< volVectorField > U() const =0
Return the velocity.
Class to represent a system of phases.
bool foundInterfacialModel(const phaseInterface &interface) const
Check availability of a sub model for a given interface.
const ModelType & lookupInterfacialModel(const phaseInterface &interface) const
Return a sub model for an interface.
A class for managing temporary objects.
An abstract base class for Newtonian viscosity models.
Abstract base class for all fluid physical properties.
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvConstraints & fvConstraints(Foam::fvConstraints::New(mesh))
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Calculate the first temporal derivative.
Calculate the field for explicit evaluation of implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
static tmp< SurfaceField< typename innerProduct< vector, Type >::type > > dotInterpolate(const surfaceVectorField &Sf, const VolField< Type > &tvf)
Interpolate field onto faces.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
static const coefficient D("D", dimTemperature, 257.14)
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(const char *, int32_t &)
To & refCast(From &r)
Reference type cast template function.
void dev2(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void dev(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void twoSymm(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
const dimensionSet dimless
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
static const Identity< scalar > I
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void symm(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
word typedName(Name name)
Return the name of the object within the given type.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
void tr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< tensor > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.