31 template<
class BasePhaseSystem>
35 const phasePairKey& key
38 if (!pDmdt_.found(key))
40 return phaseSystem::dmdt(key);
45 return pDmdtSign**pDmdt_[key];
51 template<
class BasePhaseSystem>
58 BasePhaseSystem(mesh),
62 this->
lookup(
"populationBalances"),
63 diameterModels::populationBalanceModel::iNew(*this, pDmdt_)
66 forAll(populationBalances_, i)
69 populationBalances_[i];
73 const phasePairKey& key = iter.key();
75 if (!this->phasePairs_.found(key))
77 this->phasePairs_.insert
84 this->phaseModels_[key.first()],
85 this->phaseModels_[key.second()]
100 const phasePair& pair(phasePairIter());
116 this->
mesh().time().timeName(),
131 template<
class BasePhaseSystem>
139 template<
class BasePhaseSystem>
143 const phasePairKey& key
146 return BasePhaseSystem::dmdt(key) + this->pDmdt(key);
150 template<
class BasePhaseSystem>
154 PtrList<volScalarField>
dmdts(BasePhaseSystem::dmdts());
158 const phasePair& pair = this->phasePairs_[pDmdtIter.key()];
161 this->addField(pair.phase1(),
"dmdt", pDmdt,
dmdts);
162 this->addField(pair.phase2(),
"dmdt", - pDmdt,
dmdts);
169 template<
class BasePhaseSystem>
173 autoPtr<phaseSystem::massTransferTable> eqnsPtr =
185 const phasePair& pair(phasePairIter());
192 const phaseModel& phase = pair.phase1();
193 const phaseModel& otherPhase = pair.phase2();
202 const PtrList<volScalarField>& Yi = phase.Y();
217 dmdt21*eqns[otherName]->psi()
221 dmdt12*eqns[
name]->psi()
230 template<
class BasePhaseSystem>
248 template<
class BasePhaseSystem>
253 forAll(populationBalances_, i)
255 populationBalances_[i].solve();
#define forAll(list, i)
Loop across all elements in list.
virtual void solve()
Solve all population balance equations.
HashPtrTable< fvScalarMatrix > massTransferTable
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
Class that solves the univariate population balance equation by means of a class method (also called ...
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
phaseSystem::massTransferTable & massTransfer(massTransferPtr())
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
const phasePairTable & phasePairs() const
Return list of unordered phasePairs in this populationBalance.
virtual autoPtr< phaseSystem::massTransferTable > massTransfer() const
Return the mass transfer matrices.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual ~PopulationBalancePhaseSystem()
Destructor.
dimensionedScalar posPart(const dimensionedScalar &ds)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
static word groupName(Name name, const word &group)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimDensity
PopulationBalancePhaseSystem(const fvMesh &)
Construct from fvMesh.
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...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const volScalarField & psi
A class for managing temporary objects.
virtual bool read()
Read base phaseProperties dictionary.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
virtual tmp< volScalarField > pDmdt(const phasePairKey &key) const
Return the population balance mass transfer rate.
dimensionedScalar negPart(const dimensionedScalar &ds)