Computational-Multiphase-Physics / acceleration_incompatibleWiththree-phase

[Bug] and [Fix]: using the vanilar acceleration event with three-phase + elasticity does not work
MIT License
0 stars 0 forks source link

Acceleration event incompatible with three-phase or elastic three phase #1

Closed VatsalSy closed 2 months ago

VatsalSy commented 2 months ago

Find out what is causing the bug. Is it a three-phase problem compatibility issue or is it due to the elastic code or (most likely) it is a three-phase elastic issue.

Potentially, if (as I suspect) it a compatibility issue due to reinitialization of the acceleration event, the code http://basilisk.fr/src/test/fall.c would also suffer from the same bug. ...

For now, just use the reduced gravity approach. The code: https://github.com/Computational-Multiphase-Physics/acceleration_incompatibleWiththree-phase/blob/main/src-local/reduced-three-phase-nonCoalescing.h works.

VatsalSy commented 2 months ago

Figuring out what causes this issue is essential. The fix is already there with https://github.com/Computational-Multiphase-Physics/acceleration_incompatibleWiththree-phase/blob/main/src-local/reduced-three-phase-nonCoalescing.h

ayushkumardixit commented 2 months ago

Reduced.h is working as expected but when acceleration terms are added directly, gravity is not working correctly. For adding the acceleration terms, hydrostatic pressure has to develop, and probably using a periodic domain doesn't allow this.

I checked both codes without the periodic domain, it is working fine now. Both of them give exactly the same results. Most likely, this is the reason that things have been working fine for Jiahua's soft sliding case.

VatsalSy commented 2 months ago

Ok. Sounds good. Please push this test to the repo: keep the periodic code as well.

For https://github.com/Computational-Multiphase-Physics/SoftSliding/pull/6: let us use the reduced approach as it is better than the traditional acceleration approach.

VatsalSy commented 2 months ago

for https://github.com/Computational-Multiphase-Physics/SoftSliding/pull/6: in any case, it helps with the gravity driving (earlier we have to use f1[]Bondsin(alpha)...