GfsOutputDropletSums

From Gerris

Jump to: navigation, search

GfsOutputDropletSums is used to compute sums (i.e. integrals) over individual fluid droplets (defined typically through a GfsVariableTracerVOF).

The syntax in parameter files is:

[ GfsOutputScalar ] [ GfsFunction ] Index

where the function evaluates to the volume fraction field and Index is an optional variable name. If Index is specified a new variable with this name is created and filled with the index of the droplet a given cell belongs to.

The v field of the GfsOutputScalar parent defines the quantity to be integrated over the domain defined by each droplet. The result of the integration is then written: one line for each droplet with three space-separated fields per line. The first field is the simulation time, the second field the droplet index and the third field the result of the integration. Droplets are indexed according to their size with index 1 corresponding to the largest droplet.

The following example will output three files vol, volx and voly containing the volume and volume-weighted coordinates of each droplet respectively:

OutputDropletSums { istep = 1 } vol  { v = T*dV   } T
OutputDropletSums { istep = 1 } volx { v = x*T*dV } T
OutputDropletSums { istep = 1 } voly { v = y*T*dV } T

The coordinates of the barycentres of each droplet can then be obtained easily using for example:

% paste vol volx voly | awk '{print $1, $2, $3, $6/$3, $9/$3}' > volxy

Note that there is no guarantee that the index of a given droplet remains the same throughout the simulation.

The fact that a GfsFunction is specified rather than just the name of a GfsVariableTracerVOF can be used — for example — to restrict the computation to a given area, e.g.

OutputDropletSums { istep = 1 } vol { v = T*dV } (x > 0 && y > 0 ? T : 0)

will restrict the analysis to the top-right corner of the unit box.


Views
Navigation
communication