twall normal force changed to avoid attraction, sign test - 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 35b9d27b4dc7e82477a881d891b4eaf9ae572b70
(DIR) parent 3541524c4cd9b0c3c474232ca6bb9e469e5b5546
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Fri, 20 Jun 2014 09:27:33 +0200
wall normal force changed to avoid attraction, sign test
Diffstat:
M src/contactmodels.cuh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/contactmodels.cuh b/src/contactmodels.cuh
t@@ -50,7 +50,9 @@ __device__ Float contactLinear_wall(Float3* F, Float3* T, Float* es_dot,
// Normal force component: Elastic - viscous damping
//Float3 f_n = (-devC_params.k_n * delta - devC_params.gamma_wn * vel_n) * n;
- Float3 f_n = (-devC_params.k_n * delta + devC_params.gamma_wn * vel_n) * n;
+ //Float3 f_n = (-devC_params.k_n * delta + devC_params.gamma_wn * vel_n) * n;
+ Float3 f_n = fmax(0.0, -devC_params.k_n*delta
+ - devC_params.gamma_wn*vel_n) * n;
// Print data for contact model validation
/*printf("f_n_elast = %f\tgamma_wn = %f\tf_n_visc = %f\n",