Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 199 forks source link

Wall velocity for Eulerian SPH is not correct. #476

Open Bo-Zhang1995 opened 5 months ago

Bo-Zhang1995 commented 5 months ago

https://github.com/Xiangyu-Hu/SPHinXsys/blob/c2c30ecc842e8ac1397be7424ee92e144bf0c335/src/shared/particle_dynamics/fluid_dynamics/eulerian_fluid_dynamics/eulerian_fluid_integration.hpp#L141

The wall speed is not correct for the Eulerian SPH when it involves the wall. For example, if the wall has a speed, like lip driven cavity, the wall speed should not be the negative speed of the particle i. It should be like the LG sph, vel_j = 2 * vel_wall - v_i.

Xiangyu-Hu commented 5 months ago

@ZhentongWang could you have a look at it? Thanks.

ZhentongWang commented 5 months ago

https://github.com/Xiangyu-Hu/SPHinXsys/blob/c2c30ecc842e8ac1397be7424ee92e144bf0c335/src/shared/particle_dynamics/fluid_dynamics/eulerian_fluid_dynamics/eulerian_fluid_integration.hpp#L141

The wall speed is not correct for the Eulerian SPH when it involves the wall. For example, if the wall has a speed, like lip driven cavity, the wall speed should not be the negative speed of the particle i. It should be like the LG sph, vel_j = 2 * vel_wall - v_i.

Yes, the velocity in wall as vel_in_wall = 2 vel_ave - v_i. I was just considering the static wall boundary condition for Eulerian cases in current, so the vel_ave is always zero. When I simulate the lid-driven cavity in Eulerian SPH method, I also use the equation vel_in_wall = 2 vel_ave - v_i but have not changed that equation in the current master. Therefore, the general equation for velocity in wall boundary is vel_j = 2 * vel_wall - v_i.

Xiangyu-Hu commented 5 months ago

@ZhentongWang So, should we change the code on this?

ZhentongWang commented 5 months ago

@ZhentongWang So, should we change the code on this?

yes, I will change the code and use the more general equation for wall velocity soon.