Hello Darwin,
The workflow makes sense. The major difference between computeSphereContactForces_matBased() and computeSphereContactForce() is that the first one use material-based property in contact force model, namely, youngs modulus, poisson ratio and coefficient of restitution, the second one use user-defined parameters. Take a look at demo_GPU_balldrop.cpp, where UseMaterialBasedModel(true) is used and parameters are set, when you run the simulation, computeSphereContactForces_matBased() is called. The default setting is using user-defined parameters of kn, gn, kt, gt, associated with spring-damper model of contact forces, in which case, computeSphereContactForce() is called. There are other small differences between these two, more details are in
this paper equation (3), (4) (18) and (19).
I looked at your changes, when implementing your own force model in GPU, you need to convert the units into simulation units. Because in GPU, integers are used to describe particle positions for fast performance. To maintain the resolution, particles are scaled a lot larger so every integer can be used. Basic units conversion in length, mass and time are pre-calculated and stored, so you can use them freely in your own force model, like gran_params->LENGTH_UNIT.
Take a look at switchToSimUnits() in ChSystemGpu_impl.cpp, it shows how LENGTH_SU2UU, MASS_SU2UU and TIME_SU2UU are computed, where SU2UU stands for "simulation unit to user unit", and the conversion goes: length_uu = length_su * length_su2uu. That part of the code also use basic units to get conversion of other quantities, like acceleration, torque, stiffness, etc. For example, youngs modulus, E_su2uu = mass_su2uu / (length_su2uu * time_su2uu^2). You will have to do this for your interfacial surface energy parameter.
The default output of positions and force handles conversion from SU to UU, but if you want to customize the cohesive force output, you will have to do your own conversion as well.
Thank you,
Luning