> I try to run this test but it always gives "Segmentation fault"
It runs fine for me.
> how should I add this noise?
I do not think there is a generic answer. It is about adding a perturbation which can be amplified by the instability mechanism. Ideally you should set a perturbation to your match the physical model system.
> is it right way to define the initial drop and pool as follows?
For the droplet in a pool you could perturb the interfaces, but adding noise to every cell maybe too rigorous. Perhaps something like:
f = f1 + f2;
if (f < 1 && f > 0) // Only add noise to cells that contain the interface
f = clamp(f + 0.001*noise(), 0, 1);
Notice that the perturbation will still be sensitive to the number of cores you use.