yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #03218
Re: Granular ratchetting explained
Hello Bruno,
I wrote a simple script which might be helpful to test contact laws in order
to see if granular ratcheting has any effect, as you suggest below. Please
could you have a quick look at the attached script? Try to run it, I just
attempted to follow the way you suggest below (the four steps of
displacements). There must be something strange in my script because also in
the case of preventGranularRatcheting==True I have got a shear force
(numerical approximations?) and anyway if I try to change that bool from
True to False nothing appears to change.
thanks, Chiara
On 26 May 2010 08:51, Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx> wrote:
> For those interested, I elaborated the comment a little in ScGeom.cpp
> (possible wiki paragraph in the future), as this "granular ratchetting"
> needed explanation.
> We could put a simple py script to simulate the cycle explained below, and
> test any law in Yade to see if it generates ratchetting.
>
1. translation "dx" in the normal direction
> 2. rotation "a"
> 3. translation "-dx" (back to initial position)
> 4. rotation "-a" (back to initial orientation)
>
#!/usr/local/bin/yade-trunk -x
# -*- coding: utf-8 -*-
# -*- encoding=utf-8 -*-
#__________________________________________________________________
# scrpt to demonstrate the effect of granular ratcheting
from yade import utils
#__________________________________________________________________
# geometry
r1,r2=0.007,0.007 # radii
p1,p2=[0,0,0],[r1+0.9*r2,0,0] # center positions
#__________________________________________________________________
# material
young=600.0e4
poisson=0.6
density=2.60e3
frictionAngle=26
# append geometry and material
O.materials.append(FrictMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle))
O.bodies.append(utils.sphere(p1,r1,dynamic=False,wire=True)) # body id=0
O.bodies.append(utils.sphere(p2,r2,dynamic=False,wire=True)) # body id=1
SFixed=O.bodies[0]
SMoving=O.bodies[1]
#__________________________________________________________________
# list of engines
O.engines=[
StepDisplacer(subscribedBodies=[1],setVelocities=True,label='translation'),
RotationEngine(subscribedBodies=[1],rotationAxis=[0,0,1],rotateAroundZero=True,label='rotation'),
PeriodicPythonRunner(iterPeriod=1,command='displ()'),
ForceResetter(),
BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InsertionSortCollider(),
InteractionGeometryDispatcher([Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()]),
InteractionPhysicsDispatcher([Ip2_FrictMat_FrictMat_FrictPhys()]),
LawDispatcher([Law2_ScGeom_FrictPhys_Basic(label='contact')]),
PeriodicPythonRunner(iterPeriod=1,command='data()'),
]
#__________________________________________________________________
# setting of some attributes
contact.preventGranularRatcheting=True
contact.useShear=True
#__________________________________________________________________
# time step
O.dt=.2*utils.PWaveTimeStep()
O.saveTmp('init')
#__________________________________________________________________
from yade import qt
qt.View()
qt.Controller()
def displ():
i=O.interactions[0,1]
if O.iter==2:
translation.deltaSe3=(-0.001*i.geom.normal,Quaternion.Identity) # apply displacement
rotation.angularVelocity=0.0
elif O.iter==3:
translation.deltaSe3=(Vector3(0,0,0),Quaternion.Identity)
rotation.angularVelocity=1500. # apply rotation
elif O.iter==4:
translation.deltaSe3=(0.001*i.geom.normal,Quaternion.Identity) # apply displacement (come back to initial position)
rotation.angularVelocity=0.0
elif O.iter==5:
translation.deltaSe3=(Vector3(0,0,0),Quaternion.Identity)
rotation.angularVelocity=-1500. # apply rotation (come back to initial position)
else:
translation.deltaSe3=(Vector3(0,0,0),Quaternion.Identity)
rotation.angularVelocity=0.0
def data():
i=O.interactions[0,1]
if O.iter==2:
it=O.iter; us=i.geom.shear.norm(); un=i.geom.penetrationDepth; Fn=i.phys.normalForce.norm(); Fs=i.phys.shearForce.norm()
print 'it = %i; us = %e; un = %e; Fn = %e; Fs = %e' % (it, us, un, Fn, Fs), '\n\n--- plus dx ---'
elif O.iter==3:
it=O.iter; us=i.geom.shear.norm(); un=i.geom.penetrationDepth; Fn=i.phys.normalForce.norm(); Fs=i.phys.shearForce.norm()
print 'it = %i; us = %e; un = %e; Fn = %e; Fs = %e' % (it, us, un, Fn, Fs), '\n\n--- plus dteta ---'
elif O.iter==4:
it=O.iter; us=i.geom.shear.norm(); un=i.geom.penetrationDepth; Fn=i.phys.normalForce.norm(); Fs=i.phys.shearForce.norm()
print 'it = %i; us = %e; un = %e; Fn = %e; Fs = %e' % (it, us, un, Fn, Fs), '\n\n--- minus dx ---'
elif O.iter==5:
it=O.iter; us=i.geom.shear.norm(); un=i.geom.penetrationDepth; Fn=i.phys.normalForce.norm(); Fs=i.phys.shearForce.norm()
print 'it = %i; us = %e; un = %e; Fn = %e; Fs = %e' % (it, us, un, Fn, Fs), '\n\n--- minus dteta ---'
else:
it=O.iter; us=i.geom.shear.norm(); un=i.geom.penetrationDepth; Fn=i.phys.normalForce.norm(); Fs=i.phys.shearForce.norm()
print 'it = %i; us = %e; un = %e; Fn = %e; Fs = %e' % (it, us, un, Fn, Fs), '\n'
O.run(7,True)
Follow ups
References