← Back to team overview

yade-users team mailing list archive

[Question #703121]: Torque output for STL

 

New question #703121 on Yade:
https://answers.launchpad.net/yade/+question/703121

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
.
.
.
EO = ymport.stl('/home/ngoudarzi/Desktop/Vane Shear Test/Light PSD Version/Homogeneous/YADE/Executables/Cad/Scaled_Vane_Regular_PSD2.stl',material=Stiff,shift=Vector3(0,0,-0.0635),wire=False,color=Vector3(0.5,0.6,0.8))
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) 
  yade.plot.addData({'i':O.iter,'vaneFx':vaneFx,'vaneFy':vaneFy,'vaneFz':vaneFz,'vaneTx':vaneTx,'vaneTy':vaneTy,'vaneTz':vaneTz,'vaneDx':vaneDx,'vaneDy':vaneDy,'vaneDz':vaneDz,'vaneRotZ':vaneRotZ,})

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
   

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.