# yade-users team mailing list archive

## [Question #697792]: Replacing sphere with cylinder in my simulation

```New question #697792 on Yade:

We have written a code to plot "friction versus displacement of plate" at the interface between :  single spherical particle(with constant load on it) and plate moving with constant velocity.

####################
sp=sphere((0,0,0),1,material=MaterialS)  #creating sphere
plate=utils.wall(-1,axis=2,material=MaterialP) #creating plate
plateID=O.bodies.append(plate)  #plateID=0
spID=O.bodies.append(sp) #spID=1
O.forces.setPermF(1,(0,0,-1))  # 1 mag. force on sphere in -ve z direction
plate.state.vel =(0,.0000167,0)  #plate given const. velocity in y direction

#engine
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(
[Ig2_Wall_Sphere_ScGeom()],
#[Ip2_CpmMat_CpmMat_CpmPhys()],
#[Law2_ScGeom_CpmPhys_Cpm(Fs)],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,0),damping=0),
]

plot.plots={'Displacement':('FrictionForce')}
plot.plot()
O.dt=.5e-4*PWaveTimeStep()
O.saveTmp()
################

Now we want to replace spherical particle with cylindrical particle.
Kindly help us to generate code for cylindrical particle and and to plot its result.

--