# [Yade-users] [Question #667812]: RotationEngine on a clump

```New question #667812 on Yade:
```
Dear all,
I have been struggling recently to apply the RotationEngine on a clump of
spheres.
My goal is basically to let the clump roll over the floor, as a wheel would do.
The forward movement comes from the traction between the wheel and the floor,
so the TranslationEngine is not used.

My questions are:
- what am I doing wrong? I tried several things: apply the rotation engine on
the individual spheres or on the clump ID, rotate around the center of mass, ...
- Is the same thing possible with a clump of facets?

Here's an example:
(I want to work with cohesive materials, hence the cohesive physics. I guess
this doesn't matter)

## MWE
from yade import plot, utils, pack, geom, ymport, polyhedra_utils, timing

## MATERIALS
CohFrictMat02=CohFrictMat(label='CohMat1',id=2,

density=2.6e3,young=1e6,poisson=1e0,frictionAngle=numpy.pi/2*0.8,
isCohesive=False)

## DEFINE BODIES
# Fixed Reference
sp=pack.regularOrtho(pack.inAlignedBox([-0.4,-0.4,-0.11],[0.4,2.0,0.1]),
gap=0.0,
material = CohFrictMat02,
fixed = True)
O.bodies.append(sp)

# Clump to be rotated
sp=pack.regularHexa(pack.inAlignedBox([-0.3,-0.3,0.2],[0.3,0.3,0.8]),
gap=0.0,
material = CohFrictMat02,
wire = True,
fixed = False,
)

RotatingClumpID_L = O.bodies.appendClumped(sp) ## APPEND CLUMPED
RotatingClumpID = RotatingClumpID_L[0]
RotatingSpheresID = RotatingClumpID_L[1]
# RotatingSpheresID = O.bodies.append(sp) ## APPEND NOT CLUMPED (for testing)

## dT
dt=O.dt=polyhedra_utils.PWaveTimeStep() #

## MODEL
Gravity = -9.8
# Gravity = 0.0

## Engines
O.timingEnabled=True

RotEngine = RotationEngine(angularVelocity = -10.0,
rotationAxis = (1,0,0),
ids = [RotatingClumpID,],
# ids = RotatingSpheresID,
# ids = [RotatingClumpID,]+RotatingSpheresID,
# ids = [RotatingSpheresID[0],],
rotateAroundZero=1,
zeroPoint=O.bodies[RotatingClumpID].state.pos,
# rotateAroundZero=0,
label = 'RotationTootToot',)

O.engines=[
ForceResetter(),
InsertionSortCollider([
]),
InteractionLoop(
[
Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor =
],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(always_use_moment_law =
False,
creep_viscosity = 1,
shear_creep = False,
twist_creep = False,
)],
),
NewtonIntegrator(gravity=(0,0,Gravity),damping=0.8), # Gravity
RotEngine,

PyRunner(iterPeriod=1,command="RotEngine.zeroPoint=O.bodies[RotatingClumpID].state.pos"),
]

Thanks
Jan

--