← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3711: Anecdotic changes in an example script

 

------------------------------------------------------------
revno: 3711
committer: Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx>
timestamp: Mon 2013-10-14 10:28:54 +0200
message:
  Anecdotic changes in an example script
modified:
  examples/jointedCohesiveFrictionalPM/gravityBis.py


--
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 'examples/jointedCohesiveFrictionalPM/gravityBis.py'
--- examples/jointedCohesiveFrictionalPM/gravityBis.py	2013-10-04 09:47:21 +0000
+++ examples/jointedCohesiveFrictionalPM/gravityBis.py	2013-10-14 08:28:54 +0000
@@ -10,6 +10,7 @@
 dimModele = 10.0
 pred = pack.inAlignedBox((0,0,0),(dimModele,dimModele,dimModele))
 
+
 # the packing of spheres :
 
 def mat(): return JCFpmMat(type=1,young=1e8,frictionAngle=radians(30),density=3000)
@@ -21,6 +22,9 @@
 print ''
 sp = pack.randomDensePack(pred,radius=rMeanSpheres,rRelFuzz=0.3,memoizeDb='/tmp/gts-triax-packings.sqlite',returnSpherePack=True)
 sp.toSimulation(color=(0.9,0.8,0.6),wire=False,material=mat)
+print ''
+print 'Sample created !'
+
 
 # Definition of the facets for joint's geometry
 
@@ -73,17 +77,15 @@
       ## to identify indicator on top
       if o.state.pos[2]>(zsup-e) and o.state.pos[0]>(xsup-e) and o.state.pos[1]>((yinf+ysup-e)/2.0) and o.state.pos[1]<((yinf+ysup+e)/2) : 
 	refPoint=o.id
-	p0=o.state.pos[2] # its initial position
 
 O.bodies[refPoint].shape.highlight=True
 
 #### Engines definition
-interactionRadius=1. # to set initial contacts to larger neighbours
 O.engines=[
 	ForceResetter(),
-	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=interactionRadius),]),
+	InsertionSortCollider([Bo1_Sphere_Aabb(),]),
 	InteractionLoop(
-		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=interactionRadius)],
+		[Ig2_Sphere_Sphere_ScGeom()],
 		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,alpha=0.3,tensileStrength=1e6,cohesion=1e6,jointNormalStiffness=1e7,jointShearStiffness=1e7,jointCohesion=1e6,jointFrictionAngle=radians(20),jointDilationAngle=0.0)],
 		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=True)]
 	),
@@ -96,10 +98,11 @@
 
 #### dataCollector
 from yade import plot
-plot.plots={'iterations':('v',)}
+#plot.plots={'iterations':('v',)}
+plot.plots={'x':('z',)}
 def dataCollector():
 	R=O.bodies[refPoint]
-	plot.addData(v=R.state.vel[2],p=R.state.pos[2]-p0,iterations=O.iter,t=O.realtime)
+	plot.addData(v=R.state.vel[2],z=R.state.pos[2],x=R.state.pos[0],iterations=O.iter,t=O.realtime)
 
 #### joint strength degradation
 stableIter=2000
@@ -118,8 +121,8 @@
 		  i.phys.FsMax=0.
 
 O.step()
-print ''
-print 'Seeking first after an initial equilibrium state'
+
+print 'Seeking after an initial equilibrium state'
 print ''
 O.run(10000)
-plot.plot()
+plot.plot()# note the straight line (during sliding step, before free fall) despite the discretization of joint plane with spheres