Go to the documentation of this file.
30 #include "phaseSystem.H"
31 #include "diameterModel.H"
47 const word& phaseName,
55 IOobject::groupName(
"alpha", phaseName),
56 fluid.mesh().time().timeName(),
58 IOobject::READ_IF_PRESENT,
72 fluid.subDict(phaseName)
74 alphaMax_(
fluid.subDict(phaseName).getOrDefault<scalar>(
"alphaMax", 1))
94 const word& phaseName,
102 Info<<
"Selecting phaseModel for "
103 << phaseName <<
": " << modelType <<
endl;
105 auto* ctorPtr = phaseSystemConstructorTable(modelType);
114 *phaseSystemConstructorTablePtr_
118 return ctorPtr(
fluid, phaseName, index);
156 return residualAlpha_;
168 return diameterModel_().d();
174 return diameterModel_;
180 diameterModel_->correct();
202 return diameterModel_->read(fluid_.subDict(name_));
209 const volScalarField::Boundary& alphaBf = boundaryField();
210 const surfaceScalarField::Boundary& phiBf =
phi()().boundaryField();
212 forAll(alphaPhiBf, patchi)
216 if (!alphaPhip.coupled())
218 alphaPhip = phiBf[patchi]*alphaBf[patchi];
virtual void correctTurbulence()
Correct the turbulence.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label index() const
Return the index of the phase.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
tmp< volScalarField > d() const
scalar alphaMax() const
Return the maximum phase-fraction (e.g. packing limit)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual void correctEnergyTransport()
Correct the energy transport.
fvsPatchField< scalar > fvsPatchScalarField
const word & keyword() const
void correct()
Correct the phase properties.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
#define forAll(list, i)
Loop across all elements in list.
virtual ~phaseModel()
Destructor.
virtual void correctThermo()
Correct the thermodynamics.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
phaseModel(const word &phaseName, const dictionary &phaseDict, const fvMesh &mesh)
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))
messageStream Info
Information stream (stdout output on master, null elsewhere)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const autoPtr< diameterModel > & dPtr() const
Return const-reference to diameterModel of the phase.
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
const word & name() const
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void correctInflowOutflow(surfaceScalarField &alphaPhi) const
Ensure that the flux at inflow/outflow BCs is preserved.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
virtual bool read()
Read phase properties dictionary.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
Class to represent a system of phases and model interfacial transfers between them.
autoPtr< phaseModel > clone() const
Return clone.
const dimensionedScalar & residualAlpha() const
Return the residual phase-fraction for given phase.
defineTypeNameAndDebug(combustionModel, 0)
virtual void correctKinematics()
Correct the kinematics.
static autoPtr< phaseModel > New(const phaseSystem &fluid, const word &phaseName)
const dimensionSet dimless
Dimensionless.