← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2215: - Fix the distance correction in plastic slip.

 

------------------------------------------------------------
revno: 2215
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Tue 2010-05-11 14:25:19 +0200
message:
  - Fix the distance correction in plastic slip.
modified:
  pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp	2010-05-03 12:17:44 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp	2010-05-11 12:25:19 +0000
@@ -73,8 +73,8 @@
 	Vector3r p1=contPtInTgPlane1(), p2=contPtInTgPlane2();
 	Real currDistSq=(p2-p1).squaredNorm();
 	if(currDistSq<pow(displacementTMax,2)) return 0; // close enough, no slip needed
-	Vector3r diff=.5*(sqrt(currDistSq)/displacementTMax-1)*(p2-p1);
-	setTgPlanePts(p1+diff,p2-diff);
+	Vector3r diff=.5*(displacementTMax/sqrt(currDistSq)-1)*(p2-p1);
+	setTgPlanePts(p1-diff,p2+diff);
 	return 2*diff.norm();
 }
 


Follow ups