← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2951: 1. delete line which was commented out by Anton

 

------------------------------------------------------------
revno: 2951
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
branch nick: yade
timestamp: Wed 2011-11-02 11:40:29 +1100
message:
  1. delete line which was commented out by Anton
  2. derive WirePhys from NormShearPhys in order to use implemented functions which just support NormShearPhys (NormPhys is not supported, however, in the future if more contact laws with normal force only are implemented it might be better to introduce a boolean or so)
modified:
  pkg/dem/WirePM.cpp
  pkg/dem/WirePM.hpp


--
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/WirePM.cpp'
--- pkg/dem/WirePM.cpp	2011-10-21 18:41:40 +0000
+++ pkg/dem/WirePM.cpp	2011-11-02 00:40:29 +0000
@@ -1,4 +1,4 @@
-/* Klaus Thoeni 2010  */
+/* Klaus Thoeni 2010 */
 
 #include"WirePM.hpp"
 #include<yade/core/Scene.hpp>
@@ -110,6 +110,9 @@
 		scene->forces.addForce(id1,-f);
 		scene->forces.addForce(id2,f);
 	}
+	
+	/* set shear force to zero */
+	phys->shearForce = Vector3r::Zero();;
 
 }
 
@@ -182,7 +185,6 @@
 	if ( contactPhysics->isDoubleTwist ) {
 		Real alpha = atan( l0 / (3.*Mathr::PI*mat1->diameter) );
 		Real kh = k * ( l0*mat1->diameter/crossSection ) / ( 48.*cos(alpha) * ( 41./9.*(1.+mat1->poisson) + 17./4.*pow(tan(alpha),2) ) );
-		//TRVAR2( kn, kh ); //Commented due to an error during debug-build: "yade/pkg/dem/WirePM.cpp:185:3: error: 'kn' was not declared in this scope"
 		k = 2. * ( mat1->lambdak*kh + (1-mat1->lambdak)*k );
 		Real F = k * DFValues[0](0);
 		Real mappingF = F/DFValues[0](1);

=== modified file 'pkg/dem/WirePM.hpp'
--- pkg/dem/WirePM.hpp	2011-07-29 02:38:16 +0000
+++ pkg/dem/WirePM.hpp	2011-11-02 00:40:29 +0000
@@ -57,11 +57,12 @@
 REGISTER_SERIALIZABLE(WireMat);
 
 /** This class holds information associated with each interaction */
-class WirePhys: public NormPhys {
+// NOTE: even if WirePhys has no shear force it is derived from NormShearPhys since all implemented functions work properly for NormShearPhys only
+class WirePhys: public NormShearPhys {
 	public:
 		virtual ~WirePhys();
 	
-		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(WirePhys,NormPhys,"Representation of a single interaction of the WirePM type, storage for relevant parameters",
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(WirePhys,NormShearPhys,"Representation of a single interaction of the WirePM type, storage for relevant parameters",
 			((Real,initD,0,,"Equilibrium distance for particles. Computed as the initial inter-particular distance when particle are linked."))
 			((bool,isLinked,false,,"If true particles are linked and will interact. Interactions are linked automatically by the definition of the corresponding interaction radius. The value is false if the wire breaks (no more interaction)."))
 			((bool,isDoubleTwist,false,,"If true the properties of the interaction will be defined as a double-twisted wire."))