saving data

Asked by Jinny Kim

Dear all,

Hi, I have a simple question regarding saving data.

I want to run the simulation in the background, so I think need to save particle's physical data such as velocity, position, angular velocity ... Is it possible?????
If it is possible to save all data of particles, can I see particle motions in 3D rendering window by using the saved data?

Thank you for your help in advance!!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jinny Kim
Solved:
Last query:
Last reply:
Revision history for this message
Bettina Suhr (bettina-suhr) said :
#1

Hi Jinni Kim,

There are different ways to save data for different purposes.

Have a look at the tutorial -> oedometric script. Here information like path, normal force, unbalanced force and iteration number are saved to a txt file using the commands plot.addData and plot.saveDataTxt. These commands also can be used for simulations run in background/ batch mode, as you can see in the tutorial.

In the users manual -> postprocessing section, you can learn how write more outputs and visualize them.
Hope this helps.

Best regards,
Bettina

Revision history for this message
Jinny Kim (jinnyk) said :
#2

Hi Bettina Suhr,

Thank you so much for your comments. I will look the tutorial and users manual first!

Revision history for this message
Jinny Kim (jinnyk) said :
#3

Hello,

I am still struggling with saving the data and showing the result in the 3D rendering window.
If I want to use qt.View by using the saved data after running the simulation in the background (batch mode), what kinds of parameters that I have to save? I am thinking to save positions, velocities, angular velocities, and orientation of all particles. Is it enough to see the result in the 3D rendering window?

Anyone knows any examples related to this work?

Thank you for your help in advance and please help me!!!

Jinny Kim

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

Hi,

I am not sure I understand the question.
The 3D rendering window = qt.View() = the first image you can see at https://yade-dem.org/doc/tutorial-examples.html#bouncing-sphere does not need any saved data to work.

You just have to make this window appear and you will see the discrete elements making your simulation (except special cases.. First, let us know more about your problem)

Revision history for this message
Jan Stránský (honzik) said :
#5

Hello,

> save particle's physical data such as velocity, position, angular velocity ... Is it possible?????

of course. The way how to save it depends on how you want to see it, what you want to do with it, how often you want to save the data, if you have some limit on file size .....................
Some options:
- using O.save(...), then you can O.load(...) the saved file and see it directly in Yade
- using VTKReorder or VTKExporter to save data in .vtk format to be displayed e.g. by Paraview
- saving data "manually"
   - you can then convert them to .vtk files
   - you can load data from them into Yade and see them in Yade
   - whataver else..

> If it is possible to save all data of particles, can I see particle motions in 3D rendering window by using the saved data?
> saving the data and showing the result in the 3D rendering window.

Yes, it is possible.
BUT do you have any particular reason to use "the 3D rendering window"?
Consider using a different software dedicated for data visuaization, like Paraview.

> what kinds of parameters that I have to save? I am thinking to save positions, velocities, angular velocities, and orientation of all particles. Is it enough to see the result in the 3D rendering window?

depends on what "the result" is.
position and orientation (orientation is not needed for spherical particles) is enough to see current state.
E.g. for velocity field visualization you need velocity, for strain visualizations you need displacement .........

> Anyone knows any examples related to this work?

yes, anyone using yade seriously knows examples related to this work.

cheers
Jan

Revision history for this message
Jinny Kim (jinnyk) said :
#6

Dear Jan Stránský,

Thank you so much for your comments. That solved my problem!!! I finally success to save all data and visualize them in Paraview! Thank you!