31#include "diameterModel.H"
47 const word& phaseName,
55 IOobject::groupName(
"alpha", phaseName),
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_));
211 const auto& phiBf = tphi().boundaryField();
213 forAll(alphaPhiBf, patchi)
217 if (!alphaPhip.coupled())
219 alphaPhip = phiBf[patchi]*alphaBf[patchi];
const Mesh & mesh() const noexcept
Return const reference to mesh.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< diameterModel > New(const dictionary &diameterProperties, const phaseModel &phase)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool coupled() const
True if the patch field is coupled.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
virtual void correctKinematics()
Correct the kinematics.
virtual void correctEnergyTransport()
Correct the energy transport.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
const dimensionedScalar & residualAlpha() const
Return the residual phase-fraction for given phase.
static autoPtr< phaseModel > New(const phaseSystem &fluid, const word &phaseName, const label index)
virtual void correctThermo()
Correct the thermodynamics.
void correct()
Correct the phase properties.
virtual ~phaseModel()
Destructor.
phaseModel(const word &phaseName, const dictionary &phaseDict, const fvMesh &mesh)
scalar alphaMax() const
Return the maximum phase-fraction (e.g. packing limit).
tmp< volScalarField > d() const
virtual void correctTurbulence()
Correct the turbulence.
label index() const
Return the index of the phase.
const word & keyword() const
const autoPtr< diameterModel > & dPtr() const
Return const-reference to diameterModel of the phase.
autoPtr< phaseModel > clone() const
Return clone.
void correctInflowOutflow(surfaceScalarField &alphaPhi) const
Ensure that the flux at inflow/outflow BCs is preserved.
const word & name() const
virtual bool read()
Read phase properties dictionary.
Class to represent a system of phases and model interfacial transfers between them.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fvsPatchField< scalar > fvsPatchScalarField
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))