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()]
70 this->
template validateMassTransfer
72 diameterModels::populationBalanceModel
73 >(this->phasePairs_[key]);
84 "populationBalance:dmdtf",
85 this->phasePairs_[key]->
name()
101 template<
class BasePhaseSystem>
109 template<
class BasePhaseSystem>
113 const phasePairKey& key
116 tmp<volScalarField> tDmdtf = BasePhaseSystem::dmdtf(key);
118 if (dmdtfs_.
found(key))
122 tDmdtf.ref() += dmdtSign**dmdtfs_[key];
129 template<
class BasePhaseSystem>
133 PtrList<volScalarField>
dmdts(BasePhaseSystem::dmdts());
137 const phasePair& pair = this->phasePairs_[dmdtfIter.key()];
140 addField(pair.phase1(),
"dmdt", pDmdt,
dmdts);
141 addField(pair.phase2(),
"dmdt", - pDmdt,
dmdts);
148 template<
class BasePhaseSystem>
152 autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
157 this->addDmdtUfs(dmdtfs_, eqns);
163 template<
class BasePhaseSystem>
167 autoPtr<phaseSystem::momentumTransferTable> eqnsPtr =
168 BasePhaseSystem::momentumTransferf();
172 this->addDmdtUfs(dmdtfs_, eqns);
178 template<
class BasePhaseSystem>
182 autoPtr<phaseSystem::heatTransferTable> eqnsPtr =
183 BasePhaseSystem::heatTransfer();
187 this->addDmdtHefs(dmdtfs_, eqns);
193 template<
class BasePhaseSystem>
197 autoPtr<phaseSystem::specieTransferTable> eqnsPtr =
208 template<
class BasePhaseSystem>
211 const PtrList<volScalarField>& rAUs,
212 const PtrList<surfaceScalarField>& rAUfs
217 forAll(populationBalances_, i)
219 populationBalances_[i].solve();
224 template<
class BasePhaseSystem>
229 forAll(populationBalances_, i)
231 populationBalances_[i].correct();
236 template<
class BasePhaseSystem>
#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
const dimensionSet dimTime
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.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
static word groupName(Name name, const word &group)
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtfTable
const dimensionSet dimDensity
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)
virtual void correct()
Correct derived properties.
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())
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...
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.