← Back to team overview

yade-users team mailing list archive

Re: [Question #646460]: translation of a rotating cylinder

 

Question #646460 on Yade changed:
https://answers.launchpad.net/yade/+question/646460

    Status: Answered => Open

guilhem is still having a problem:
Ok, sorry.

Here is just a simple code showing the problem (no spheres, not
important)

#####################
#creation du cylindre
#####################
rouleau_r=4
roul=O.bodies.append(geom.facetCylinder((-rouleau_r,2,rouleau_r),radius=rouleau_r,height=2,orientation=Quaternion((1,0,0),pi/2),wallMask=7,segmentsNumber=15))

#####################
#moteur de resolution
#####################
O.engines=[
   ForceResetter(),
   #prise en compte des toutes les particules, facets et walls pour les interactions
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
      #prise en compte des interactions sphere+sphere and facet+sphere
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
      #parametre de friction
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      #loi d interaction
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
]

#####################
#translation/rotation
#####################
O.engines=O.engines[:4]+[RotationEngine(ids=roul,angularVelocity=0.,rotationAxis=(0,1,0),label='rotEngine')+TranslationEngine(ids=roul,translationAxis=(1,0,0),velocity=10,label='transEngine')]+O.engines[4:]

print 'vitesse', transEngine.velocity


avec l'erreur:
Traceback (most recent call last):
  File "/usr/bin/yade", line 178, in runScript
    execfile(script,globals())
  File "test.py", line 30, in <module>
    print 'vitesse', transEngine.velocity
NameError: name 'transEngine' is not defined
/usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The top-level `frontend` package has been deprecated. All its subpackages have been moved to the top `IPython` level.
  warn("The top-level `frontend` package has been deprecated. "
vitesse[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]


Same error with a more complex code.

Thanks a lot

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