30 template<
class BasePhaseSystem>
37 BasePhaseSystem(mesh),
41 this->
lookup(
"populationBalances"),
42 diameterModels::populationBalanceModel::iNew(*this, dmdtfs_)
45 forAll(populationBalances_, i)
48 populationBalances_[i];
52 const phasePairKey& key = iter.key();
54 if (!this->phasePairs_.found(key))
56 this->phasePairs_.insert
63 this->phaseModels_[key.first()],
64 this->phaseModels_[key.second()]
79 "populationBalance:dmdtf",
80 this->phasePairs_[key]->
name()
98 template<
class BasePhaseSystem>
106 template<
class BasePhaseSystem>
110 const phasePairKey& key
113 tmp<volScalarField> tDmdt = BasePhaseSystem::dmdtf(key);
115 if (!dmdtfs_.
found(key))
119 tDmdt.ref() += dmdtSign**dmdtfs_[key];
126 template<
class BasePhaseSystem>
130 PtrList<volScalarField>
dmdts(BasePhaseSystem::dmdts());
134 const phasePair& pair = this->phasePairs_[dmdtfIter.key()];
137 addField(pair.phase1(),
"dmdt", pDmdt,
dmdts);
138 addField(pair.phase2(),
"dmdt", - pDmdt,
dmdts);
145 template<
class BasePhaseSystem>
149 autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
154 this->addDmdtUfs(dmdtfs_, eqns);
160 template<
class BasePhaseSystem>
164 autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
165 BasePhaseSystem::momentumTransferf();
169 this->addDmdtUfs(dmdtfs_, eqns);
175 template<
class BasePhaseSystem>
179 autoPtr<phaseSystem::heatTransferTable> eqnsPtr =
180 BasePhaseSystem::heatTransfer();
184 this->addDmdtHefs(dmdtfs_, eqns);
190 template<
class BasePhaseSystem>
194 autoPtr<phaseSystem::specieTransferTable> eqnsPtr =
205 template<
class BasePhaseSystem>
223 template<
class BasePhaseSystem>
226 const PtrList<volScalarField>& rAUs,
227 const PtrList<surfaceScalarField>& rAUfs
232 forAll(populationBalances_, i)
234 populationBalances_[i].solve();
#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.
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
Class that solves the univariate population balance equation by means of a class method (also called ...
HashPtrTable< fvVectorMatrix > momentumTransferTable
static int compare(const Pair< word > &a, const Pair< word > &b)
Compare Pairs.
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.
HashPtrTable< fvScalarMatrix > heatTransferTable
HashPtrTable< fvScalarMatrix > specieTransferTable
virtual ~PopulationBalancePhaseSystem()
Destructor.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
bool found(const Key &) const
Return true if hashedEntry is found in table.
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.
static word groupName(Name name, const word &group)
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtfTable
virtual void solve(const PtrList< volScalarField > &rAUs, const PtrList< surfaceScalarField > &rAUfs)
Solve all population balance equations.
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransfer()
Return the momentum transfer matrices for the cell-based algorithm.
void addDmdtYfs(const phaseSystem::dmdtfTable &dmdtfs, phaseSystem::specieTransferTable &eqns) const
Add specie transfer terms which result from bulk mass transfers.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
phaseSystem::specieTransferTable & specieTransfer(specieTransferPtr())
virtual autoPtr< phaseSystem::momentumTransferTable > momentumTransferf()
Return the momentum transfer matrices for the face-based algorithm.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
word name(const complex &)
Return a string representation of a complex.
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
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 autoPtr< phaseSystem::specieTransferTable > specieTransfer() const
Return the specie transfer matrices.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for managing temporary objects.
virtual bool read()
Read base phaseProperties dictionary.
virtual autoPtr< phaseSystem::heatTransferTable > heatTransfer() const
Return the heat transfer matrices.