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://xiangyu-hu.github.io/SPHinXsys/
Apache License 2.0
319 stars 235 forks source link

Wall velocity for Eulerian SPH is not correct. #476

Open Bo-Zhang1995 opened 1 year ago

Bo-Zhang1995 commented 1 year 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 1 year ago

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

ZhentongWang commented 1 year 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 1 year ago

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

ZhentongWang commented 12 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.

Xiangyu-Hu commented 2 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.

@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.

@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.

@ZhentongWang Is this done already?

ZhentongWang commented 2 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.

@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.

@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.

@ZhentongWang Is this done already?

I have created a pull request to have it fixed. i.e. Vecd vel_in_wall = 2.0 * vel_ave_k[index_j] - statei.vel.

Xiangyu-Hu commented 2 months ago

@ZhentongWang Could link this issue to the branch for fixing? So that, this issue will close automatically after the pull request is done.