[Bug] and [Fix]: using the vanilar acceleration event with three-phase + elasticity does not work
event acceleration (i++)
{
face vector av = a;
foreach_face()
if (fm.x[] > 1e-20) {
double shear = (tau_p.x.y[0,1]*cm[0,1] + tau_p.x.y[-1,1]*cm[-1,1] -
tau_p.x.y[0,-1]*cm[0,-1] - tau_p.x.y[-1,-1]*cm[-1,-1])/4.;
av.x[] += (shear + cm[]*tau_p.x.x[] - cm[-1]*tau_p.x.x[-1])*
alpha.x[]/(sq(fm.x[])*Delta);
}
#if AXI
foreach_face(y)
if (y > 0.)
av.y[] -= (tau_qq[] + tau_qq[0,-1])*alpha.y[]/sq(y)/2.;
#endif
}
event acceleration(i++){
face vector av = a;
foreach_face(x){
av.x[] += Bond;
}
}
Use src-local/reduced-three-phase-nonCoalescing.h. See testGravity_Withreduced.c.
The drop at the center (blue) should have gone up as it is lighter than the surrounding and gravity is downwards. The video on the right is the correct implementation.
Aug 5, 2024
In theory, codes testGravity_noreduced.c and testGravity_Withreduced.c. Exactly what part of the code is responsible for the bug is not clear. More investigation is needed.
Note: Although the code has elasticity (becuase I am unsure if the bug is a three-phase bug or a elastic bug--that will be the first thing to check), the elastic modulus (set by the elasto-capillary number $Ec$) is set to zero.
Aug 10, 2024
This seems to be an issue with ``periodic" boundary condition.