New question #686012 on Yade:
https://answers.launchpad.net/yade/+question/686012
Hello everybody,
I am new in YADE and I am trying to have a depositions of cylinderConnections
by adding each cylinderConnection one by one using PyRunner. Somehow the
cylinderConnections lose the connection with the nodes and stop the evolution
in time, but the nodes keep the evolution. *The CylinderConnections start
elongating from the position they stopped.
This is the functions I am using
PyRunner(command = 'createRandomCylinder()', virtPeriod = 1.0, label =
'cylinders')
this is the function :
def createRandomCylinder():
global nodesIds
global cylIds
global vertices
Nc = 9 # number of fibers
rFib = 0.2 # radious of the fiber
Ne = 20 # nymber of nodes for the fiber
dx = 0.0 # distance between two fibers X
dy = 1.0 # distance between two fibers Y
dz = 0.0 # distance between two fibers Z
LFib = 8.0 # size of the fiber
dzj = 2.0*Lz #Initial position Z
dyj = 0.5*Ly #Initial position Y
dxj = 0.5*Lx #Initial position X
omegaY = 20.0 #Frequency Y
omegaX = 20.0 #Frequency X
phiY = 0.0 #Desfase Y
phiX = 0.0 #Desfase X
hY = 0.2 #Amplitud Y
hX = 0.2 #Amplitud X
nodesIdsAux = []
cylIdsAux = []
verticesAux = []
for i in range(0, Ne+1):
pz = float(i)*LFib/float(Ne)
py = hY*sin(float(i)*omegaX + phiY)
px = hX*sin(float(i)*omegaY + phiX)
verticesAux.append([px + dxj,py + dyj, pz +
dzj])
nodesIds.append(nodesIdsAux)
cylIds.append(cylIdsAux)
vertices.append(verticesAux)
cylinderConnection(vertices[-1],rFib,nodesIds[-1],cylIds[-1],
wire=False,
color=[1,0,0],highlight=False,intMaterial='cylindermat',extMaterial='fMat')
Thank you very much,
Antonio
--
You received this question notification because your team yade-users is
an answer contact for Yade.
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp