Question #205137 on Yade changed:
https://answers.launchpad.net/yade/+question/205137

mer samuel posted a new comment:
Here is my simplified 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;


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()]
        ),
        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)                      
        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 problem is that when I calculate the restitution coefficient
(Ecr/Ecin) I have no dependency with respect to the incident  angle
whatever the Vin is, it's like there is no friction during the contact

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to