I want to add a feature to the NVidia Particle example included in the SDK.
/Developer/NVIDIA/CUDA-8.0/samples/5_Simulations/particles
The feature is to track the contacts between particles between subsequent time steps. In the sample contacts are not tracked. I would like to keep track of the contacts and incrementally contact the normal force. In the collideSpheres function in [login to view URL] the following line:
// tangential shear force
force += [login to view URL]*tanVel;
would be replaced by something like:
delta.x += varis->delta_t*vrs.x;
delta.y += varis->delta_t*vrs.y;
delta.z += varis->delta_t*vrs.z;
shear.x = delta.x * varis->kc;
shear.y = delta.y * varis->kc;
shear.z = delta.z * varis->kc;
double friction_force = [login to view URL]();
double max_friction_force = friction*varis->kc*penet;
if (friction_force > max_friction_force) {
delta.x *= max_friction_force/friction_force;
delta.y *= max_friction_force/friction_force;
delta.z *= max_friction_force/friction_force;
shear.x = delta.x * varis->kc;
shear.y = delta.y * varis->kc;
shear.z = delta.z * varis->kc;
}
where the delta.x , y, z is tracked for each contact between iterations.
Looking for someone with good CUDA skills that can implement this properly.