sandbox/popinet/non-coalescence.c
Non-coalescence of colliding droplets
Two droplets are launched toward one another. This example shows how using different VOF tracers for each droplet prevents numerical coalescence.
#include "grid/multigrid.h"
#include "navier-stokes/centered.h"
#include "vof.h"
#include "tension.h"
#include "view.h"
scalar f1[], f2[], * interfaces = {f1,f2};
int main()
{
(4.);
size (-L0/2., -L0/2.);
origin const face vector muc[] = {0.01,0.01};
= muc;
mu .sigma = f2.sigma = 1.;
f1run();
}
event init (t = 0)
{
fraction (f1, - (sq(x + 1.) + sq(y) - sq(0.4)));
fraction (f2, - (sq(x - 1.) + sq(y) - sq(0.5)));
foreach()
.x[] = f1[] - f2[];
u}
event movie (t += 0.04; t <= 6.)
{
clear();
squares ("u.x", spread = -1, linear = true);
draw_vof ("f1");
draw_vof ("f2");
box();
save ("movie.mp4");
}
Non-coalescence using two VOF tracers. The color field is the horizontal component of the velocity field.
This can be compared with the result for a single VOF tracer. The corresponding code is here.