tfrictional model verified - 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 5dfe62b3e9c41649433d64737c1c27459b567940
 (DIR) parent 22e628495585c3145e362c918c9e62dab291a147
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri, 20 Jun 2014 13:16:59 +0200
       
       frictional model verified
       
       Diffstat:
         M src/contactmodels.cuh               |       2 +-
         M tests/contactmodel.py               |      22 +++++++++++++---------
       
       2 files changed, 14 insertions(+), 10 deletions(-)
       ---
 (DIR) diff --git a/src/contactmodels.cuh b/src/contactmodels.cuh
       t@@ -454,7 +454,7 @@ __device__ void contactLinear(Float3* F, Float3* T,
                    // The energy lost from the tangential spring is dissipated as heat
                    //*es_dot += -dot(vel_t_ab, f_t);
                    //*es_dot += length(delta_t0 - delta_t) * devC_params.k_t / devC_dt;
       -            *es_dot += length(length(f_t) * vel_t * devC_dt) / devC_dt; // Seen in ESyS-Particle
       +            *es_dot += 0.5*length(length(f_t) * vel_t * devC_dt) / devC_dt; // Seen in ESyS-Particle
                    //*es_dot += fabs(dot(delta_t0 - delta_t, f_t)) / devC_dt; 
        
                } //else { // Static case
 (DIR) diff --git a/tests/contactmodel.py b/tests/contactmodel.py
       t@@ -153,11 +153,12 @@ orig.initTemporal(total = 0.1, file_dt = 0.01)
        
        orig.run(verbose=False)
        after.readlast(verbose=False)
       -print(after.es)
       +pytestutils.test((after.angvel[:,1] < 0.0).all(),
       +                 "Oblique normal collision (1/5):")
        pytestutils.compareFloats(orig.totalKineticEnergy(),
                                  after.totalKineticEnergy()
       -                          + after.totalRotationalEnergy(),\
       -        "Oblique normal collision (1/4):", tolerance=0.05)
       +                          + after.totalRotationalEnergy(),
       +                          "Oblique normal collision (2/5):", tolerance=0.05)
        
        # Normal impact, low angle, slip
        orig = sphere.sim(np=2, sid='contactmodeltest')
       t@@ -169,16 +170,19 @@ orig.x[0,:] = [5.0, 5.0, 2.0]
        orig.x[1,:] = [5.0, 5.0, 4.05]
        orig.vel[0,2] = 1
        orig.vel[0,0] = 1
       -orig.mu_s[0] = 0.0
       -orig.mu_d[0] = 0.0
       +orig.mu_s[0] = 0.3
       +orig.mu_d[0] = 0.3
        orig.defineWorldBoundaries(L=[10,10,10])
        orig.initTemporal(total = 0.1, file_dt = 0.01)
        
        orig.run(verbose=False)
        after.readlast(verbose=False)
       -print(after.es)
        pytestutils.compareFloats(orig.totalKineticEnergy(),
                                  after.totalKineticEnergy()
       -                          + after.totalRotationalEnergy(),\
       -        "Oblique normal collision (2/4):", tolerance=0.05)
       -
       +                          + after.totalRotationalEnergy()
       +                          + after.totalFrictionalEnergy(),
       +                          "Oblique normal collision (3/5):", tolerance=0.05)
       +pytestutils.test((after.angvel[:,1] < 0.0).all(),
       +                 "Oblique normal collision (4/5):")
       +pytestutils.test(after.totalFrictionalEnergy() > 0.0,
       +                 "Oblique normal collision (5/5):")