← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2535: Details

 

------------------------------------------------------------
revno: 2535
committer: jduriez <jduriez@c1solimara-l>
branch nick: yade
timestamp: Mon 2010-11-08 11:10:00 +0100
message:
  Details
  
  Change of variable names in .py, suppress of commented lines in .cpp
modified:
  pkg/dem/NormalInelasticityLaw.cpp
  scripts/normalInelasticity-test.py


--
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/NormalInelasticityLaw.cpp'
--- pkg/dem/NormalInelasticityLaw.cpp	2010-11-03 15:50:02 +0000
+++ pkg/dem/NormalInelasticityLaw.cpp	2010-11-08 10:10:00 +0000
@@ -165,25 +165,7 @@
 
 		if(momentRotationLaw)
 		{
-// 			{// updates only orientation of contact (local coordinate system)
-// 				Vector3r axis = currentContactPhysics->prevNormal.cross(currentContactGeometry->normal); axis.normalize();
-// 				Real angle =  unitVectorsAngle(currentContactPhysics->prevNormal,currentContactGeometry->normal);
-// 				Quaternionr align(AngleAxisr(angle,axis));
-// 				currentContactPhysics->currentContactOrientation =  align * currentContactPhysics->currentContactOrientation;
-// 			}
-// 
-// 			Quaternionr delta( de1->se3.orientation * currentContactPhysics->initialOrientation1.conjugate() *
-// 		                           currentContactPhysics->initialOrientation2 * de2->se3.orientation.conjugate());
-// 
-// 			AngleAxisr aa(delta); // aa.axis() of rotation - this is the Moment direction UNIT vector; angle represents the power of resistant ELASTIC moment
-// 			if(angle > Mathr::PI) angle -= Mathr::TWO_PI; // angle is between 0 and 2*pi, but should be between -pi and pi 
-
-//Real elasticMoment = currentContactPhysics->kr * std::abs(angle); // positive value (*)
-
-// 			Real angle_twist(aa.angle() * aa.axis().dot(currentContactGeometry->normal) );
-// 			Vector3r axis_twist(angle_twist * currentContactGeometry->normal);
 			Vector3r moment_twist( (currentContactGeometry->getTwist()*currentContactPhysics->kr)*currentContactGeometry->normal );
-// 			Vector3r axis_bending(aa.angle()*aa.axis() - axis_twist);
 			Vector3r moment_bending( currentContactGeometry->getBending() * currentContactPhysics->kr );
 
 			Vector3r moment = moment_twist + moment_bending;
@@ -196,7 +178,6 @@
 				if(normeMoment>normeMomentMax)
 					{
 					moment *= normeMomentMax/normeMoment;
-// 					nbreInteracMomPlastif++;
 					}
 			}
 			scene->forces.addTorque(id1,-moment);
@@ -205,8 +186,6 @@
 //	********	Moment law END				*******	 //
 
                 currentContactPhysics->prevNormal = currentContactGeometry->normal;
-//             }
-//         }
     }
 }
 

=== modified file 'scripts/normalInelasticity-test.py'
--- scripts/normalInelasticity-test.py	2010-11-03 15:50:02 +0000
+++ scripts/normalInelasticity-test.py	2010-11-08 10:10:00 +0000
@@ -52,7 +52,7 @@
 	vecFn=i.phys.normalForce
 	vecDist=upperSphere.state.pos-lowerSphere.state.pos
 	plot.addData(normFn=vecFn.norm(),normFnBis=vecFn.norm(),fnY=vecFn[1],step=O.iter,
-	  unPerso=lowerSphere.shape.radius+upperSphere.shape.radius-vecDist.norm(),unVrai=i.geom.penetrationDepth,
+	  unPerso=lowerSphere.shape.radius+upperSphere.shape.radius-vecDist.norm(),unTrue=i.geom.penetrationDepth,
 	  gamma=upperSphere.state.pos[0]-lowerSphere.state.pos[0],fx=O.forces.f(0)[0],torque=O.forces.t(1)[2])
 	#print i.geom.penetrationDepth
 
@@ -65,17 +65,16 @@
 O.run(2,True) #cycles "for free", so that the interaction between spheres will be defined (with his physics and so on)
 O.engines=O.engines+[PyRunner(iterPeriod=1,command='defData()')]
 
-
-
 O.run(40,True)
+print 'End of normal loading'
+
 
 # define of the plots to be made : un(step), and Fn(un)
-plot.plots={'step':('unVrai',),'unPerso':('normFn',),'unVrai':('normFnBis',)}
+plot.plots={'step':('unTrue',),'unPerso':('normFn',),'unTrue':('normFnBis',)}
 plot.plot()
 raw_input()
-print 'End of normal loading'
 print ''
-#NB : these different unVrai and unPerso illustrate the definition of penetrationDepth really used in the code (computed in Ig2_Sphere_Sphere_ScGeom) which is slightly different from R1 + R2 - Distance (see for example this "shift2"). According to the really used penetrationDepth, Fn evolves as it should
+#NB : these different unTrue and unPerso illustrate the definition of penetrationDepth really used in the code (computed in Ig2_Sphere_Sphere_ScGeom) which is slightly different from R1 + R2 - Distance (see for example this "shift2"). According to the really used penetrationDepth, Fn evolves as it should
 
 #O.saveTmp('EndComp')
 #O.save('FinN_I_Test.xml')
@@ -89,6 +88,7 @@
 Vector3.__init__(dpos,1*O.dt,0,0)
 O.engines=O.engines[:3]+[StepDisplacer(ids=[1],mov=dpos,setVelocities=True)]+O.engines[4:]
 O.run(1000)
+print 'End of tangential loading'
 plot.plots={'step':('gamma',),'gamma':('fx',)}
 plot.plot()
 raw_input()
@@ -97,7 +97,6 @@
 raw_input()
 #pylab.show() #to pause on the plot window. Effective only first time
 
-print 'End of tangential loading'
 print ''
 
 #-- Comments (r2528) --#
@@ -126,6 +125,8 @@
   print i.geom.penetrationDepth
   
 O.run(8000,True)
+print 'End of rotationnal loading'
+
 plot.plots={'step':('torque',)}
 plot.plot()