3
from yade import utils, plot
6
tc = 0.001; en = 0.7; et = 0.7; o.dt = 0.0002*tc
10
param = getViscoelasticFromSpheresInteraction(tc,en,et)
12
mat1 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 1, density=rho,**param))
13
mat2 = O.materials.append(ViscElMat(frictionAngle=fr,mR = 0.05, mRtype = 2, density=rho,**param))
15
oriBody = Quaternion(Vector3(1,0,0),(pi/28))
17
id1 = O.bodies.append(sphere(center=[0,0,2*r],radius=r,material=mat1))
18
id2 = O.bodies.append(geom.facetBox(center=(0,-16.0*r,-2*r),orientation=oriBody,extents=(r,17.0*r,0), material=mat1,color=(0,0,1)))
20
id3 = O.bodies.append(sphere(center=[10*r,0,2*r],radius=r,material=mat2))
21
id4 = O.bodies.append(geom.facetBox(center=(10*r,-16.0*r,-2*r),orientation=oriBody,extents=(r,17.0*r,0), material=mat2,color=(0,0,1)))
25
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
27
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
28
[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
29
[Law2_ScGeom_ViscElPhys_Basic()],
31
NewtonIntegrator(damping=0,gravity=[0,0,-9.81]),
32
PyRunner(command='addPlotData()',iterPeriod=10000, dead = False, label='graph'),
37
s1 = O.bodies[id1].state.pos[1]
38
s2 = O.bodies[id3].state.pos[1]
39
plot.addData(sc=O.time, fc1=s1, fc2=s2)
43
plot.plots={'sc':('fc1','fc2')}; plot.plot()