yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10643
[Branch ~yade-pkg/yade/git-trunk] Rev 3873: Update examples and test-scripts due to deprecating of getViscoelasticFromSpheresInteraction.
------------------------------------------------------------
revno: 3873
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2014-04-02 17:33:41 +0200
message:
Update examples and test-scripts due to deprecating of getViscoelasticFromSpheresInteraction.
modified:
examples/PIDController.py
examples/ResetRandomPosition.py
examples/baraban/BicyclePedalEngine.py
examples/baraban/baraban.py
examples/bulldozer/bulldozerVTK.py
examples/capillary/capillar.py
examples/clumps/clump-hopper-viscoelastic.py
examples/clumps/clump-inbox-viscoelastic.py
examples/clumps/clump-viscoelastic.py
examples/ring2d/ringSimpleViscoelastic.py
examples/rotationalResistance.py
examples/test/facet-sphere-ViscElBasic-peri.py
examples/test/facet-sphere-ViscElBasic.py
examples/test/performance/checkPerf.py
examples/test/sphere-sphere-ViscElBasic-peri.py
scripts/checks-and-tests/checks/checkGravity.py
scripts/checks-and-tests/checks/checkViscElEng.py
scripts/checks-and-tests/checks/checkWeight.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/PIDController.py'
--- examples/PIDController.py 2013-07-05 09:11:44 +0000
+++ examples/PIDController.py 2014-04-02 15:33:41 +0000
@@ -7,8 +7,7 @@
fr = 0.0;rho=2000
tc = 0.001; en = 0.3; et = 0.3; o.dt = 0.02*tc
-param = getViscoelasticFromSpheresInteraction(tc,en,et)
-mat1 = O.materials.append(ViscElMat(frictionAngle=fr, density=rho,**param))
+mat1 = O.materials.append(ViscElMat(frictionAngle=fr, density=rho,tc=tc,en=en,et=et))
spheresID = O.bodies.append(pack.regularHexa(pack.inCylinder((0,0,-2.0),(0,0,2.0),2.0),radius=0.2,gap=0.1,color=(0,1,0),material=mat1))
@@ -33,7 +32,7 @@
PyRunner(command='addPlotData()',iterPeriod=1000, label='graph'),
PyRunner(command='switchTranslationEngine()',iterPeriod=45000, nDo = 2, label='switchEng'),
]
-
+O.step()
from yade import qt
qt.View()
r=qt.Renderer()
=== modified file 'examples/ResetRandomPosition.py'
--- examples/ResetRandomPosition.py 2013-03-28 10:53:06 +0000
+++ examples/ResetRandomPosition.py 2014-04-02 15:33:41 +0000
@@ -13,12 +13,10 @@
es=0.3 # tangential restitution coefficient
frictionAngle=radians(35)#
density=2700
-kw=getViscoelasticFromSpheresInteraction(tc,en,es)
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
# facets material
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# default spheres material
-dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.2*tc # time step
=== modified file 'examples/baraban/BicyclePedalEngine.py'
--- examples/baraban/BicyclePedalEngine.py 2013-11-11 16:22:15 +0000
+++ examples/baraban/BicyclePedalEngine.py 2014-04-02 15:33:41 +0000
@@ -10,9 +10,8 @@
es = 0.3
## Import wall's geometry
-params=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))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es)) # **params sets kn, cn, ks, cs
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
from yade import ymport
fctIds=O.bodies.append(ymport.stl('baraban.stl',color=(1,0,0),material=facetMat))
## Spheres
=== modified file 'examples/baraban/baraban.py'
--- examples/baraban/baraban.py 2013-03-28 10:55:47 +0000
+++ examples/baraban/baraban.py 2014-04-02 15:33:41 +0000
@@ -10,9 +10,8 @@
es = 0.3
## Import wall's geometry
-params=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))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
from yade import ymport
fctIds=O.bodies.append(ymport.stl('baraban.stl',color=(1,0,0),material=facetMat))
## Spheres
=== modified file 'examples/bulldozer/bulldozerVTK.py'
--- examples/bulldozer/bulldozerVTK.py 2013-03-28 10:58:04 +0000
+++ examples/bulldozer/bulldozerVTK.py 2014-04-02 15:33:41 +0000
@@ -27,9 +27,8 @@
es = 0.3
## Materials
-params=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))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
### Creating the Buldozer Knife
### from facets, using GTS
=== modified file 'examples/capillary/capillar.py'
--- examples/capillary/capillar.py 2014-04-02 15:33:41 +0000
+++ examples/capillary/capillar.py 2014-04-02 15:33:41 +0000
@@ -17,7 +17,6 @@
VB = 74.2*1e-12
-param = getViscoelasticFromSpheresInteraction(tc,en,et)
CapillarType1 = "Willett_numeric"
CapillarType2 = "Willett_analytic"
CapillarType3 = "Rabinovich"
@@ -26,12 +25,12 @@
CapillarType6 = "Soulie"
-mat1 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType1,**param))
-mat2 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType2,**param))
-mat3 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType3,**param))
-mat4 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType4,**param))
-mat5 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType5,**param))
-mat6 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType6,**param))
+mat1 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType1,tc=tc,en=en,et=et))
+mat2 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType2,tc=tc,en=en,et=et))
+mat3 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType3,tc=tc,en=en,et=et))
+mat4 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType4,tc=tc,en=en,et=et))
+mat5 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType5,tc=tc,en=en,et=et))
+mat6 = O.materials.append(ViscElCapMat(frictionAngle=fr,density=rho,Vb=VB,gamma=Gamma,theta=Theta,Capillar=True,CapillarType=CapillarType6,tc=tc,en=en,et=et))
id1 = O.bodies.append(sphere(center=[0,0,0],radius=r,material=mat1,fixed=True))
=== modified file 'examples/clumps/clump-hopper-viscoelastic.py'
--- examples/clumps/clump-hopper-viscoelastic.py 2013-03-28 11:01:40 +0000
+++ examples/clumps/clump-hopper-viscoelastic.py 2014-04-02 15:33:41 +0000
@@ -11,10 +11,9 @@
frictionAngle=radians(35)#
density=2700
# facets material
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# default spheres material
-dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle, **params))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.05*tc # time step
=== modified file 'examples/clumps/clump-inbox-viscoelastic.py'
--- examples/clumps/clump-inbox-viscoelastic.py 2013-03-28 11:01:40 +0000
+++ examples/clumps/clump-inbox-viscoelastic.py 2014-04-02 15:33:41 +0000
@@ -11,10 +11,9 @@
frictionAngle=radians(35)#
density=2700
# facets material
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# default spheres material
-dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.05*tc # time step
=== modified file 'examples/clumps/clump-viscoelastic.py'
--- examples/clumps/clump-viscoelastic.py 2013-03-28 11:01:40 +0000
+++ examples/clumps/clump-viscoelastic.py 2014-04-02 15:33:41 +0000
@@ -12,10 +12,9 @@
frictionAngle=radians(35)#
density=2700
# facets material
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# default spheres material
-dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.01*tc # time step
=== modified file 'examples/ring2d/ringSimpleViscoelastic.py'
--- examples/ring2d/ringSimpleViscoelastic.py 2013-03-28 11:06:34 +0000
+++ examples/ring2d/ringSimpleViscoelastic.py 2014-04-02 15:33:41 +0000
@@ -15,9 +15,8 @@
es = 0.3
## Import wall's geometry
-params=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))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
walls = O.bodies.append(ymport.stl('ring.stl',material=facetMat))
=== modified file 'examples/rotationalResistance.py'
--- examples/rotationalResistance.py 2013-06-06 09:27:41 +0000
+++ examples/rotationalResistance.py 2014-04-02 15:33:41 +0000
@@ -7,10 +7,8 @@
r = 0.002
-param = getViscoelasticFromSpheresInteraction(tc,en,et)
-
-mat1 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 1, density=rho,**param))
-mat2 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 2, density=rho,**param))
+mat1 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 1, density=rho,tc=tc,en=en,et=et))
+mat2 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 2, density=rho,tc=tc,en=en,et=et))
oriBody = Quaternion(Vector3(1,0,0),(pi/28))
=== modified file 'examples/test/facet-sphere-ViscElBasic-peri.py'
--- examples/test/facet-sphere-ViscElBasic-peri.py 2013-03-28 11:13:12 +0000
+++ examples/test/facet-sphere-ViscElBasic-peri.py 2014-04-02 15:33:41 +0000
@@ -11,12 +11,11 @@
es=0.3 # tangential restitution coefficient
density=2700
frictionAngle=radians(35)#
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params))
-sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
+sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
#floor
-n=5.
+n=5
s=1./n
for i in range(0,n):
for j in range(0,n):
=== modified file 'examples/test/facet-sphere-ViscElBasic.py'
--- examples/test/facet-sphere-ViscElBasic.py 2013-03-28 11:13:12 +0000
+++ examples/test/facet-sphere-ViscElBasic.py 2014-04-02 15:33:41 +0000
@@ -11,9 +11,8 @@
es = 0.3
## Import wall's geometry
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params))
-sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
facetId=O.bodies.append(facet( [ (-1,0,0), (1,1,0), (1,-1,0)], material=facetMat,color=(1,0,0)))
=== modified file 'examples/test/performance/checkPerf.py'
--- examples/test/performance/checkPerf.py 2013-03-28 11:16:16 +0000
+++ examples/test/performance/checkPerf.py 2014-04-02 15:33:41 +0000
@@ -44,8 +44,7 @@
frictionAngle=radians(35)
density=2300
- params=getViscoelasticFromSpheresInteraction(tc,en,es)
- defMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+ defMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.1*tc # time step
rad=0.5 # particle radius
=== modified file 'examples/test/sphere-sphere-ViscElBasic-peri.py'
--- examples/test/sphere-sphere-ViscElBasic-peri.py 2013-03-28 11:13:12 +0000
+++ examples/test/sphere-sphere-ViscElBasic-peri.py 2014-04-02 15:33:41 +0000
@@ -11,8 +11,7 @@
es=1 # tangential restitution coefficient
density=2700
frictionAngle=radians(35)#
-params=getViscoelasticFromSpheresInteraction(tc,en,es)
-sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params))
+sphereMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# Spheres
=== modified file 'scripts/checks-and-tests/checks/checkGravity.py'
--- scripts/checks-and-tests/checks/checkGravity.py 2013-08-29 10:30:31 +0000
+++ scripts/checks-and-tests/checks/checkGravity.py 2014-04-02 15:33:41 +0000
@@ -16,8 +16,7 @@
es = 0.3
-params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
-sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=et))
v_down = -5.0
=== modified file 'scripts/checks-and-tests/checks/checkViscElEng.py'
--- scripts/checks-and-tests/checks/checkViscElEng.py 2013-12-04 15:43:55 +0000
+++ scripts/checks-and-tests/checks/checkViscElEng.py 2014-04-02 15:33:41 +0000
@@ -16,9 +16,7 @@
r2 = 0.002
-param = getViscoelasticFromSpheresInteraction(tc,en,et)
-
-mat1 = O.materials.append(ViscElMat(frictionAngle=fr,density=rho,**param))
+mat1 = O.materials.append(ViscElMat(frictionAngle=fr,density=rho,tc=tc,en=en,et=et))
id1 = O.bodies.append(sphere(center=[0,0,0],radius=r1,material=mat1,fixed=True))
=== modified file 'scripts/checks-and-tests/checks/checkWeight.py'
--- scripts/checks-and-tests/checks/checkWeight.py 2014-01-20 08:45:23 +0000
+++ scripts/checks-and-tests/checks/checkWeight.py 2014-04-02 15:33:41 +0000
@@ -11,8 +11,7 @@
frictionAngle=radians(35)
density=2300
-params=utils.getViscoelasticFromSpheresInteraction(tc,en,es)
-defMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+defMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
O.dt=.1*tc # time step