← Back to team overview

yade-users team mailing list archive

[Question #152878]: confused about ForceEngine

 

New question #152878 on Yade:
https://answers.launchpad.net/yade/+question/152878

Hi everybody,

I'm using Ubuntu 10.10 and bzr2811.

1) I just try to model a sphere subjected to gravity forces with this:
"O.bodies.append([
 utils.sphere([.5,.5,.2],.1,color=(1,0,0)),
 ])

from yade import pack, plot

# create rectangular box from facets
O.bodies.append(utils.facetBox((.5,.5,.5),(.5,.5,1),wallMask=31))

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_L3Geom_FrictPhys_ElPerfPl()]
        ),
    GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.4),
]

O.dt=.5*utils.PWaveTimeStep()"

It's working good until the iteration 300000 (almost) when the sphere moved in the x and y directions. The sphere fell down good in only one direction,z, but after it moves. Do you understand why ? 'cause no force was specified before in the x,y directions; it's just supposed to move depending on z direction, isn't it?

2) I try the same, but I just want to apply a z-axis force on the sphere, in order to model a kind of pull-out test later. That's why I'm using ForceEngine, and I tried a lot of different things with it but I never succeeded, what's not good with mine:

"O.bodies.append([
 utils.sphere([.5,.5,.2],.1,color=(1,0,0)),
 ])

from yade import pack, plot

# create rectangular box from facets
O.bodies.append(utils.facetBox((.5,.5,.5),(.5,.5,1),wallMask=31))

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_L3Geom_FrictPhys_ElPerfPl()]
        ),
    ForceEngine(force=(0,20,20),subscribedBodies=[0]),
    GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.4),
]

O.dt=.5*utils.PWaveTimeStep()"

I only understood that ForceEngine has to be before NewtonIntegrator, and when I compile it, it's written :
"AttributeError                            Traceback (most recent call last)

/home/arthur/yade/build/lib/yade-new/py/yade/__init__.pyc in <module>()
      8 
      9 
---> 10 
     11 
     12 

AttributeError: No such attribute: subscribedBodies.".
I just want to apply a force in a sphere but I don't know how to do.

Thanks !

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