Parcels

DROPLETPHASE - Auto clustering particles to speed up simulations

If a lot of DROPLETPHASE particles collect in one place, large neighbor lists can significantly increase the computation time. To avoid this, and to ensure good performance, DROPLETPHASE particles which are very close (relative to the smoothing length), can be merged together, to be treated as a single cluster of particles, referred to as a parcel. Clustering particles into parcels improve performance in two ways:
  • By reducing the total number of particles(parcels) being computed, simulations can be significantly sped up.
  • Merging close particles results in reducing the number of neighboring particles(parcels). This can greatly reduce the per-particle computation time.
Note: When Parceling is on, any provided H:MIN_FACTOR will not be used. Parceling is activated by the use of If parceling is activated it will be done every time step. The number of particles that a parcel represents is stored in the index ind_mult (short for multiplicity) A regular unclustered particle is a parcel of multiplicity 1 When merging particles to form a parcel (or when merging parcels to form a bigger parcel), all physical quantities are interpolated for the new parcel. Density and volume(droplet diameter, see ind_d30) interpolations are done such that the total mass is conserved. All postprocessing INTEGRATION for the dropletphase automatically take the multiplicity into account. With the exception of MAXIMUM_INT, and MINIMUM_INT

Starting of parceling and deparceling

Parceling is initiated when the number of neighbors crosses the value of DROPLETPHASE_MinNeighboursForParceling . Similarly, deparceling is initiated when the number of neighbors falls below the value of DROPLETPHASE_MaxNeighboursForDeParceling .

Sequence of conditions that must be fullfilled for two parcels to parcel

Parceling is only done for either FreeFlight points with each other or Liquid points with each other. For two points/parcels to parcel the following kriteria are checked in the given order and only parceled when all checks are passed: Both parceling and deparceling are done slowly. In the sense that two parcels are combined to form a bigger parcel. And a parcel is deparcelized into only two smaller parcels.

Target number of neighbors

The idea of parceling is to prevent too many particles to collect at one place which would produce computationally expensive, large neighbor lists. However, for an accurate computation of the accelerations/forces in the liquid layer a certain amount of neighbors is necessary. In order to ensure a balance between too many and too few neighbors can be maintained the user can define DROPLETPHASE_MaxNeighboursForDeParceling and DROPLETPHASE_MinNeighboursForParceling. With DROPLETPHASE_MinNeighboursForParceling parceling can only happen if the number of neighbors has reached at least the value of DROPLETPHASE_MinNeighboursForParceling or more. This ensures that parceling obeys a given minimum number of neighbors to maintain accuracy while improving performance where to many neighbors are present. With DROPLETPHASE_MaxNeighboursForDeParceling deparceling will be done as soon as the number of neighbors is less than DROPLETPHASE_MaxNeighboursForDeParceling. This gives a possibility to maintain a given number of neighbors needed for the accuracy of the solution. In the figures below these situations are visualized. However, the illustrated number of neighbors deviates strongly from an amount for an accurate solution. This is done only for the sake of clarity.

Distance of parcels to parcel

Two parcels are only combined to form a bigger parcel if they are within a distance of dist_parceling * h (in thin films) or dist_parceling_FreeFlight * h (in free flight). See dist_parceling and dist_parceling_FreeFlight Changing this parceling bandwidth must be done very carefully! If the value provided is too high, it is possible that some unphysical results could be produced: For example, a situation where the biggest parcel (parcel with the highest multiplicity) is generated not where the largest cluster of particles was, but right beside it.

Averaging of quantities for combining two parcels

The new multiplicity, mass, density, diameter and other quantities are calculated as \begin{align} mult_{new} = mult_1 + mult_2\end{align} \begin{align} m_{new} = m_1 + m_2\end{align} \begin{align} \rho = \frac{m_{new}}{V_{new}}\end{align} \begin{align} d_{30,new} = \left(\frac{V_1 + V_2} {\pi mult_{new}/9}\right)^{1/3}\end{align} \begin{align} q_{new} = \frac{( m_1 q_1 ) + ( m_2 q_2 )}{m_{new}}\end{align} Where the volumes are: \begin{align} V_1 = mult_1 \frac{\pi}{9} d_1^3\end{align} \begin{align} V_2 = mult_2 \frac{\pi}{9} d_2^3\end{align} \begin{align} V_{new} = V_1 + V_2\end{align} and the masses are: \begin{align} m_1 = \rho_1 V_1\end{align} \begin{align} m_2 = \rho_2 V_2\end{align}

Visualization

When visualizing results, only the parcels will be displayed. The number of particles represented by a parcel can be seen in the index ind_mult.

This item is referenced in:
dist_parceling (experimental / Under development) Maximum relative distance to initiate parceling
dist_parceling_FreeFlight (experimental / Under development) Maximum relative distance to initiate parceling
DROPLETPHASE_nbTSforParceling Number of time steps after which parceling will be done
dist_parceling (experimental / Under development) Maximum relative distance to initiate parceling (UCVO)
dist_parceling_FreeFlight (experimental / Under development) Maximum relative distance to initiate parceling in free flight (UCVO)
DROPLETPHASE_MaxEquivalentParcelDiameter Limiting maximum equivalent parcel diameter for parceling in DROPLETPHASE (UCVO)
DROPLETPHASE_MaxRelativeParcelVelocity Limiting maximum relative parcel velocity for parceling in DROPLETPHASE (UCVO)
DROPLETPHASE_MinNeighboursForParceling Limiting number of neigbors to trigger clustering in DROPLETPHASE (UCVO)
DROPLETPHASE_ParcelingDiameterClasses defines classes for diameters for parceling. And parceling is only done whent two parcels are in the same class.
dist_parceling (experimental / Under development) Maximum relative distance to initiate parceling (UCVO)
dist_parceling_FreeFlight (experimental / Under development) Maximum relative distance to initiate parceling in free flight (UCVO)
COMP_DropletphaseParcels (experimental / Under development) cluster particles together in DROPLETPHASE