1
# gravity deposition, continuing with oedometric test after stabilization
2
# shows also how to run parametric studies with yade-batch
4
# The components of the batch are:
5
# 1. table with parameters, one set of parameters per line (ccc.table)
6
# 2. utils.readParamsFromTable which reads respective line from the parameter file
7
# 3. the simulation muse be run using yade-batch, not yade
9
# $ yade-batch --job-threads=1 03-oedometric-test.table 03-oedometric-test.py
13
# create box with free top, and ceate loose packing inside the box
14
from yade import plot, polyhedra_utils
18
m.density = 2600 #kg/m^3
21
m.frictionAngle = 0.6 #rad
23
O.bodies.append(utils.wall(0,axis=2,sense=1, material = m))
25
t = polyhedra_utils.polyhedra(m,size = (0.06,0.06,0.06),seed = 5)
26
t.state.pos = (0.,0.,0.5)
29
def checkUnbalanced():
30
# at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing is stable
31
print "unbalanced forces = %.5f, position %f, %f, %f"%(utils.unbalancedForce(), t.state.pos[0], t.state.pos[1], t.state.pos[2])
37
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb(),Bo1_Facet_Aabb()]),
39
[Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()],
40
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
41
[PolyhedraVolumetricLaw()] # contact law -- apply forces
43
#GravityEngine(gravity=(0,0,-9.81)),
44
NewtonIntegrator(damping=0.5,gravity=(0,0,-9.81)),
45
PyRunner(command='checkUnbalanced()',realPeriod=3,label='checker')
50
#O.dt=0.025*polyhedra_utils.PWaveTimeStep()