← Back to team overview

yade-users team mailing list archive

Re: [Question #205137]: impact of sphere on a granular media

 

Hello Samuel,

some remarks to your shorten script (I dont know if you use it in your full
script):


> sphereMatIds=[]
>
> for i in O.materials:
>         (i.label=='spheremat')
>         sphereMatIds.append(i.id)
>         i.young=40.0e9; i.poisson=0.3; i.density=2.5e3;
> i.frictionAngle=0.0; i.normalCohesion=1000.0;i.shearCohesion=1000.0;
> i.momentRotationLaw=True;
>
>
this part of code is useless as O.materials is empty initially (may be
different in the full version of your script)


>
> rSphere=0.02
> zb=4*rSphere
> Vin=1
>
> Angle=30
>
> #substrate
> s1 = utils.sphere((0,0,0),rSphere)
> O.bodies.append(s1)
> s1.state.blockedDOFs = 'xyzXYZ'
>
> # boulder
> s2 = utils.sphere((-4*rSphere,0,zb),rSphere)    #
> O.bodies.append(s2)
> vxb=Vin*cos(Angle*3.1416/180)
> vyb=0
> vzb=-Vin*sin(Angle*3.1416/180)
> s2.state.vel=(vxb,vyb,vzb)
> idimp=s2.id
>
>
> ##########################################################################################################
> ################################################ Engine
> #################################################
>
> ##########################################################################################################
> # main simulation loop
>
> O.engines=[
>         ForceResetter(),
>         InsertionSortCollider([Bo1_Sphere_Aabb()]),
>         InteractionLoop(
>                 [Ig2_Sphere_Sphere_ScGeom()],
>                 [Ip2_FrictMat_FrictMat_FrictPhys()],
>                 [Law2_ScGeom_FrictPhys_CundallStrack()]
>

[1] good idea is to use trackEnergy and label parameter

Law2_ScGeom_FrictPhys_CundallStrack(traceEnergy=True,label='law2')

to be able to track energy quantitias, for example:

law2.plasticDissipation()

computes total dissipation, which is present in your script (I tried with
Angle=0)



>         ),
>         GravityEngine(gravity=(0,0,-9.81)),
>         NewtonIntegrator(damping=0.0),
> ]
> ################################ time step #############################
>
> dt = SpherePWaveTimeStep(0.02,2.5e3,40.0e9)
> O.dt=dt
>
> zimp = O.bodies[idimp].state.pos[2]
> zbb = zb*11/10                  # boucing end condition
> while (zimp < zbb):
>         O.run(100)
>

use
O.run(100,True)
or
O.run(100); O.wait()
to prevent following python execution before c++ code is running


>         zimp = O.bodies[idimp].state.pos[2]
>         zbb = zb*11/10
>
> print'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'
>
> print'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$',zimp,'$$$$$$',zbb,'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'
>         print'$$$$$$$$$'
> else:
>         print 'FIN REBOND'
>
> # extract rebond velocity and spin
>         Vxr= O.bodies[idimp].state.vel[0]
>         Vyr= O.bodies[idimp].state.vel[1]
>         Vzr= O.bodies[idimp].state.vel[2]
>         Wxr= O.bodies[idimp].state.angVel[0]
>         Wyr= O.bodies[idimp].state.angVel[1]
>         Wzr= O.bodies[idimp].state.angVel[2]
>
>         print 'imprime-vitesse-initiale',
> idimp,'vitesse-i-x',vxb,'vitesse-i-y',vyb,'vitesse-i-z',vzb
>         print 'imprime-vitesse-finale',
> idimp,'vitesse-x',Vxr,'vitesse-y',Vyr,'vitesse-z',Vzr,'angV-x',Wxr,'angV-y',Wyr,'angV-z',Wzr
>
> #save rebond velocity and spin in the vitessesout file
>         f=open('vitesseout.txt','w')
>
>         f.write(str(Vxr));f.write(" ")
>         f.write(str(Vyr));f.write(" ")
>         f.write(str(Vzr));f.write(" ")
>         f.write(str(Wxr));f.write(" ")
>         f.write(str(Wyr));f.write(" ")
>         f.write(str(Wzr));f.write("\n")
>         f.close()
>         print 'Fin SAUVEGARDE'
> O.pause()
>
>
my results:

for Angle=30, the particles collision is only normal and no dissipation
occures (as expected)
for Angle-0, I get some dissipation comparable to kinetic energy of the
system

commands you may find useful:

utils.kineticEnergy() #
https://yade-dem.org/doc/yade.utils.html#yade._utils.kineticEnergy
law2.plasticDissipation() # with labeled Law2_... as mentioned in [1],
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Law2_ScGeom_FrictPhys_CundallStrack

I would also reccomend to disable GravityEngine for such basic test
(especially if energy balance is important)

If you have any other questions, just ask :-)

Jan

References