I have been working on a thesis about floating objects and encountered a problem in "JSphCpuSingle" source file.
in "FtCalcForces" function of this source file the acceleration of floating body particles is calculated by applying the following command:
" float acex=Acec[p].x-Gravity.x, acey=Acec[p].y-Gravity.y, acez=Acec[p].z-Gravity.z;
face.x+=acex; face.y+=acey; face.z+=acez;"
and in "RunFloating" function of this source file the following equation have been applied to calculate the acceleration of floating body:
and as we know "face" is the acceleration calculated for floating object and "Gravity" is the gravitational acceleration and "fmass" is the mass of floating object.
as we can see in "FtCalcForces" function "face" is calculated as the acceleration of floating body but in "RunFloating" function, without multiplying "face" in "fmass", face is considered as the force around floating object.
in other words "face" and "Gravity" are the same type of quantity (either force or acceleration) and I don't understand this command "face.x=(face.x+fmass*Gravity.x)/fmass;" that considers "face" as force quantity and "Gravity" as acceleration.
I appreciate your help.