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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Christian,
is that you complete script? if so, please notice that there is no run()
nor step() to execute the PyRunner with myAddPlotData() function.. Then of
course plot.data is empty.
Jan

2012/9/28 Christian Sommerfeld <[email protected]>

> New question #209832 on Yade:
> https://answers.launchpad.net/yade/+question/209832
>
> Hi,
>
> i want to save my plot data into a txt-file. Therefore i add all forces of
> a plane from a facet model. But there is no data in the txt-file. Now i'm a
> little confused because i tried a lot of ways.
>
>
>
> O.engines=[
>
>    ForceResetter(),
>    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
>    InteractionLoop(
>       [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
>       [Ip2_FrictMat_FrictMat_FrictPhys()],
>       [Law2_ScGeom_FrictPhys_CundallStrack()]
>
>    ),
>   NewtonIntegrator(damping=0.4, gravity=(0,0,-9.81)),
>
> RotationEngine(rotateAroundZero=True,zeroPoint=(0,0,0),rotationAxis=(0,0,1),angularVelocity=100*(2*pi/60),ids=tool,label='rotor'),
>  PyRunner(iterPeriod=20,command="myAddPlotData()"),
> ]
>
>
>
> def myAddPlotData():
>
> plot.addData(t=O.time,F=O.forces.f(0).norm()+O.forces.f(1).norm()+O.forces.f(2).norm()+O.forces.f(3).norm()+O.forces.f(4).norm()+O.forces.f(5).norm()+O.forces.f(6).norm()+O.forces.f(7).norm()+O.forces.f(8).norm()+O.forces.f(9).norm()+O.forces.f(10).norm()+O.forces.f(11).norm()+O.forces.f(11).norm()+O.forces.f(11).norm()+O.forces.f(11).norm()+O.forces.f(12).norm()+O.forces.f(13).norm()+O.forces.f(14).norm()+O.forces.f(15).norm()+O.forces.f(16).norm()+O.forces.f(17).norm()+O.forces.f(18).norm()+O.forces.f(19).norm())
>
> plot.plots={'t':('F')}
> plot.plot()
> plot.saveDataTxt('Force.txt.bz2')
>
>
> --
> 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     : [email protected]
> 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.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to