204 #ifndef populationBalanceModel_H
205 #define populationBalanceModel_H
217 class phaseCompressibleMomentumTransportModel;
219 namespace diameterModels
222 class coalescenceModel;
224 class binaryBreakupModel;
226 class nucleationModel;
276 return popBalName +
":groups";
287 const word& popBalName,
309 return sizeGroups_.
size();
319 sizeGroups_.
resize(i0 +
group.sizeGroups().size());
323 sizeGroups_.
set(i0 + i, &
group.sizeGroups()[i]);
328 && sizeGroups_[i0 + i - 1].
x().value()
329 >= sizeGroups_[i0 + i].
x().value()
333 <<
"Size groups must be specified in order of "
334 <<
"their representative size"
353 <<
"No velocity groups exist for population "
354 <<
"balance \"" << popBal.
name() <<
"\""
361 velGroupPtrs.
transfer(ps.velocityGroupPtrs_);
362 szGroupPtrs.
transfer(ps.sizeGroups_);
467 label sourceUpdateCounter_;
472 void registerVelocityGroups();
474 void initialiseDmdtfs();
476 void createPhasePairs();
480 void birthByCoalescence(
const label j,
const label k);
482 void deathByCoalescence(
const label i,
const label j);
484 void birthByBreakup(
const label k,
const label model);
486 void deathByBreakup(
const label i);
490 void birthByBinaryBreakup(
const label i,
const label j);
492 void deathByBinaryBreakup(
const label j,
const label i);
500 void correctDilatationError();
509 bool updateSources();
512 inline label sourceUpdateInterval()
const;
515 template<
class EtaType,
class VType>
516 EtaType eta(
const label i,
const VType& v)
const;
519 template<
class EtaType,
class VType>
520 EtaType etaV(
const label i,
const VType& v)
const;
554 Info <<
"Setting up population balance: " <<
name <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
An STL-conforming hash table.
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const objectRegistry & db() const
Return the local objectRegistry.
word group() const
Return group (extension part of name)
const word & name() const
Return name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
static const word & constant()
Return constant name.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void transfer(UPtrList< T > &)
Transfer the contents of the argument UPtrList into this.
label size() const
Return the number of elements in the UPtrList.
void resize(const label)
Reset size of UPtrList. This can only be used to set the size.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Base class for drift models.
Base class for nucleation models.
Class to accumulate population balance sub-class pointers.
static void retrieve(const populationBalanceModel &popBal, HashTable< const velocityGroup * > &velGroupPtrs, UPtrList< sizeGroup > &szGroupPtrs)
Retrieve the pointers.
static groups & New(const word &popBalName, const objectRegistry &db)
Lookup in the registry or construct new.
label nSizeGroups()
Return the current number of size groups.
virtual bool writeData(Ostream &) const
Dummy write for regIOobject.
void insert(velocityGroup &group)
Insert a velocity group into the table.
Return a pointer to a new populationBalanceModel object created on.
iNew(const phaseSystem &fluid)
autoPtr< populationBalanceModel > operator()(Istream &is) const
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
const HashTable< volScalarField > & sourceDilatation() const
Return dilatation obtained from source terms.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
bool writeData(Ostream &) const
Dummy write for regIOobject.
void correct()
Correct derived quantities.
const List< labelPair > & coalescencePairs() const
Return coalescence relevant size group pairs.
autoPtr< populationBalanceModel > clone() const
Return clone.
const List< labelPair > & binaryBreakupPairs() const
Return binary breakup relevant size group pairs.
const volVectorField & U() const
Return average velocity.
populationBalanceModel(const phaseSystem &fluid, const word &name)
Construct for a fluid.
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
Switch solveOnFinalIterOnly() const
Solve on final pimple iteration only.
const phaseModel & continuousPhase() const
Return continuous phase.
TypeName("populationBalanceModel")
Runtime type information.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
const dictionary & dict() const
Return populationBalanceCoeffs dictionary.
const tmp< volScalarField > sigmaWithContinuousPhase(const phaseModel &dispersedPhase) const
Return the surface tension coefficient between a given dispersed.
const fvMesh & mesh() const
Return reference to the mesh.
label nCorr() const
Return the number of corrections.
const phaseCompressibleMomentumTransportModel & continuousTurbulence() const
Return reference to momentumTransport model of the continuous phase.
const volScalarField & Sp(const label i) const
Return implicit source terms.
virtual ~populationBalanceModel()
Destructor.
const phaseSystem::dmdtfTable & dmdtfs() const
Return reference to the interfacial mass transfer rates.
void solve()
Solve the population balance equation.
Computes the Sauter mean diameter based on a user specified size distribution, defined in terms of si...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
Registry of regIOobjects.
const Time & time() const
Return time.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
bool foundObject(const word &name) const
Is the named Type in registry.
Templated abstract base class for multiphase compressible turbulence models.
Class to represent a system of phases and model interfacial transfers between them.
const fvMesh & mesh() const
Return the mesh.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
regIOobject(const IOobject &, const bool isTime=false)
Construct from IOobject. Optional flag for if IOobject is the.
bool checkOut()
Remove object from registry.
void store()
Transfer ownership of this object to its registry.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.