Using pizza.py to read pair/gran/local data?

msbentley's picture
Submitted by msbentley on Wed, 06/22/2011 - 14:36

Hi all,

I'm still learning LIGGGHTS, and am currently playing with dumping pair/gran/local snapshots. I was hoping that the granular pizza.py version would have a command to read and manipulate these in the same way as "normal" snapshots, but I can't find anything - am I missing something?

No doubt I can put something together from the dump and LAMMPS bdump (bond dump) commands, but thought I'd check first!

Cheers, Mark

ckloss_ | Thu, 06/23/2011 - 22:25

Well, to be honest I have not tried this yet. It would definitely be a good idea to write a VTK export routine for that. I guess JF would know how to do this since he is visualizing his lattice beam model this way

Cheers,
Christoph

JF's picture

JF | Fri, 06/24/2011 - 16:10

Hi,

I am not a C++ expert, therefore the files that I wrote are ugly. However, I can try to develop a specific granular dump to generate Paraview files in order to visualize the interaction between spheres in contact.
Christoph, I will send you a mail to ask you some advices.

Regards
JF

msbentley's picture

msbentley | Fri, 08/19/2011 - 15:45

For information, I ended up writing a python script that reads the pair/gran/local dump files and writes contact data (~force chains) to a time-series of binary VTK files, connecting the centres of contacting particles via a VTK line which can be coloured by the force magnitude.

I used pyevtk to write the XML files:

https://bitbucket.org/pauloh/pyevtk

It needs some tidying up, and is sloooow if you want to run for all timesteps (lots of sorting etc.) but I'll try to improve it, and am happy to include in the tools/python directory of future releases etc. if that is helpful.

Cheers, Mark