1
from yade import plot, polyhedra_utils
5
m.density = 2600 #kg/m^3
8
m.frictionAngle = 0.6 #rad
13
O.bodies.append(utils.wall(0,axis=2,sense=1, material = m))
15
t = polyhedra_utils.polyhedralBall(0.025, 100, m, (0,0,0))
16
t.state.pos = (0,0,0.5)
19
def checkUnbalanced():
20
print "unbalanced forces = %.5f, position %f, %f, %f"%(utils.unbalancedForce(), t.state.pos[0], t.state.pos[1], t.state.pos[2])
26
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb(),Bo1_Facet_Aabb()]),
28
[Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()],
29
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
30
[PolyhedraVolumetricLaw()] # contact law -- apply forces
32
#GravityEngine(gravity=(0,0,-9.81)),
33
NewtonIntegrator(damping=0.5,gravity=(0,0,-9.81)),
34
PyRunner(command='checkUnbalanced()',realPeriod=3,label='checker')
38
#O.dt=0.025*polyhedra_utils.PWaveTimeStep()