yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14881
Re: [Question #631788]: Flow of sphere clump.
Question #631788 on Yade changed:
https://answers.launchpad.net/yade/+question/631788
Status: Solved => Open
Ed Carlos Alves Rocha is still having a problem:
Hello Jan!
I created a sphere clump for the injection, following its tips. However,
when I run the particle the error below appears, can you help me with
this error?
AttributeError Traceback (most recent call last)
/usr/bin/yade in <module>()
/usr/bin/yade in inject()
27 v = (9.1924,9.1924,0)
28 for s in ss2:
---> 29 s.state.vel = v
30 O.bodies[cid].state.vel = v
31
AttributeError: 'int' object has no attribute 'state'
#####################
#####################
idCana=O.materials.append(FrictMat(young=24.5e6,poisson=.3,frictionAngle=.6, density=4.5e2,label="cana"))
idSteel=O.materials.append(FrictMat(young=210e9,poisson=.3,frictionAngle=.8,density=7.85e3,label="steel"))
O.bodies.append(geom.facetBox((12,3,1.5),(13,4,3),wallMask=31,material="steel" ))
r = 0.125
def inject():
for k in arange(0,4):
ss2=O.bodies.appendClumped([sphere((r*i,0,k*4*r),r, material="cana") for i in range(1,9)])
cid,bids = ss2
v = (9.1924,9.1924,0)
for s in ss2:
s.state.vel = v
O.bodies[cid].state.vel = v
O.engines = [
ForceResetter(),
# sphere, facet, wall
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(
# the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# NewtonIntegrator(gravity=(0,0,9.81),damping=0),
NewtonIntegrator(gravity=(0,-9.81,0),damping=0.2),
PyRunner(iterPeriod=500000,command='inject()',initRun=True),
]
O.dt=(1e-6)*PWaveTimeStep()
#O.dt =1e-7
O.step()
#####################
from yade import qt
qt.Controller()
qt.View()
O.saveTmp()
#####################
--
You received this question notification because your team yade-users is
an answer contact for Yade.