← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3743: Modifying JCFpm example scripts so that they still work after previous commit

 

------------------------------------------------------------
revno: 3743
committer: Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx>
timestamp: Mon 2013-11-04 15:30:22 +0100
message:
  Modifying JCFpm example scripts so that they still work after previous commit
modified:
  examples/jointedCohesiveFrictionalPM/gravityBis.py
  examples/jointedCohesiveFrictionalPM/gravityLoading.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-11-04 14:20:24 +0000
+++ examples/jointedCohesiveFrictionalPM/gravityBis.py	2013-11-04 14:30:22 +0000
@@ -13,7 +13,7 @@
 
 # the packing of spheres :
 
-def mat(): return JCFpmMat(type=1,young=1e8,poisson=0.3,frictionAngle=radians(30),density=3000)
+def mat(): return JCFpmMat(type=1,young=1e8,poisson=0.3,frictionAngle=radians(30),density=3000,tensileStrength=1e6,cohesion=1e6,jointNormalStiffness=1e7,jointShearStiffness=1e7,jointCohesion=1e6,jointFrictionAngle=radians(20),jointDilationAngle=0.0)
 nSpheres = 3000.0
 poros=0.13
 rMeanSpheres = dimModele * pow(3.0/4.0*(1-poros)/(pi*nSpheres),1.0/3.0)
@@ -86,7 +86,8 @@
 	InsertionSortCollider([Bo1_Sphere_Aabb(),]),
 	InteractionLoop(
 		[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)],
+#		[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)],
+		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
 		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=True)]
 	),
 	GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.8),
@@ -98,8 +99,8 @@
 
 #### dataCollector
 from yade import plot
-#plot.plots={'iterations':('v',)}
-plot.plots={'x':('z',)}
+plot.plots={'iterations':('v',)}
+#plot.plots={'x':('z',)}
 def dataCollector():
 	R=O.bodies[refPoint]
 	plot.addData(v=R.state.vel[2],z=R.state.pos[2],x=R.state.pos[0],iterations=O.iter,t=O.realtime)
@@ -110,7 +111,7 @@
 degrade=True
 def jointStrengthDegradation():
     global degrade
-    if degrade and O.iter>=stableIter and abs(O.bodies[refPoint].state.vel[1])<stableVel :
+    if degrade and O.iter>=stableIter and abs(O.bodies[refPoint].state.vel[2])<stableVel :
 	print '!joint cohesion total degradation!', ' | iteration=', O.iter
 	degrade=False
 	for i in O.interactions:

=== modified file 'examples/jointedCohesiveFrictionalPM/gravityLoading.py'
--- examples/jointedCohesiveFrictionalPM/gravityLoading.py	2013-08-01 11:54:13 +0000
+++ examples/jointedCohesiveFrictionalPM/gravityLoading.py	2013-11-04 14:30:22 +0000
@@ -56,11 +56,11 @@
     j31 = float(line.split()[9])
     j32 = float(line.split()[10])
     j33 = float(line.split()[11])
-    O.bodies[id].mat.onJoint=onJ
-    O.bodies[id].mat.joint=nj
-    O.bodies[id].mat.jointNormal1=(j11,j12,j13)
-    O.bodies[id].mat.jointNormal2=(j21,j22,j23)
-    O.bodies[id].mat.jointNormal3=(j31,j32,j33)
+    O.bodies[id].state.onJoint=onJ
+    O.bodies[id].state.joint=nj
+    O.bodies[id].state.jointNormal1=(j11,j12,j13)
+    O.bodies[id].state.jointNormal2=(j21,j22,j23)
+    O.bodies[id].state.jointNormal3=(j31,j32,j33)
 inFile.close
 
 #### Boundary conditions