bouncing ball on the soil

Asked by hafsa on 2019-01-20

hi, I was recently assigned to work on YADE and may first programme is about bouncing ball on the soil , the problem is that the ball pass through the soil .This is what i am using:

""" add the particule to simulation """
O.bodies.append([utils.sphere((0,0,2),.5)])
""" add a wall to simulation """
O.bodies.append([utils.wall(-1,axis=2)])

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
       [Ig2_Sphere_Sphere_ScGeom()], # collision geometry
       [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
       [Law2_ScGeom_FrictPhys_CundallStrack()] # contact law -- apply forces
   ),
   # Apply gravity force to particles. damping: numerical dissipation of energy.
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1)

]

O.dt=.5e-4*utils.PWaveTimeStep()

# save the simulation, so that it can be reloaded later, for experimentation
O.saveTmp()

# Prints in file the center coordinates of the bouncing sphere
#def printFile():
    #h = [O.bodies[1].state.pos[2]]
    #np.savetxt("height" + str(O.iter) + ".txt", h)

Can anyone please help me ? I will really appreciate your concern. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2019-01-21
Last query:
2019-01-21
Last reply:
2019-01-20
Best Jan Stránský (honzik) said : #1

Hello,

you need to tell Yade to take into account interaction of sphere-wall type [1], ie. add Ig2_Wall_Sphere_ScGeom to Interaction loop:
###
   InteractionLoop(
       [Ig2_Sphere_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()], # collision geometry
       [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
       [Law2_ScGeom_FrictPhys_CundallStrack()] # contact law -- apply forces
   ),
###

cheers
Jan

[1] https://yade-dem.org/doc/user.html#functors-choice

hafsa (sebbah.hafsa) said : #2

Thank you Jan my problem was solved

hafsa (sebbah.hafsa) said : #3

Thanks Jan Stránský, that solved my question.