Dump the connectivity list

JF's picture
Submitted by JF on Thu, 11/18/2010 - 14:36

Hi Christoph,

I would want to write a new dump class (dump_gran) which saves the connectivity and the scalars as: normal force, damage parameter, radius. Thus, it will be possible to display with paraview the lattice beams or the chain force for granular simulations. But I need help to understand the class Dump_mesh and know where the functions are called:

I only understood that the function write_data(int, double ) calls the function write_item(int, double). However, where are the functions DumpMesh::write_data(int, double ), DumpMesh::init() and DumpMesh(LAMMPS *, int, char**) called in the code ?

Regards
JF

ckloss's picture

ckloss | Thu, 11/18/2010 - 16:37

Hi JF,

>>want to write a new dump class (dump_gran) which saves the connectivity
>>and the scalars as: normal force, damage parameter, radius
This is an excellent idea and certainly on need... I did not yet have the time to write something like this.

>>But I need help to understand the class Dump_mesh
Look at dump_atom, it's the simplest dump style to see how it works...
Then look at dump mesh - which is a good "template" for our case because it outputs a # of quanities different from the #particles in the system (which we also want if we dump per-contact properties)

>>and the scalars as: normal force, damage parameter, radius
I think we should be careful what are per-particle properties (damage, radius) and what are per-contact parameters(contact force, maybe also damage for the lattice beam model?)

Per-particle properties can be output already, per-contact properties not. But before attacking implementing output of per-contact properties, personally I would like to bring the generalization of the shear history to a contact history into the main branch (basically the files I sent you). In the meantime, if you want you could try to write an output command to output the content of a contact history as stored in the listgranhistory. LAMMPS has a feature to dump neighbor lists, but I did not have a look at the code yet.

What are your thoughts on that?

Cheers,
Christoph

JF's picture

JF | Thu, 11/18/2010 - 19:53

Hi Christpoh,

Thank you for your quick reply, I will read the dump_atom file. Concerning the new dump class, it will create vtk files (see example below). Therefore, the connectivity and the content of shear vector (contact history) will be output in the same vtk file. We will be able to remove the connectivity after if necessary.

In my case the shear vector contains : 7 parameters (shear displacments, initial distance, beam section (radius), max overlap, damage parameter).

Moreover, if you generalize the shear history to a contact history. I think that you will have to fix the content of shear vector (which has max 10 parameters) for futur users in order to dump the right parameters.

I hope my explanations are clear enough.

Regards
JF

example of vtk files :

Results

ASCII

DATASET POLYDATA

LINES n_lines
// (connectivity)
2 4 5
// (line between Pt 4 and Pt 5)
.....

CELL_DATA n_cells
SCALARS damage float

LOOKUP_TABLE default

0.33 // (damage parameter for the first interaction)
.....

JF's picture

JF | Wed, 11/24/2010 - 18:30

Hi Christoph,

I reply to you via the forum, because I have a Mail Delivery System when I send you an email (I don't know why !!!).

I send you the file2.vtk file (see the file below). Once the file is loaded in Paraview, you need to select the filter "Tube".
Then, you will be able to choose the radius of tubes against the parameter (Radius) and change the color of tubes against Damage or Overlap.

This week, I am a bit busy. However I want to create a new function to dump the interactions via a xml file loaded by Paraview.
I discussed with someone who said me: if you want to display many things on Paraview, use the xml file.

I already have the different functions to write this xml file for Paraview, next week I will write the function dump for the interactions.

At the end of next week, I hope to send you this function.

Regards
JF

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file2.vtk

# vtk DataFile Version 2.0
Results
ASCII
DATASET POLYDATA

POINTS 4 float
0.0 0.0 0.0
0.0 100.0 0.0
100.0 100.0 0.0
100.0 0.0 0.0

LINES 4 12
2 0 1
2 2 3
2 2 1
2 0 3

POINT_DATA 4
SCALARS radius float
LOOKUP_TABLE default
10.0
30.0
20.0
10.0

CELL_DATA 4
SCALARS overlap float
LOOKUP_TABLE default
30.0
20.0
10.0
20.0

SCALARS damage float
LOOKUP_TABLE default
1.0
0.333
0.1
0.666

ckloss's picture

ckloss | Wed, 11/24/2010 - 22:06

Hi JF,

thanks for your reply - there was an overflow in the mail account, that should be fixed now :-)

>>However I want to create a new function to dump the interactions via a xml file loaded by Paraview.
That would be really great.

>>I discussed with someone who said me: if you want to display many things on Paraview, use the xml file.
Afaik, the thing is that the xml format is ready for parallel i/o. Currently, LIGGGHTS (and pizza.py) write legacy vtk files - which should be changed on the long run b/c they are limited to serial i/o.

Cheers,
Christoph

JF's picture

JF | Wed, 12/15/2010 - 12:25

Hi Tong,

In my case, I wanted to generate beams (similar to force-chain), because I implemented lattice beam model in LIGGGHTS. I will post soon (at the end of the week) a video concerning the lattice beam.

To do this, I wrote a dump_lattice class (inspired on dump_local.*) to generate my paraview files. Unfortunately, dump_lattice works only with my pair_lattice file.

In my opinion, for people who work on granular material the good thing will be to create a specific dump or to modify pizza.py, but I don't know python language.

I send you by email one of my paraview file to see the synthax.

Regards
JF

tshan | Wed, 12/15/2010 - 08:13

Hi, JF

Have you successfully generated force-chain in paraview and have compile python function to convert dump to xml format?

If the answer is yes, could you please tell me how to generate force-chain in Paraview briefly or give me the function you write to help me?

Thank you in advance!

Best,
Tong