yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09131
Re: [Question #245072]: exciting box
Question #245072 on Yade changed:
https://answers.launchpad.net/yade/+question/245072
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
check the script from Klaus, there is
ids = facets # list of facets
instead of your
ids = facet # which is actually a function utils.facet
cheers
Jan
2014-03-07 11:46 GMT+01:00 masmoudimarwa <
question245072@xxxxxxxxxxxxxxxxxxxxx>:
> Question #245072 on Yade changed:
> https://answers.launchpad.net/yade/+question/245072
>
> Status: Answered => Open
>
> masmoudimarwa is still having a problem:
> Hii,
> Thanks a lot for my help
> But it doesn't work and i received this message
> Welcome to Yade 0.70.0
> TCP python prompt on localhost:9000, auth cookie `ydcaue'
> XMLRPC info provider on http://localhost:21000
> Running script /home/masmoudi/Bureau/gravityyade2.py
> Traceback (most recent call last):
> File "/usr/bin/yade", line 183, in runScript
> execfile(script,globals())
> File "/home/masmoudi/Bureau/gravityyade2.py", line 31, in <module>
> HarmonicMotionEngine(A=[0.4,0,0], f=[5.,0,0.0], fi = [pi/2.,0.0,0.0],
> ids = facet),
> TypeError: No registered converter was able to produce a C++ rvalue of type
> std::vector<int, std::allocator<int> > from this Python object of type
> function
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both,
> F9 generator, F8 plot. ]]
>
>
> 2014-03-07 1:21 GMT+01:00 Klaus Thoeni <
> question245072@xxxxxxxxxxxxxxxxxxxxx
> >:
>
> > Your question #245072 on Yade changed:
> > https://answers.launchpad.net/yade/+question/245072
> >
> > Status: Open => Answered
> >
> > Klaus Thoeni proposed the following answer:
> > Hi,
> >
> > applying forces to facets which are non-dynamic forces has no effect as
> > Jan already mentioned.
> >
> > Have a look at this:
> >
> > # -*- coding: utf-8 -*-
> > from yade import qt
> >
> > ## PhysicalParameters
> > Young = 30e9
> > Poisson = 0.2
> > Density=1000
> > # Append a material
> >
> >
> mat=O.materials.append(FrictMat(young=Young,poisson=Poisson,density=Density,frictionAngle=.5))
> >
> >
> >
> facets=O.bodies.append(utils.geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=63,material=mat))
> > sphere=O.bodies.append([sphere([0.5,0.5,0.5],.2,material=mat)])
> >
> > O.engines=[
> > ForceResetter(),
> > InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> > InteractionLoop(
> > # handle sphere+sphere and facet+sphere collisions
> > [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
> > [Ip2_FrictMat_FrictMat_FrictPhys()],
> > [Law2_ScGeom_FrictPhys_CundallStrack()]
> > ),
> > HarmonicMotionEngine(A=[0.4,0,0], f=[5.,0,0.0], fi =
> > [pi/2.,0.0,0.0], ids = facets),
> > ForceEngine(force=(0,0,-10.),ids=sphere),
> > GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.01),
> > NewtonIntegrator(damping=0.4,gravity=(0,0,-9.81)),
> > ]
> >
> > O.saveTmp()
> >
> > ## to see it
> > qt.View()
> >
> > #O.run()
> >
> > HTH
> > Klaus
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> > https://answers.launchpad.net/yade/+question/245072/+confirm?answer_id=4
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/yade/+question/245072
> >
> > You received this question notification because you asked the question.
> >
>
> --
> 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.