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

use force and force_prior to replace acc and acc_prior #482

Closed ZhentongWang closed 5 months ago

Xiangyu-Hu commented 5 months ago

@ZhentongWang so the time integration methods are updated correspondingly?

ZhentongWang commented 5 months ago

@ZhentongWang so the time integration methods are updated correspondingly?

the time integration you mentioned is like the viscous force in the viscous force calculation, velocity update in the pressure relaxation and density update in the density relaxation and so on. If so, I have changed and used force and force_prior to update all variables in fluid and solid dynamics.

For example, the velocity updated as follows vel_[index_i] += (forceprior[indexi] + force[indexi]) / mass[index_i] * dt;