← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3849: fixed computation of shearForce in Law2_PolyhedraGeom_PolyhedraPhys_Volumetric

 

------------------------------------------------------------
revno: 3849
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Wed 2016-04-20 10:54:55 +0200
message:
  fixed computation of shearForce in Law2_PolyhedraGeom_PolyhedraPhys_Volumetric
modified:
  pkg/dem/Polyhedra.cpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/Polyhedra.cpp'
--- pkg/dem/Polyhedra.cpp	2016-04-19 01:27:38 +0000
+++ pkg/dem/Polyhedra.cpp	2016-04-20 08:54:55 +0000
@@ -504,7 +504,8 @@
 					"elastPotential",elastPotentialIx,true);
 			}
 		} else {
-			shearForce = Vector3r::Zero();
+			scene->energy->add(0.5*(normalForce.squaredNorm()/phys->kn+shearForce.squaredNorm()/phys->ks),
+				"elastPotential",elastPotentialIx,true);
 		}
 		Vector3r F = -normalForce-shearForce;	
 		if (contactGeom->equivalentPenetrationDepth != contactGeom->equivalentPenetrationDepth) exit(1);