26 #include "phaseModel.H" 28 #include "diameterModel.H" 43 const phaseSystem& fluid,
44 const word& phaseName,
52 IOobject::groupName(
"alpha", phaseName),
55 IOobject::READ_IF_PRESENT,
69 fluid.subDict(phaseName).
lookup(
"residualAlpha")
71 alphaMax_(fluid.subDict(phaseName).lookupOrDefault(
"alphaMax", 1.0))
80 return autoPtr<phaseModel>(
nullptr);
118 return residualAlpha_;
130 return diameterModel_().d();
136 diameterModel_->correct();
158 return diameterModel_->read(fluid_.subDict(name_));
170 surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
171 const volScalarField::Boundary& alphaBf = boundaryField();
172 const surfaceScalarField::Boundary& phiBf =
phi()().boundaryField();
178 if (!alphaPhip.coupled())
189 static tmp<Foam::volScalarField> divU_(
nullptr);
197 <<
"Attempt to set the dilatation rate of an incompressible phase" 218 <<
"Attempt to set the dilatation rate of an incompressible phase" fvsPatchField< scalar > fvsPatchScalarField
void correctInflowOutflow(surfaceScalarField &alphaPhi) const
Ensure that the flux at inflow/outflow BCs is preserved.
label index() const
Return the index of the phase.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const surfaceScalarField & phi() const
Return the volumetric flux.
virtual void correctKinematics()
Correct the kinematics.
Ostream & endl(Ostream &os)
Add newline and flush stream.
autoPtr< phaseModel > clone() const
Return clone.
const word & name() const
Generic dimensioned Type class.
tmp< volScalarField > d() const
phaseModel(const word &phaseName, const volScalarField &p, const volScalarField &T)
Construct from components.
virtual const volScalarField & K() const
Return the phase kinetic energy.
static autoPtr< diameterModel > New(const dictionary &dict, const phaseModel &phase)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual const tmp< volScalarField > & divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
virtual ~phaseModel()
Destructor.
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual bool read()
Read phase properties dictionary.
Class to represent a system of phases and model interfacial transfers between them.
A class for handling words, derived from string.
const word & keyword() const
virtual bool compressible() const
Return true if the phase is compressible otherwise false.
const dimensionedScalar & residualAlpha() const
Return the residual phase-fraction for given phase.
void correct()
Correct the laminar viscosity.
scalar alphaMax() const
Return the maximum phase-fraction (e.g. packing limit)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
virtual const surfaceScalarField & DbyA() const
Return the phase diffusivity divided by the momentum coefficient.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
virtual void correctThermo()
Correct the thermodynamics.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
virtual void correctTurbulence()
Correct the turbulence.