yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15262
[Question #646460]: translation of a rotating cylinder
New question #646460 on Yade:
https://answers.launchpad.net/yade/+question/646460
Hi all,
I am trying to impose a translation of a cylinder in rotation to simulate powder crunching.
So i use two engines after bed stabilisation:
def checkUnbalanced():
if O.iter<5000: return
if unbalancedForce()>.1: return
O.engines=O.engines[:4]+[RotationEngine(ids=roul,angularVelocity=0.,rotationAxis=(0,1,0),label="rotEngine")+TranslationEngine(ids=roul,translationAxis=(1,0,0),velocity=vitesse,label="transEngine")]+O.engines[4:]
checker.command='arret()' #on passe a la fonction arret de la racle
def arret():
if O.time()>(2*dim_lo)/vitesse:
# plate1.state.vel*=0
# plate2.state.vel*=0
transEngine.velocity=0
This logically not working because i need to define at each time step the new position of the rotational axis of the cylinder. The solution is to use in rotationnal engine options zeroPoint (rotateAroundZero=true). But the problem is that i can't call transEngine or rotEngine during simulation:
----> 1 transEngine
NameError: name 'transEngine' is not defined
Label seems not to be take into account??????
BR
Guilhem
--
You received this question notification because your team yade-users is
an answer contact for Yade.