# yade-users team mailing list archive

## [Question #707311]: How to add rotation on the Boxfactory?

```New question #707311 on Yade:

Hello everyone!
I am a new user of Yade and I want to simulate rotational powder dropping in the unsealed cylinder. I tried to add rotational movement on the Boxfactory through the RotationEngine but the terminal shows “SyntaxError: invalid syntax”. I have consulted question/647827[1], but I don’t know how to deal with it. Could you give me some advice?
Moreover, I also encountered some problems in the process of beginning to learn Yade, could I trouble you to answer problems?
1. In the below code, the steelID and "316lsteel" can present the defined material. However, the description of material selection between CylinderID and BoxFactory is different. I want to know the difference between ‘label’ and ‘id’.
2. In the below code, the material of the sphere and geometry is 316Lsteel. I want to know the difference between frictionAngle is defined in O.materials.append and the frictAngle in Ip2_FrictMat_FrictMat_MindlinPhys. In the Yade document, the frictionAngle means Contact friction angle (in radians), and frictAngle means Instance of MatchMaker determining how to compute interaction’s friction angle.
3. In the Hertz-Mindlin model of the YADE document, the normal coefficient of restitution(en) can be considered as equal to the shear coefficient of restitution(es), and I would like to confirm to you that es = en = e/sqrt(2)? e is the restitution coefficient.
4. In Boxfactory, the meaning of mask is groupMask to apply for newly created spheres. In packs.py[2],the value of mask is 5. I am confused about whether the value mask has the same meaning as the value wallmask in geom.factbox, i.e – determines which walls will be created spheres, in the order -x (1), +x (2), -y (4), +y (8), -z (16), +z (32). The numbers are ANDed; the default 63 means to create spheres in all walls.
5. When RotationEngine is not applied to Boxfactory, the following warning appears at the terminal when emulation begins. Could you give me some advice to deal with it?
(2) InsertionSortCollider:374 virtual void yade::InsertionSortCollider::action(): verletDist is set to 0 because no spheres were found. It will result in suboptimal performances, consider setting a positive verletDist in your script.

The rotational powder-dropping code is as follows:
steelID= O.materials.append(FrictMat(density=7800,young=2.2e9,poisson=.3,frictionAngle=math.atan(.62),label="316lsteel"))
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys(en=0.636, es=0.636,frictAngle=math.atan(.62))],
[Law2_ScGeom_MindlinPhys_Mindlin()]
),
FactoryID=BoxFactory(
maxParticles=1000,
extents=(3, 3, 3),
center=(3, 3, 10),
rMin=0.28,
rMax=0.29,
vMin=0,
vMax=0
vAngle=0,
massFlowRate=10000.,
normal=(0, 0, -1),
label='factory',
materialId=steelID

),
RotationEngine(rotationAxis=(0, 0, 1), angularVelocity=0.1, rotateAroundZero=True, zeroPoint=(0, 0, .10),ids=FactoryID),# factory motion
NewtonIntegrator(gravity=(0,0,-9.81))
]
O.dt=.5e-4*utils.PWaveTimeStep()
O.saveTmp()
O.run()