tavoid attraction due to heavy damping - sphere - GPU-based 3D discrete element… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit bc4a7d56a928f043cd7525327b6573b8edf0a586 | |
parent f6c8394ac2e8e2c86191521693237b39387e8e29 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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) * … | |
// Store energy dissipated in normal viscous component | |
// watt = gamma_n * vel_n * dx_n / dt |