← Back to team overview

yade-users team mailing list archive

Re: [Question #689912]: How to accesss the saved data in tutorials?

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I want the location and radius information of the spheres after gravity deposition and Oedometric test.
> How to access this information ...

How to access:
###
for b in O.bodies:
   location = b.state.pos
   radius = b.shape.radius
# or
# b = O.bodies[someID]
###

How to save:
e.g. using export module [2]:
export.text("particle_data.dat")

> How to access this information from the O.saveTmp()?

1) O.loadTmp() # [3,4]
2) see above

> I actually want to generate random spheres with gaussian distribution
of radius,

if this is a question and you want an answer (not clear), please open a
new question as it is unrelated to saving/accessing data [1]

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.export.html
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.saveTmp
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.loadTmp

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.