← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3752: some polishing

 

------------------------------------------------------------
revno: 3752
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
timestamp: Wed 2015-12-09 11:17:37 +1100
message:
  some polishing
modified:
  examples/chained-cylinders/CohesiveCylinderSphere.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/chained-cylinders/CohesiveCylinderSphere.py'
--- examples/chained-cylinders/CohesiveCylinderSphere.py	2013-03-28 16:15:54 +0000
+++ examples/chained-cylinders/CohesiveCylinderSphere.py	2015-12-09 00:17:37 +0000
@@ -1,11 +1,9 @@
 # encoding: utf-8
-from yade import pack,geom,qt
-from pylab import *
+from yade import qt
+
 qt.View()
 
 O.dt=5e-07
-young=2e4
-
 
 O.materials.append(CohFrictMat(young=8e5,poisson=0.3,density=4e3,frictionAngle=radians(30),normalCohesion=1e5,shearCohesion=1e5,momentRotationLaw=True,label='cylindermat'))
 
@@ -20,16 +18,13 @@
 O.bodies[0].state.blockedDOFs='xyzXYZ'
 O.bodies[-1].state.blockedDOFs='xyzXYZ'
 
-O.bodies.append(sphere([0.15,0,2.*rCyl],rCyl,wire=False,fixed=False,material='spheremat'))
+IdSphere=O.bodies.append(sphere([0.15,0,2.*rCyl],rCyl,wire=False,fixed=False,material='spheremat'))
 
 def main():
-	global Fn,Ft
-	IdSphere=len(O.bodies)-1
 	if O.iter>50000 :
 		O.bodies[IdSphere].dynamic=False
 		O.bodies[IdSphere].state.vel[2]=0.1
 
-
 O.engines=[
 	ForceResetter(),
 	InsertionSortCollider([
@@ -37,22 +32,23 @@
 		Bo1_Sphere_Aabb(),
 	]),
 	InteractionLoop(
-		#Geometric interactions :
+		#Geometric interactions
 		[Ig2_ChainedCylinder_ChainedCylinder_ScGeom6D(),
 		Ig2_Sphere_ChainedCylinder_CylScGeom6D(),	#used for the cohesive sphere-cylinder interaction
-		Ig2_Sphere_Sphere_ScGeom6D()],
+#		Ig2_Sphere_Sphere_ScGeom6D()
+        ],
 		#Physical interactions
 		[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True,label='ipf'),
-		Ip2_FrictMat_FrictMat_FrictPhys()],
-		#Lois de contact :
+#		Ip2_FrictMat_FrictMat_FrictPhys()
+  ],
+		#LContact Laws:
 		[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
 		Law2_CylScGeom6D_CohFrictPhys_CohesionMoment(),	#used for the cohesive sphere-cylinder interaction
-		Law2_ScGeom_FrictPhys_CundallStrack(),]
+#		Law2_ScGeom_FrictPhys_CundallStrack(),
+]
 	),
 	## Motion equation
 	NewtonIntegrator(gravity=(0,0,0),damping=0.3,label='newton'),
 	PyRunner(command='main()',iterPeriod=1000),
 ]
 
-
-