← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2262: Some changes in examples

 

------------------------------------------------------------
revno: 2262
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-05-29 22:52:10 +0200
message:
  Some changes in examples
added:
  examples/simple-scene/
renamed:
  scripts/chain-distant-interactions.py => examples/chain-distant-interactions.py
  scripts/constitutive-law.py => examples/constitutive-law.py
  scripts/cylindrical-layer-packing.py => examples/cylindrical-layer-packing.py
  scripts/exact-rot-facet.py => examples/exact-rot-facet.py
  scripts/exact-rot.py => examples/exact-rot.py
  scripts/mindlin_test.py => examples/mindlin_test.py
  scripts/simple-scene-parallel.py => examples/simple-scene/simple-scene-parallel.py
  scripts/simple-scene-plot.py => examples/simple-scene/simple-scene-plot.py
  scripts/simple-scene.py => examples/simple-scene/simple-scene.py
modified:
  examples/baraban/baraban.py
  examples/bulldozer/bulldozer.py
  examples/bulldozer/bulldozerVTK.py
  examples/concrete/interaction-histogram.py
  examples/concrete/periodic.py
  examples/concrete/uniax-post.py
  examples/concrete/uniax.py
  examples/dynamic_simulation_tests/ringCundallDamping.py
  examples/dynamic_simulation_tests/ringSimpleViscoelastic.py
  examples/funnel.py
  examples/gts-horse/gts-horse.py
  examples/mill.py
  examples/regular-sphere-pack/regular-sphere-pack.py
  examples/rod_penetration/model.py
  examples/tunnel-pack.py
  scripts/NormalInelasticityTest.py
  scripts/simple-scene-player.py
  examples/chain-distant-interactions.py
  examples/constitutive-law.py
  examples/cylindrical-layer-packing.py
  examples/exact-rot-facet.py
  examples/exact-rot.py
  examples/mindlin_test.py
  examples/simple-scene/simple-scene-parallel.py
  examples/simple-scene/simple-scene-plot.py
  examples/simple-scene/simple-scene.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 'examples/baraban/baraban.py'
--- examples/baraban/baraban.py	2010-05-02 20:53:04 +0000
+++ examples/baraban/baraban.py	2010-05-29 20:52:10 +0000
@@ -1,5 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 import time
 
 ## PhysicalParameters 

=== modified file 'examples/bulldozer/bulldozer.py'
--- examples/bulldozer/bulldozer.py	2010-05-08 20:24:44 +0000
+++ examples/bulldozer/bulldozer.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 ### Simpificated buldozer simulation
 from yade import utils
 from numpy import linspace

=== modified file 'examples/bulldozer/bulldozerVTK.py'
--- examples/bulldozer/bulldozerVTK.py	2010-05-08 20:24:44 +0000
+++ examples/bulldozer/bulldozerVTK.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 ### Simpificated buldozer simulation with VTK recorder
 from yade import utils
 from numpy import linspace

=== renamed file 'scripts/chain-distant-interactions.py' => 'examples/chain-distant-interactions.py'
--- scripts/chain-distant-interactions.py	2010-05-02 16:02:29 +0000
+++ examples/chain-distant-interactions.py	2010-05-29 20:52:10 +0000
@@ -1,18 +1,19 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
-
-o=Omega()
-o.initializers=[
-	BoundDispatcher([
-		Bo1_Sphere_Aabb(),Bo1_Box_Aabb()
-	]
-o.engines=[
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+
+O.engines=[
 	ForceResetter(),
-	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()])
+	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 	InsertionSortCollider(),
-	InteractionGeometryDispatcher([Ig2_Sphere_Sphere_ScGeom(hasShear=True)]),
-	InteractionPhysicsDispatcher([Ip2_FrictMat_FrictMat_FrictPhys()]),
-	ElasticContactLaw(isCohesive=True),
+	InteractionDispatchers(
+		## Create geometry information about each potential collision.
+		[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
+		## Create physical information about the interaction.
+		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
+		## Constitutive law
+		[Law2_ScGeom_ViscElPhys_Basic()],
+	),
 	TorqueEngine(subscribedBodies=[1],moment=(0,1000,0)),
 	GravityEngine(gravity=(0,0,1e-2)),
 	NewtonIntegrator(damping=0.2)
@@ -21,24 +22,19 @@
 from yade import utils
 from math import *
 for n in range(5):
-	o.bodies.append(utils.sphere([0,n,0],.5,dynamic=(n>0),color=[1-(n/20.),n/20.,0],young=30e9,poisson=.3,density=2400))
+	O.bodies.append(utils.sphere([0,n,0],.5,dynamic=(n>0),color=[1-(n/20.),n/20.,0]))
 	# looks for metaengine found in Omega() and uses those
 	if n>0: utils.createInteraction(n-1,n)
-for i in o.interactions: i.phys['ks']=1e7
-
-
-o.dt=utils.PWaveTimeStep()
-o.saveTmp('init')
+for i in O.interactions: i.phys['ks']=1e7
+
+
+O.dt=utils.PWaveTimeStep()
+O.saveTmp('init')
 
 try:
 	from yade import qt
+	qt.View()
 	renderer=qt.Renderer()
-	renderer['Body_wire']=True
-	renderer['Interaction_geometry']=True
+	renderer.wire=True
+	renderer.intrGeom=True
 except ImportError: pass
-
-
-#o.save('/tmp/a.xml.bz2')
-#o.reload()
-#o.run(50000,True)
-#print o.iter/o.realtime

=== modified file 'examples/concrete/interaction-histogram.py'
--- examples/concrete/interaction-histogram.py	2010-05-03 12:17:44 +0000
+++ examples/concrete/interaction-histogram.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 #
 # demonstration of the yade.post2d module (see its documentation for details)
 #

=== modified file 'examples/concrete/periodic.py'
--- examples/concrete/periodic.py	2010-05-03 12:17:44 +0000
+++ examples/concrete/periodic.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 from __future__ import division
 
 from yade import utils,plot,pack

=== modified file 'examples/concrete/uniax-post.py'
--- examples/concrete/uniax-post.py	2010-05-03 12:17:44 +0000
+++ examples/concrete/uniax-post.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 #
 # demonstration of the yade.post2d module (see its documentation for details)
 #

=== modified file 'examples/concrete/uniax.py'
--- examples/concrete/uniax.py	2010-05-06 15:26:07 +0000
+++ examples/concrete/uniax.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 from __future__ import division
 
 from yade import utils,plot,pack,timing,eudoxos

=== renamed file 'scripts/constitutive-law.py' => 'examples/constitutive-law.py'
--- scripts/constitutive-law.py	2010-01-10 09:09:32 +0000
+++ examples/constitutive-law.py	2010-05-29 20:52:10 +0000
@@ -1,5 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 O.initializers=[
 	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
@@ -10,26 +10,28 @@
 	InsertionSortCollider(),
 	InteractionGeometryDispatcher([Ig2_Sphere_Sphere_ScGeom()]),
 	InteractionPhysicsDispatcher([Ip2_FrictMat_FrictMat_FrictPhys()]),
-	ConstitutiveLawDispatcher([Law2_ScGeom_FrictPhys_Basic()]),
+	LawDispatcher([Law2_ScGeom_FrictPhys_Basic()]),
 	GravityEngine(gravity=(0,0,-1000)),
 	NewtonIntegrator(damping=0.2)
 ]
 
 for n in range(30):
 	O.bodies.append(utils.sphere([0,n,0],.50001,dynamic=(n>0),color=[1-(n/20.),n/20.,0]))
-O.bodies[len(O.bodies)-1]['isDynamic']=False
+O.bodies[len(O.bodies)-1].isDynamic=False
 #	# looks for metaengine found in Omega() and uses those
 #	if n>0: utils.createInteraction(n-1,n)
 #for i in O.interactions: i.phys['ks']=1e9
 
-O.dt=utils.PWaveTimeStep()
+O.dt=utils.PWaveTimeStep()*0.001
 O.saveTmp('init')
 
 try:
 	from yade import qt
+	qt.View()
 	renderer=qt.Renderer()
-	renderer['Body_wire']=True
-	renderer['Interaction_geometry']=True
+	renderer.wire=True
+	renderer.intrGeom=True
 except ImportError: pass
-O.run(100,True)
+
+O.run(100000,True)
 

=== renamed file 'scripts/cylindrical-layer-packing.py' => 'examples/cylindrical-layer-packing.py'
--- scripts/cylindrical-layer-packing.py	2010-01-10 09:09:32 +0000
+++ examples/cylindrical-layer-packing.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# encoding: utf-8
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 from math import *
 
 
@@ -38,16 +39,16 @@
 wLat2=utils.box([0-.5*wallDist-.5*wallThickness,0,0],[.5*wallThickness,wallSize,wallSize]); o.bodies.append(wLat2);
 
 #angle walls, they cross at the x-axis
-wAng1=utils.box([0,0,0],[.55*wallDist,.5*wallThickness,wallSize*sqrt(2)]); wAng1.phys.ori=Quaternion((1,0,0),pi/4); o.bodies.append(wAng1); 
-wAng2=utils.box([0,0,0],[.55*wallDist,.5*wallThickness,wallSize*sqrt(2)]); wAng2.phys.ori=Quaternion((1,0,0),-pi/4); o.bodies.append(wAng2)
+wAng1=utils.box([0,0,0],[.55*wallDist,.5*wallThickness,wallSize*sqrt(2)]); wAng1.state.ori=Quaternion((1,0,0),pi/4); o.bodies.append(wAng1); 
+wAng2=utils.box([0,0,0],[.55*wallDist,.5*wallThickness,wallSize*sqrt(2)]); wAng2.state.ori=Quaternion((1,0,0),-pi/4); o.bodies.append(wAng2)
 
 #cap
 wCap=utils.box([0,0,wallSize],[.55*wallDist,wallSize,.5*wallThickness]); o.bodies.append(wCap)
 
 # all bodies up to now are fixed and only wire is will be shown
 for b in o.bodies:
-	b.shape['wire']=True
-	b['isDynamic']=False
+	b.shape.wire=True
+	b.isDynamic=False
 
 import random
 def randomColor():
@@ -64,6 +65,12 @@
 
 o.save('/tmp/a.xml')
 
+try:
+	from yade import qt
+	qt.Controller()
+	qt.View()
+except ImportError: pass
+
 if 0:
 	import os,time
 	os.system(yadeExecutable+' -N QtGUI -S /tmp/a.xml')

=== modified file 'examples/dynamic_simulation_tests/ringCundallDamping.py'
--- examples/dynamic_simulation_tests/ringCundallDamping.py	2010-05-02 15:59:40 +0000
+++ examples/dynamic_simulation_tests/ringCundallDamping.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 from yade import utils
 from yade import ymport

=== modified file 'examples/dynamic_simulation_tests/ringSimpleViscoelastic.py'
--- examples/dynamic_simulation_tests/ringSimpleViscoelastic.py	2010-05-02 15:59:40 +0000
+++ examples/dynamic_simulation_tests/ringSimpleViscoelastic.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 from yade import utils
 from yade import ymport

=== renamed file 'scripts/exact-rot-facet.py' => 'examples/exact-rot-facet.py'
--- scripts/exact-rot-facet.py	2010-01-10 09:09:32 +0000
+++ examples/exact-rot-facet.py	2010-05-29 20:52:10 +0000
@@ -23,12 +23,14 @@
 ]
 from yade import utils
 scale=.1
-O.bodies.append(utils.facet([[scale,0,0],[-scale,-scale,0],[-scale,scale,0]],dynamic=False,color=[1,0,0],young=30e9,poisson=.3))
-O.bodies.append(utils.sphere([0,0,.99*scale],1*scale,color=[0,1,0],young=30e9,poisson=.3,density=2400,wire=True,dynamic=False))
+O.bodies.append(utils.facet([[scale,0,0],[-scale,-scale,0],[-scale,scale,0]],dynamic=False,color=[1,0,0]))
+O.bodies.append(utils.sphere([0,0,.99*scale],1*scale,color=[0,1,0],wire=True,dynamic=False))
 
-O.dt=.8*utils.PWaveTimeStep()
+O.dt=.4*utils.PWaveTimeStep()
 from yade import qt
+qt.View()
 renderer=qt.Renderer()
-renderer['Interaction_geometry']=True
+renderer.intrGeom=True
 qt.Controller()
 O.step(); O.step(); O.step()
+O.run(20000)

=== renamed file 'scripts/exact-rot.py' => 'examples/exact-rot.py'
--- scripts/exact-rot.py	2010-01-10 09:09:32 +0000
+++ examples/exact-rot.py	2010-05-29 20:52:10 +0000
@@ -20,14 +20,16 @@
 	NewtonIntegrator(damping=.2)
 ]
 from yade import utils
-O.bodies.append(utils.sphere([0,0,0],1,dynamic=False,color=[1,0,0],young=30e9,poisson=.3,density=2400,wire=True))
-O.bodies.append(utils.sphere([0,sqrt(2),sqrt(2)],1,color=[0,1,0],young=30e9,poisson=.3,density=2400,wire=True))
+O.bodies.append(utils.sphere([0,0,0],1,dynamic=False,color=[1,0,0],wire=True))
+O.bodies.append(utils.sphere([0,sqrt(2),sqrt(2)],1,color=[0,1,0],wire=True))
 
-O.dt=.8*utils.PWaveTimeStep()
+O.dt=.01*utils.PWaveTimeStep()
 O.saveTmp()
 #o.run(100000); o.wait(); print o.iter/o.realtime,'iterations/sec'
 from yade import qt
+qt.View()
 renderer=qt.Renderer()
-renderer['Interaction_geometry']=True
+renderer.intrGeom=True
 qt.Controller()
 O.step(); O.step(); O.step()
+O.run(20000)

=== modified file 'examples/funnel.py'
--- examples/funnel.py	2010-05-02 20:53:04 +0000
+++ examples/funnel.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 """This example demonstrates GTS (http://gts.sourceforge.net/) opportunities for creating surfaces
 VTU-files are created in /tmp directory after simulation. If you open those with paraview
 (or other VTK-based) program, you can create video, make screenshots etc."""

=== modified file 'examples/gts-horse/gts-horse.py'
--- examples/gts-horse/gts-horse.py	2010-05-08 20:24:44 +0000
+++ examples/gts-horse/gts-horse.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# encoding: utf-8
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 # © 2009 Václav Šmilauer <eudoxos@xxxxxxxx>
 """Script showing how to use GTS to import arbitrary triangulated surface,
 which can further be either filled with packing (if used as predicate) or converted

=== modified file 'examples/mill.py'
--- examples/mill.py	2010-05-05 14:06:30 +0000
+++ examples/mill.py	2010-05-29 20:52:10 +0000
@@ -1,4 +1,5 @@
-# encoding: utf-8
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 """
 Small showcase posted at http://www.youtube.com/watch?v=KUv26xlh89I,
 in response to pfc3d's http://www.youtube.com/watch?v=005rdDBoe4w.

=== renamed file 'scripts/mindlin_test.py' => 'examples/mindlin_test.py'
--- scripts/mindlin_test.py	2010-04-15 16:33:51 +0000
+++ examples/mindlin_test.py	2010-05-29 20:52:10 +0000
@@ -1,6 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
+#!/usr/bin/python
 # -*- coding: utf-8 -*-
-# -*- encoding=utf-8 -*-
 ##
 ## SCRIPT TO TEST A NEW CONSTITUTIVE LAW (MINDLIN - nonlinear elastic model)
 
@@ -63,7 +62,7 @@
 	## store some numbers under some labels
 	plot.addData(fn=i.phys.normalForce[0],step=O.iter,un=2*s0.shape.radius-s1.state.pos[0]+s0.state.pos[0],kn=i.phys.kn)	
 
-O.run(50,True);
+O.run(250,True);
 print "Now calling plot.plot() to show the figure."
 
 ## We will have:

=== modified file 'examples/regular-sphere-pack/regular-sphere-pack.py'
--- examples/regular-sphere-pack/regular-sphere-pack.py	2010-05-14 15:36:44 +0000
+++ examples/regular-sphere-pack/regular-sphere-pack.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 from yade import pack,ymport,export
 
 """ This script demonstrates how to use 2 components of creating packings:

=== modified file 'examples/rod_penetration/model.py'
--- examples/rod_penetration/model.py	2010-05-08 20:24:44 +0000
+++ examples/rod_penetration/model.py	2010-05-29 20:52:10 +0000
@@ -1,5 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 from yade import utils
 import random

=== added directory 'examples/simple-scene'
=== renamed file 'scripts/simple-scene-parallel.py' => 'examples/simple-scene/simple-scene-parallel.py'
--- scripts/simple-scene-parallel.py	2010-03-22 17:39:33 +0000
+++ examples/simple-scene/simple-scene-parallel.py	2010-05-29 20:52:10 +0000
@@ -1,8 +1,6 @@
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
-O.initializers=[
-	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
-	]
 O.engines=[
 	# physical actions will not be needed until the contact law comes in;
 	# therefore it can run in parallel with the Aabb engines and collider;
@@ -24,8 +22,12 @@
 		# ForceResetter will run in parallel with the second group of BoundingVolumeMEtaEngine+PersistentSAPCollider
 		ForceResetter(),
 		# Engines within the group will be run serially, however
-		[BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),	PersistentSAPCollider(),]
+		BoundDispatcher([
+			Bo1_Sphere_Aabb(),
+			Bo1_Box_Aabb(),
+		]),
 	]),
+	InsertionSortCollider(),
 	InteractionGeometryDispatcher([Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()]),
 	InteractionPhysicsDispatcher([Ip2_FrictMat_FrictMat_FrictPhys()]),
 	# the rest must also be run sequentially
@@ -36,8 +38,11 @@
 ]
 
 from yade import utils
-O.bodies.append(utils.box(center=[0,0,0],extents=[.5,.5,.5],dynamic=False,color=[1,0,0],young=30e9,poisson=.3,density=2400))
-O.bodies.append(utils.sphere([0,0,2],1,color=[0,1,0],young=30e9,poisson=.3,density=2400))
-O.dt=.5*utils.PWaveTimeStep()
+O.bodies.append(utils.box(center=[0,0,0],extents=[.5,.5,.5],dynamic=False,color=[1,0,0]))
+O.bodies.append(utils.sphere([0,0,2],1,color=[0,1,0]))
+from yade import qt
+qt.View()
+qt.Controller()
+O.dt=.001*utils.PWaveTimeStep()
 O.saveTmp()
-#o.run(100000); o.wait(); print o.iter/o.realtime,"iterations/sec"
+O.run(300000); O.wait(); print O.iter/O.realtime,"iterations/sec"

=== renamed file 'scripts/simple-scene-plot.py' => 'examples/simple-scene/simple-scene-plot.py'
--- scripts/simple-scene-plot.py	2010-05-06 10:11:20 +0000
+++ examples/simple-scene/simple-scene-plot.py	2010-05-29 20:52:10 +0000
@@ -1,5 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 O.initializers=[
 		BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()])
@@ -45,7 +45,7 @@
 def myAddPlotData():
 	sph=O.bodies[1]
 	## store some numbers under some labels
-	plot.addData(t=O.time,i=O.iter,z_sph=sph.state.pos[2],z_sph_half=.5*sph.state.pos[2],v_sph=sph.state.vel.Length())
+	plot.addData(t=O.time,i=O.iter,z_sph=sph.state.pos[2],z_sph_half=.5*sph.state.pos[2],v_sph=sph.state.vel.norm())
 
 O.run(int(2./O.dt),True);
 print "Now calling plot.plot() to show the figures (close them to continue)."

=== renamed file 'scripts/simple-scene.py' => 'examples/simple-scene/simple-scene.py'
--- scripts/simple-scene.py	2010-03-29 11:36:21 +0000
+++ examples/simple-scene/simple-scene.py	2010-05-29 20:52:10 +0000
@@ -1,5 +1,5 @@
-#!/usr/local/bin/yade-trunk -x
-# -*- encoding=utf-8 -*-
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 ## Omega is the super-class that orchestrates the whole program.
 ## It holds the entire simulation (MetaBody), takes care of loading/saving,
@@ -94,7 +94,7 @@
 	# Create empty body object
 	b=Body()
 	# set the isDynamic body attribute
-	b['isDynamic']=False
+	b.isDynamic=False
 	# Assign geometrical model (shape) to the body: a box of given size
 	b.shape=Box(extents=[.5,.5,.5],diffuseColor=[1,0,0])
 	# physical parameters:
@@ -117,7 +117,7 @@
 o.bodies.append(utils.sphere([0,0,2],1,color=[0,1,0]))
 
 ## Estimate timestep from p-wave speed and multiply it by safety factor of .2
-o.dt=.2*utils.PWaveTimeStep()
+o.dt=.01*utils.PWaveTimeStep()
 
 ## Save the scene to file, so that it can be loaded later. Supported extension are: .xml, .xml.gz, .xml.bz2.
 o.save('/tmp/a.xml.bz2');
@@ -131,4 +131,6 @@
 		print i.id1,i.id2,i.phys,i.geom
 
 from yade import qt
+qt.View()
 qt.Controller()
+O.run(20000)

=== modified file 'examples/tunnel-pack.py'
--- examples/tunnel-pack.py	2010-05-02 20:53:04 +0000
+++ examples/tunnel-pack.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
 from yade import pack
 
 """Simple script to create tunnel with random dense packing of spheres.

=== modified file 'scripts/NormalInelasticityTest.py'
--- scripts/NormalInelasticityTest.py	2010-05-02 16:02:29 +0000
+++ scripts/NormalInelasticityTest.py	2010-05-29 20:52:10 +0000
@@ -1,3 +1,4 @@
+
 # Script to test the constitutive law contained in NormalInelasticityLaw : consider two spheres whose penetration of the contact evolves => Monitor of the normal force
 
 from yade import plot
@@ -58,4 +59,4 @@
 plot.plots={'step':('un',),'un':('Normfn',)}
 plot.plot()
 
-#NB : the shape of the curve Fn(un) seems to not be perfect. It is indeed not because of NormalInelasticityLaw. But of differences between the un computed here in this python script and the one which is computed in Ig2_Sphere_Sphere_ScGeom (see for example this "shift2"). Fn being linked to this last un, these slight differences explain the shape of the curves. If phys.penetrationDepth would exist in python, and thus could be directly considered, I think the curve would be perfect !
\ No newline at end of file
+#NB : the shape of the curve Fn(un) seems to not be perfect. It is indeed not because of NormalInelasticityLaw. But of differences between the un computed here in this python script and the one which is computed in Ig2_Sphere_Sphere_ScGeom (see for example this "shift2"). Fn being linked to this last un, these slight differences explain the shape of the curves. If phys.penetrationDepth would exist in python, and thus could be directly considered, I think the curve would be perfect !

=== modified file 'scripts/simple-scene-player.py'
--- scripts/simple-scene-player.py	2010-01-10 09:09:32 +0000
+++ scripts/simple-scene-player.py	2010-05-29 20:52:10 +0000
@@ -33,6 +33,7 @@
 	for b in o.bodies: b.shape['wire']=False
 # you could have saved the viewer state by using Alt-S in the view...
 from yade import qt
+qt.Video()
 qt.makePlayerVideo('/tmp/player.sqlite','/tmp/player.ogg','/tmp/qglviewerState.xml',stride=10,fps=12,postLoadHook='setWire()')
 
 quit()