Export everything from dump to vtk

Submitted by andrea.pasquali on Wed, 02/09/2011 - 17:16

Hi,
I'm trying to export any field (not only "atom_type") from dump file in vtk using pizza tool.
I found in the forum the commad

v.manyGran()

But when I obtain:

File "", line 1, in ?
AttributeError: vtk instance has no attribute 'manyGran'

Any help?

Thanks

Andrea

JF's picture

JF | Wed, 02/09/2011 - 18:41

Hi Andrea,

Normaly, you have a readme file in the pizza folder. To extract the data from the dump file to a vtk file, you need to perform the following commands:

d=dump("dump.mySimulation")

d.scale() ##Comment : only if you read "Unscaling dump ..."

v=vtk(d)
v.manyGran()

Regards
JF

andrea.pasquali | Thu, 02/10/2011 - 09:02

Hi JF,
I know those commands. The problem is that the v.manyGran() does not work (as I reported)

Traceback (most recent call last):
File "", line 1, in ?
AttributeError: vtk instance has no attribute 'manyGran'

Andrea

JF's picture

JF | Thu, 02/10/2011 - 09:56

Hi Andrea,

Which Pizza version do you use ? I mean the pizza version on the LAMMPS website doesn't have functions specific for LIGGGHTS as manyGran(), but if you download pizza-16Mar09 on the LIGGGHTS website I am pretty sure that the manyGran function works.

Regards
JF

andrea.pasquali | Thu, 02/10/2011 - 10:17

Hi JF,
I downloaded the pizza version you suggest me and now v.manyGran() works!
Thank you very much

Andrea

andrea.pasquali | Thu, 02/10/2011 - 10:43

Hi,
Now I'm trying to make glyph (sphere) for the particles with paraview and I want to color them with velocity.
I can see velocity field in the file, but when I make the sphere glyph in the "color by" I lost only the velocity (I have force and omega).
Any help? What omega is?

Thanks

Andrea

JF's picture

JF | Thu, 02/10/2011 - 11:01

Sorry Andrea, I am not an expert on Paraview but I think that you will resolve this minor problem.
I think that omega is the angular velocity.

Regards
JF

Alexandre Costa | Thu, 05/26/2011 - 17:35

HI,
Just for the record : New versions of pizza uses many instead of manyGran.
I just changed the pizzaScriptInit and it worked.
Alex

beruz | Mon, 04/04/2011 - 18:38

Hello JF
I am so beginner In LIGGHTS as well as Linux so maybe It would be a funny question for you but It took 2 days of my time and still not solved.The problem istha when I try to change the dump file to vtk with these commands ,by writing the first line ( d=dump("dump.mySimulation")) it gives the followong error.

bash: syntax error near unexpected token `('.
I am trying to run the compression exmaple of LIGGGTs.
Please tell me what to do
Regards

JF's picture

JF | Mon, 04/04/2011 - 18:59

Hi,

Ok, I will try to help you, I am not an expert on LIGGGHTS.
I have some questions for you:

1) Do you manage to perform one simulation with LIGGGHTS ?
if yes,
2) Do you see in the post folder a dump* file ?
3) Do you download the pizza folder ?

Regards
JF

beruz | Mon, 04/04/2011 - 19:30

Dear JF
Yes I am going to use LIGGGHTS to simulate a granular system.I have a dump file but I am not able to use these commands to change it to VTK files.I have pizza folder (gran_pizza_17Aug10 suggested by your website) .o
Please help since I am not using this code for selfstuding.I am going to do my master thesis with help of that.

Regards
Beruz

JF's picture

JF | Mon, 04/04/2011 - 21:04

Ok, it is a good news. Therefore, you need to execute this following line in a terminal from your post folder:

python -i ../......./pizza/pizza-17Aug10/src/pizza.py (don't forget to modifiy this line)

Before, you need to install python : sudo apt-get install python or via Synaptic

When pizza.py is executed in your terminal, you can execute these following python lines:

d=dump("dump.****") #(don't forget to modifiy this line)

d.scale() # the scale is sometimes necessary, not systematically
v=vtk(d)
v.manyGran()

Regards
JF

dnojiri | Tue, 10/18/2011 - 08:32

Hey,

I installed LIGGGHTS and Pizza and they are running.
Im trying to visualize the cohesion example by following the commands indications you post it here but I can't

The following is what I get

[root@pote post]# pizza
Pizza.py (1 Oct 2006), a toolkit written in Python
type ? for help, CTRL-D to quit
Loading tools ...
gl tool did not load:
No module named OpenGL.Tk
mdump tool did not load:
No module named Numeric
vcr tool did not load:
No module named Tkinter
animate tool did not load:
No module named Tkinter
plotview tool did not load:
No module named Tkinter
image tool did not load:
No module named Tkinter
dump tool did not load:
No module named Numeric
> d=dump("dump.cohesion")
Traceback (most recent call last):
File "", line 1, in
NameError: name 'dump' is not defined

I would appreciatte any help

ckloss's picture

ckloss | Tue, 10/18/2011 - 08:47

>>dump tool did not load: No module named Numeric
Thats the line that troubles you - you need either Numeric or numpy python package

Christoph

dnojiri | Tue, 10/18/2011 - 11:18

Ok, I installed numpy-1.6.1
To make sure I installed correctly the numpy package. I ran this from python:

>>>import numpy; numpy.test()

and it gives me no error

But when I go to pizza, it is still not finding the Numeric module. Im getting the same messages I posted before.

Any idea on this?

ckloss's picture

ckloss | Tue, 10/18/2011 - 11:55

then you are using an old version that requires Numeric. Use the more recent version from this site

Christoph