← Back to team overview

yade-users team mailing list archive

Re: [Question #152878]: confused about ForceEngine

 

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

    Status: Open => Answered

Anton Gladky proposed the following answer:
Hi

1) Could you please, attach the problem script? It will be easier to
check your problem
2) Replace "subscribedBodies" to "ids", subscribedBodies are not used
any more, I think.

Anton



On Fri, Apr 15, 2011 at 12:55 AM, Arthur Mercier
<question152878@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 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.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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