New question #692122 on Yade:
https://answers.launchpad.net/yade/+question/692122
Dear YADE users,
I am simulating the spheres falling down to a box plate under gravity. When the
spheres touching the box plate, I want to add strong cohesive force between the
spheres and box plate, so that spheres will not bounce but stay on the box
plate. The sphere and box are FrictMat. I tried to add a positive normal force
between spheres and box once they are in touch:
#---------------------------------------------------------------------------
for i in O.interactions:
if isinstance(O.bodies[i.id1].shape,Box) and
isinstance(O.bodies[i.id2].shape,Sphere):
i.phys.normalforce=1e9 #(some positive value)
#---------------------------------------------------------------------------
The full code is shown as follows:
######################
from yade import pack, plot, qt, export, os
O.periodic=True
O.trackEnergy=True
lx=0.05
ly=0.1
lz=0.1
radium=0.0005
# creat horizontal 4 periodic boundries by cell
O.cell.hSize=Matrix3(lx, 0, 0,
0, ly, 0,
0, 0, lz)
# Define materials
idBox=O.materials.append(FrictMat(young=1e5, density=2650, poisson=0.5,
frictionAngle=radians(26.6), label='Box'))
idSand=O.materials.append(FrictMat(young=1e5,poisson=1,frictionAngle=radians(26.6),density=2650,label="Sand"))
# creat plate
lowBox=box(center=(0.5*lx,0.5*ly,0.25*lz),
extents=(lx*2,ly*5,0.0001),wire=False, fixed=True, material="Box")#
lowBoxid=O.bodies.append(lowBox)
# creat sphere particles
sp=pack.SpherePack() # create an empty cloud; SpherePack() contains only
geometrical information
sp.makeCloud((0.0,0.0,0.3*lz+4*radium), (lx,ly,0.7*lz-4*radium),
rMean=1.5*radium, rRelFuzz=0.0, num=100, periodic=True)
for s in sp:
O.bodies.append(utils.sphere(center=s[0],radius=s[1],material="Sand",color=(0.0,1.0,0.0)))
# engines
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
GlobalStiffnessTimeStepper(),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
PyRunner(command='servo()',iterPeriod=1),
]
# define functions
def servo(): # add cohesive forces
for i in O.interactions:
if isinstance(O.bodies[i.id1].shape,Box) and
isinstance(O.bodies[i.id2].shape,Sphere):
i.phys.nornalforce=1e9
The sphere will stay on the box plate instead of bouncing. But I am not sure if
it is suitable to adjust the interaction forces directly. In the following
stage, an external force F_e will be applied on the box.
1) Is this way correct to add cohesive force between spheres and box plate?
2) Will the added interaction force affect the behavior under F_e? I mean can
we treat the interaction force as a external force or not?
Thank you so much!
Yuxuan
--
You received this question notification because your team yade-users 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