From 578bcf0fb0d22842f360352acd0f2d696bde8822 Mon Sep 17 00:00:00 2001 From: "Dan S. Bolintineanu" Date: Fri, 16 Aug 2019 01:19:08 -0600 Subject: [PATCH] Fixes normal force calculation bug in fix wall granular, allows twisting to be used without rolling in fix/wall/gran --- src/GRANULAR/fix_wall_gran.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 8513fc702b..15c8c7519c 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -1149,11 +1149,11 @@ void FixWallGran::granular(double rsq, double dx, double dy, double dz, else{ knfac = E; //Hooke a = sqrt(dR); + Fne = knfac*delta; if (normal_model != HOOKE) { Fne *= a; knfac *= a; } - Fne = knfac*delta; if (normal_model == DMT) Fne -= 4*MY_PI*normal_coeffs[3]*Reff; } @@ -1294,10 +1294,12 @@ void FixWallGran::granular(double rsq, double dx, double dy, double dz, // rolling resistance //**************************************** - if (roll_model != ROLL_NONE) { + if (roll_model != ROLL_NONE || twist_model != NONE) { relrot1 = omega[0]; relrot2 = omega[1]; relrot3 = omega[2]; + } + if (roll_model != ROLL_NONE){ // rolling velocity, see eq. 31 of Wang et al, Particuology v 23, p 49 (2015) // This is different from the Marshall papers,