Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Process Floating Objects in "JSphCpuSingle" source file
  • dear developers
    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.
  • face for floating was computed including MASS during the interaction kernels
  • but face is computed in "RunFloating" and mass is not included there. if i'm wrong please tell me where is face exactly computed (in which source code) .
    actually face is equal to "acex+Gravity" and by this computation face will be acceleration.
    thanks a lot for answering