← Back to team overview

yade-users team mailing list archive

Re: [Question #269486]: we can have 2 engines in a script?

 

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

Yor1 posted a new comment:
I try to impose the velocity on the piston without using O.engines
To impose the velocity i write: O.bodies[piston].state.vel[1]=1
and this a part of the script:

from yade import ymport, utils , plot, pack, export
from pylab import *
import math

X=15
Y=3
Z=2
r=1

xinf=0
yinf=0
zinf=0

xsup=15
ysup=3
zsup=2

piston=O.bodies.append(geom.facetCylinder(center=(0.5*X,Y+r,Z/2.),radius=r,height=Z,orientation=Quaternion((1,
0, 0), 0),segmentsNumber=20,wire=False)) # haut

O.bodies[piston].state.vel[1]=1

O.saveTmp()
from yade import qt
qt.Controller()
qt.View()
r1=qt.Renderer()
r1.lightPos=Vector3(0,0,50)
O.run(200000)

i obtain this error message:

 ArgumentError: Python argument types in
    BodyContainer.__getitem__(BodyContainer, list)
did not match C++ signature:
    __getitem__(pyBodyContainer {lvalue}, int)

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.