yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #06841
[Branch ~yade-dev/yade/trunk] Rev 2683: fix examples
------------------------------------------------------------
revno: 2683
committer: Sergei D. <sega@think>
branch nick: yade
timestamp: Thu 2011-01-27 00:26:42 +0300
message:
fix examples
modified:
examples/bulldozer/bulldozer.py
examples/bulldozer/bulldozerVTK.py
scripts/test/clump-hopper-viscoelastic.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/bulldozer/bulldozer.py'
--- examples/bulldozer/bulldozer.py 2011-01-12 16:22:18 +0000
+++ examples/bulldozer/bulldozer.py 2011-01-26 21:26:42 +0000
@@ -6,7 +6,7 @@
from numpy import arange
import gts
import itertools
-from yade import pack
+from yade import geom,pack
###Initial Data
=== modified file 'examples/bulldozer/bulldozerVTK.py'
--- examples/bulldozer/bulldozerVTK.py 2011-01-12 16:22:18 +0000
+++ examples/bulldozer/bulldozerVTK.py 2011-01-26 21:26:42 +0000
@@ -6,7 +6,7 @@
from numpy import arange
import gts
import itertools
-from yade import pack
+from yade import geom,pack
###Initial Data
@@ -27,7 +27,7 @@
es = 0.3
## Materials
-params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
+params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
@@ -57,10 +57,6 @@
colorSph=colorsph1
for xyz in itertools.product(arange(0,numBoxes[0]),arange(0,numBoxes[1]),arange(0,numBoxes[2])):
ids_spheres=O.bodies.appendClumped(pack.regularHexa(pack.inEllipsoid((xyz[0]*(sizeBox+gapBetweenBoxes),xyz[1]*(sizeBox+gapBetweenBoxes)+sizeBox*0.5,xyz[2]*(sizeBox+gapBetweenBoxes)-radiusKnife+sizeBox*0.6),(sizeBox/2,sizeBox/2,sizeBox/2)),radius=radiusSph,gap=0,color=colorSph,material=sphereMat))
- for id in ids_spheres[1]:
- s=O.bodies[id]
- p=utils.getViscoelasticFromSpheresInteraction(s.state.mass,tc,en,es)
- s.mat.kn,s.mat.cn,s.mat.ks,s.mat.cs=p['kn'],p['cn'],p['ks'],p['cs']
if (colorSph==colorsph1):
colorSph=colorsph2
else:
@@ -77,9 +73,9 @@
[Law2_ScGeom_ViscElPhys_Basic()],
),
GravityEngine(gravity=[0,0,-9.8]),
- TranslationEngine(translationAxis=[1,0,0],velocity=2,subscribedBodies=KnifeIDs), # Buldozer motion
+ TranslationEngine(translationAxis=[1,0,0],velocity=2,ids=KnifeIDs), # Buldozer motion
NewtonIntegrator(damping=0),
- VTKRecorder(iterPeriod=1000,fileName='/tmp/bulldozer-',recorders=['spheres','facets'])
+ #VTKRecorder(iterPeriod=1000,fileName='/tmp/bulldozer-',recorders=['spheres','facets'])
]
O.saveTmp()
=== modified file 'scripts/test/clump-hopper-viscoelastic.py'
--- scripts/test/clump-hopper-viscoelastic.py 2011-01-26 12:39:07 +0000
+++ scripts/test/clump-hopper-viscoelastic.py 2011-01-26 21:26:42 +0000
@@ -15,7 +15,7 @@
density=2700
# facets material
params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(density=0,frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
# default spheres material
dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle, **params))
@@ -66,7 +66,7 @@
[Law2_ScGeom_ViscElPhys_Basic()],
),
GravityEngine(gravity=[0,0,-9.81]),
- NewtonIntegrator(damping=0,exactAsphericalRot=False),
+ NewtonIntegrator(damping=0),
#VTKRecorder(virtPeriod=0.01,fileName='/tmp/',recorders=['spheres','velocity','facets'])
]