Export x,y,z data

Asked by Nikos Chamakos

Hello yade community!

Is it possible to export the simulation data in the following form?

x_coordinate, y_coordinate, z_coordinate, radius
.
.
.

where x_coordinate, y_coordinate, z_coordinate are the coordinates of the particles' center.
I want to import them in a mesh software in order to generate an unstructured mesh around the particles.
I tried to open the saved xml file, however, is too large in my case (~2GB).

Thanks for your answer!
Nikos

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

sure. The easiest way is to use predefined function for that [1]:
###
# some code generating packing you want
from yade import export
export.text("someFileName.dat")
###

cheers
Jan

[1] https://yade-dem.org/doc/yade.export.html#yade.export.text

Revision history for this message
Nikos Chamakos (nikoscham) said :
#2

Thanks for your answer!

Can I do that in the yade terminal? Since I have already performed the simulations.

I gives me the following error:

Yade [1]: export.text("xyzdata.dat")
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/bin/yade in <module>()
----> 1 export.text("xyzdata.dat")

NameError: name 'export' is not defined

Thanks again
Nikos

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

sure (see my previous answer):
###
from yade import export # ! important
export.text(...)
###
or
###
yade.export.text(...)
###
cheers
Jan

Revision history for this message
Nikos Chamakos (nikoscham) said :
#4

Problem solved!
Thanks Jan