# yade-users team mailing list archive

## [Question #703121]: Torque output for STL

```New question #703121 on Yade:

Hi

I'm trying to plot the torque-rotation curve for a vane rotating inside a granular sample. The vane has been imported as  .stl file as
.
.
.
Vane= O.bodies.append(EO)
for i in Vane:
shearVane= O.bodies[i]
shearVane.dynamic=True
shearVane.state.blockedDOFs='xyzXYZ' # THE ONLY FREE DOFs ARE TRANSLATION ALONG AND ROTATION ABOUT Z. AT FIRST ALL DOFs ARE RESTRIANED. MOVEMENT (USING CombinedKinematicEngine)
# WILL FREE DOFs IN THE DIRECTION OF MOVEMENT. ALL OTHER DOFs ARE STILL CONSTRAINED TO AVOID DEVIATION OF THE TOOL FROM Z AXIS.
VaneID = [b for b in O.bodies if isinstance(b.shape,Facet)] # LIST OF FACETS IN THE IMPORTED VANE
.
.
.

I can easily get the forces in all directions for the vane, but it seems that the torque calculation is not correct. I use a function as

def history():
global vaneFx,vaneFy,vaneFz,vaneTx,vaneTy,vaneTz,vaneDx,vaneDy,vaneDz,vaneRotZ
vaneFx=0
vaneFy=0
vaneFz=0
vaneTx=0
vaneTy=0
vaneTz=0
for b in VaneID:
vaneFx+=O.forces.f(b.id,sync=True)[0]
vaneFy+=O.forces.f(b.id,sync=True)[1]
vaneFz+=O.forces.f(b.id,sync=True)[2]
vaneTx+=O.forces.t(b.id,sync=True)[0]
vaneTy+=O.forces.t(b.id,sync=True)[1]
vaneTz+=O.forces.t(b.id,sync=True)[2]
vaneDx=rotEngine.zeroPoint[0]
vaneDy=rotEngine.zeroPoint[1]
vaneDz=rotEngine.zeroPoint[2]
vaneRotZ=(shearVane.state.rot().norm())*(180/math.pi)

The values of torque are so small (e-20). Noteworthy that I have experimental results of the same test and know the trend of the torque rotation.

Am I missing anything regarding torque calculation for the imported stl?

Thanks so much

--