Hi Wouter,
> Curvature is calculated based on:
> (a) A parabola/paraboloid directly via height-function calculation of
> the surrounding 3x3, 3x3x3 stencil
The stencil is not 3x3 or 3x3x3 (in 3D), it is 3xn or 3x3xn with n
variable and arbitrarily large (larger than 3 but usually smaller than 9
though).
> (b) A parabola/oid on a least-squares fit of height-function info if the
> height function orientation is not sufficiently consistent in the
> stencil for (a) to work
Yes.
> (c) A parabola/oid based on the centroids of the nearby interface
> fragments in the stencil if the height-function calculations yield
> sufficiently many points within a half-cell distance of other points.
> That is, if fewer than 3 points (2D) or 9 (3D) are mutually separated by
> more than half a cell within the stencil, then (c) 'happens'.
>
> As I understand it, the bug corresponds with (c) being used to compute a
> curvature, since otherwise either (a) or (b) is used to compute the
> "temporary curvature" and the double-multiplication is avoided. Is this
> right?
More or less. You missed "the average of the curvatures in the $3^{d}$
neighborhood of interfacial cells" part of the algorithm.
> If so, then an example of an under-resolved interface may be a 2D bubble
> or droplet fewer than 2 cells in diameter, yes? More generally, and
> vaguely, anywhere where the interface gets really funky on a length
> scale smaller than the 3x3(x3) stencil would be under-resolved.
Yes. Unfortunately this can happen even for interfacial shapes which are
not obviously under-resolved, for example a large bubble/drop
sufficiently deformed by turbulence. In this case, the bug may cause
this bubble to shed some fragments (in particular when the surface
tension coefficient is smaller than one) which can in turn further
destabilize the bubble etc.
If you want to convince yourself of the seriousness of this bug, re-run
the atomisation example:
http://basilisk.fr/src/examples/atomisation.c
with the buggy version and you will see that the number of small
droplets dramatically increases.
cheers,
Stephane