Go to the documentation of this file.
30 #include "twoPhaseSystem.H"
31 #include "diameterModel.H"
34 #include "dragModel.H"
35 #include "heatTransferModel.H"
41 #include "surfaceInterpolate.H"
57 IOobject::groupName(
"alpha", phaseName),
58 fluid.mesh().time().timeName(),
60 IOobject::READ_IF_PRESENT,
76 fluid.subDict(phaseName)
78 alphaMax_(phaseDict_.getOrDefault<scalar>(
"alphaMax", 1)),
84 IOobject::groupName(
"U", name_),
85 fluid.mesh().time().timeName(),
96 IOobject::groupName(
"alphaPhi", name_),
97 fluid.mesh().time().timeName(),
107 IOobject::groupName(
"alphaRhoPhi", name_),
108 fluid.mesh().time().timeName(),
115 alphaPhi_.setOriented();
116 alphaRhoPhi_.setOriented();
118 thermo_->validate(
"phaseModel " + name_,
"h",
"e");
120 const word phiName = IOobject::groupName(
"phi", name_);
125 fluid_.mesh().time().timeName(),
132 Info<<
"Reading face flux field " << phiName <<
endl;
141 fluid_.mesh().time().timeName(),
152 Info<<
"Calculating face flux field " << phiName <<
endl;
156 U_.boundaryField().size(),
157 calculatedFvPatchScalarField::typeName
160 forAll(U_.boundaryField(), i)
164 isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])
165 || isA<slipFvPatchVectorField>(U_.boundaryField()[i])
166 || isA<partialSlipFvPatchVectorField>(U_.boundaryField()[i])
169 phiTypes[i] = fixedValueFvsPatchScalarField::typeName;
180 fluid_.mesh().time().timeName(),
246 return dPtr_->correct();
252 phaseDict_ = phaseProperties.subDict(name_);
253 return dPtr_->read(phaseDict_);
260 const volScalarField::Boundary& alphaBf = boundaryField();
263 forAll(alphaPhiBf, patchi)
267 if (!alphaPhip.coupled())
269 alphaPhip = phiBf[patchi]*alphaBf[patchi];
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
A class for handling words, derived from Foam::string.
Class which solves the volume fraction equations for two phases.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
tmp< volScalarField > d() const
fvsPatchField< scalar > fvsPatchScalarField
Helper class to manage multi-specie phase properties.
void correct()
Correct the phase properties.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
#define forAll(list, i)
Loop across all elements in list.
virtual ~phaseModel()
Destructor.
phaseModel(const word &phaseName, const dictionary &phaseDict, const fvMesh &mesh)
const PhaseCompressibleTurbulenceModel< phaseModel > & turbulence() const
Return the turbulence model.
surfaceScalarField alphaPhi(phi.name()+alpha1.name(), fvc::flux(phi, alpha1, alphaScheme))
messageStream Info
Information stream (stdout output on master, null elsewhere)
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,...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
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.
const phaseModel & otherPhase() const
Return the other phase in this two-phase system.
virtual bool read()
Read phase properties dictionary.
Calculate the face-flux of the given field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const dimensionSet dimless
Dimensionless.