erizmr / SPH_Taichi

A high-performance implementation of SPH in Taichi.
194 stars 39 forks source link

compute pressure force error? #31

Open Bryan-Wong919 opened 2 weeks ago

Bryan-Wong919 commented 2 weeks ago

Hi, thanks for your greak work, it really inspires me a lot . However, i'm wondering whether it is correct to compute two pressure force while computing pressure acceleration between two fluid particles. 屏幕截图 2024-06-20 210046 In "Versatile Rigid-Fluid Coupling for Incompressible SPH", it only use one pressure force. In "Versatile Rigid-Fluid Coupling for Incompressible SPH": image I'm wondering if you take interaction force into consideration. But i think that it should not be correct? Looking forward to your reply!

erizmr commented 2 weeks ago

Hi @Bryan-Wong919, thanks for your interest on this project. The equation you refer to is a direct discretization of the pressure gradient. In real implementation, a symmetric formula is usually preferred for discretizing spatial differential operator (i.e., pressure gradient here), which can conserve linear and angular momentum and helps for robust simulation.

Bryan-Wong919 commented 2 weeks ago

Hi @Bryan-Wong919, thanks for your interest on this project. The equation you refer to is a direct discretization of the pressure gradient. In real implementation, a symmetric formula is usually preferred for discretizing spatial differential operator (i.e., pressure gradient here), which can conserve linear and angular momentum and helps for robust simulation.

Thanks for your quick reply! I think i have figure it out. But i'm troubled by another question: Is the pressure of the rigid body particle on the fluid particle considered here?Is it not taken into account here or do I not fully understand the code and theory? I'm a beginner in fluid simulation, forgive me if I asked questions which may be very simple.