40 template<
class BasePhaseModel>
43 const phaseSystem& fluid,
44 const word& phaseName,
45 const bool referencePhase,
49 BasePhaseModel(fluid, phaseName, referencePhase, index),
54 fluid.
mesh().solverDict(
"Yi")
60 this->thermo_->lookupOrDefault(
"inertSpecie",
word::null)
65 inertIndex_ = this->thermo_->composition().species()[
inertSpecie];
68 PtrList<volScalarField>& Y = this->thermo_->composition().Y();
72 if (i != inertIndex_ && this->thermo_->composition().active(i))
74 const label j = YActive_.size();
75 YActive_.resize(j + 1);
76 YActive_.set(j, &Y[i]);
84 template<
class BasePhaseModel>
91 template<
class BasePhaseModel>
106 PtrList<volScalarField>& Yi = YRef();
110 if (i != inertIndex_)
117 if (inertIndex_ != -1)
119 Yi[inertIndex_] = scalar(1) -
Yt;
120 Yi[inertIndex_].max(0);
134 template<
class BasePhaseModel>
141 template<
class BasePhaseModel>
152 +
fvm::div(alphaRhoPhi, Yi,
"div(" + alphaRhoPhi.name() +
",Yi)")
163 template<
class BasePhaseModel>
167 return this->thermo_->composition().Y();
171 template<
class BasePhaseModel>
175 return this->thermo_->composition().Y(name);
179 template<
class BasePhaseModel>
183 return this->thermo_->composition().Y();
187 template<
class BasePhaseModel>
195 template<
class BasePhaseModel>
virtual PtrList< volScalarField > & YRef()
Access the species mass fractions.
virtual void correctSpecies()
Correct the species 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.
static const thermoModel & thermo(const TransportType &tt)
MultiComponentPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
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.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
word name(const complex &)
Return a string representation of a complex.
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.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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])