code-question about the floating object according to JSphGpu_ker.cu

edited August 2017 in DualSPHysics_v4.0
Hello everyone,

I am reading the code about the floating objects (source code: JSphGpu_ker.cu).
I am confused about the definition of “ftoforces” in subroutine KerFtCalcForces and KerFtUpdate.

According the KerFtCalcForces (Line: 2184, 2185 like race.x-=gravity.x) ftoforces [cf*2] (or race, face) should correspond to the accumulated acceleration (or race should be particle acceleration). However, ftoforces[cf*2+1] should represent the Angular-Acceleration which means the race should represent the force acting on the particles.

According to KerFtUpdate (Line: 2298 face.x=(face.x+fmass*gravity.x)/fmass;), ftoforces[cf*2] should be absolutely the accumulated force for floating objective which means the race should be the force acting on the particles.

Can anyone explain the conflict of the definition about ftoforces [cf*2]?

I also checked the definition about the parameter ace used in Line2184 and I found that in Line731, the ace for floating particles is calculated by the equation:
“p_vpm=-prs*(USE_FLOATING? ftmassp2*ftmassp1: massp2);”. Does this mean that ace for floating particles represents the force acting on the floating particles rather than particle acceleration? If so, how to explain the Line2185 like race.x-=gravity.x?

Regards
Chong
Sign In or Register to comment.