tavoid attraction due to heavy damping - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit bc4a7d56a928f043cd7525327b6573b8edf0a586
 (DIR) parent f6c8394ac2e8e2c86191521693237b39387e8e29
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Thu, 19 Jun 2014 14:42:24 +0200
       
       avoid attraction due to heavy damping
       
       Diffstat:
         M src/contactmodels.cuh               |       3 ++-
       
       1 file changed, 2 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/contactmodels.cuh b/src/contactmodels.cuh
       t@@ -384,7 +384,8 @@ __device__ void contactLinear(Float3* F, Float3* T,
            //f_n = -devC_params.k_n * delta * n_ab;
        
            // Normal force component: Elastic - viscous damping
       -    f_n = (-devC_params.k_n * delta - devC_params.gamma_n * vel_n) * n;
       +    //f_n = (-devC_params.k_n * delta - devC_params.gamma_n * vel_n) * n;
       +    f_n = fmax(-devC_params.k_n * delta - devC_params.gamma_n * vel_n, 0.0) * n;
        
            // Store energy dissipated in normal viscous component
            // watt = gamma_n * vel_n * dx_n / dt