190 #ifndef populationBalanceModel_H
191 #define populationBalanceModel_H
203 class phaseCompressibleMomentumTransportModel;
205 namespace diameterModels
208 class coalescenceModel;
210 class binaryBreakupModel;
273 return popBalName +
":groups";
284 const word& popBalName,
306 return sizeGroups_.
size();
316 sizeGroups_.
resize(i0 +
group.sizeGroups().size());
320 sizeGroups_.
set(i0 + i, &
group.sizeGroups()[i]);
325 && sizeGroups_[i0 + i - 1].
x().value()
326 >= sizeGroups_[i0 + i].
x().value()
330 <<
"Size groups must be specified in order of "
331 <<
"their representative size"
350 <<
"No velocity groups exist for population "
351 <<
"balance \"" << popBal.
name() <<
"\""
358 velGroupPtrs.
transfer(ps.velocityGroupPtrs_);
359 szGroupPtrs.
transfer(ps.sizeGroups_);
455 label sourceUpdateCounter_;
462 void precomputeCoalescenceAndBreakup();
464 void birthByCoalescence(
const label j,
const label k);
466 void deathByCoalescence(
const label i,
const label j);
468 void birthByBreakup(
const label k,
const label model);
470 void deathByBreakup(
const label i);
472 void birthByBinaryBreakup(
const label i,
const label j);
474 void deathByBinaryBreakup(
const label j,
const label i);
476 void computeCoalescenceAndBreakup();
478 void precomputeExpansion();
487 void computeExpansion();
489 void precomputeModelSources();
498 void computeModelSources();
500 void computeDilatationErrors();
503 bool updateSources();
506 inline label sourceUpdateInterval()
const;
564 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.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
A HashTable specialisation for hashing pointers.
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,...
An ordered pair of two objects of type <Type> with first() and second() elements.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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...
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...
tmp< volScalarField::Internal > Sp(const label i) const
Return the implicit coalescence and breakup source term.
const dmdtfTable & modelSourceDmdtfs() const
Return reference to the model source interfacial mass transfer rates.
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.
bool solveOnFinalIterOnly() const
Solve on final pimple iteration only.
populationBalanceModel(const phaseSystem &fluid, const word &name)
Construct for a fluid.
const UPtrList< sizeGroup > & sizeGroups() const
Return the size groups belonging to this populationBalance.
tmp< volScalarField::Internal > modelSourceSu(const label i, const UPtrList< const volScalarField > &flds=UPtrList< const volScalarField >()) const
Return the explicit model source source term.
tmp< volScalarField::Internal > expansionSp(const label i) const
Return the implicit expansion source term.
const phaseModel & continuousPhase() const
Return continuous phase.
TypeName("populationBalanceModel")
Runtime type information.
dimensionedScalar eta(const label i, const dimensionedScalar &v) const
Return the number allocation coefficient for a single volume.
HashPtrTable< volScalarField::Internal, phaseInterfaceKey, phaseInterfaceKey::hash > dmdtfTable
Table of interfacial mass transfer rates.
const dmdtfTable & dmdtfs() const
Return reference to the coalescence and breakup interfacial mass.
tmp< volScalarField::Internal > expansionSu(const label i, const UPtrList< const volScalarField > &flds=UPtrList< const volScalarField >()) const
Return the explicit expansion source term.
const volScalarField & alphas() const
Return total void of phases belonging to this populationBalance.
dimensionedScalar etaV(const label i, const dimensionedScalar &v) const
Return the volume allocation coefficient for a single volume.
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.
const phaseCompressibleMomentumTransportModel & continuousTurbulence() const
Return reference to momentumTransport model of the continuous phase.
virtual ~populationBalanceModel()
Destructor.
const dmdtfTable & expansionDmdtfs() const
Return reference to the expansion interfacial mass transfer rates.
void solve()
Solve the population balance equation.
const dictionary & solverDict() const
Return solution settings dictionary for this populationBalance.
Computes the Sauter mean diameter based on a user specified size distribution, defined in terms of si...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for statistical distributions.
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.
Word-pair based class used for keying interface models in hash tables.
Class to represent a system of phases.
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.