40 template<
class BasePhaseModel>
43 const phaseSystem& fluid,
44 const word& phaseName,
48 BasePhaseModel(fluid, phaseName, index),
53 fluid.subDict(phaseName)
59 fluid.
mesh().solverDict(
"Yi")
65 this->thermo_->lookupOrDefault(
"inertSpecie",
word::null)
70 inertIndex_ = this->thermo_->composition().species()[
inertSpecie];
73 PtrList<volScalarField>& Y = this->thermo_->composition().Y();
77 if (i != inertIndex_ && this->thermo_->composition().active(i))
79 const label j = YActive_.size();
80 YActive_.resize(j + 1);
81 YActive_.set(j, &Y[i]);
89 template<
class BasePhaseModel>
96 template<
class BasePhaseModel>
111 PtrList<volScalarField>& Yi = YRef();
115 if (i != inertIndex_)
121 if (inertIndex_ != -1)
123 Yi[inertIndex_] = scalar(1) -
Yt;
124 Yi[inertIndex_].
max(0);
139 template<
class BasePhaseModel>
146 template<
class BasePhaseModel>
157 +
fvm::div(alphaRhoPhi, Yi,
"div(" + alphaRhoPhi.name() +
",Yi)")
174 template<
class BasePhaseModel>
178 return this->thermo_->composition().Y();
182 template<
class BasePhaseModel>
186 return this->thermo_->composition().Y(name);
190 template<
class BasePhaseModel>
194 return this->thermo_->composition().Y();
198 template<
class BasePhaseModel>
206 template<
class BasePhaseModel>
virtual PtrList< volScalarField > & YRef()
Access the species mass fractions.
#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.
virtual tmp< fvScalarMatrix > YiEqn(volScalarField &Yi)
Return the species fraction equation.
Calculate the matrix for the laplacian of the field.
virtual void correctThermo()
Correct the thermodynamics.
rhoReactionThermo & thermo
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Calculate the first temporal derivative.
virtual const PtrList< volScalarField > & Y() const
Return the species mass fractions.
static word groupName(Name name, const word &group)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
static const word null
An empty word.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
virtual const UPtrList< volScalarField > & YActive() const
Return the active species mass fractions.
Calculate the divergence of the given field.
MultiComponentPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
word name(const complex &)
Return a string representation of a complex.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
virtual ~MultiComponentPhaseModel()
Destructor.
Calculate the matrix for the divergence of the given field and flux.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
#define R(A, B, C, D, E, F, K, M)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void max(const dimensioned< Type > &)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual UPtrList< volScalarField > & YActiveRef()
Access the active species mass fractions.
virtual bool pure() const
Return whether the phase is pure (i.e., not multi-component)
const word inertSpecie(thermo.lookup("inertSpecie"))
Calculate the matrix for implicit and explicit sources.
volScalarField Yt(0.0 *Y[0])