Triangle ID always zero in wall/gran/local

msbentley's picture
Submitted by msbentley on Wed, 08/22/2012 - 17:31

I'm having a problem with compute wall/gran/local. I have a simulation with a single mesh floor (see image for the mesh IDs produced with dump mesh/vtk):

fix floor all mesh/surface file mesh_asc.stl type 1
fix meshes all wall/gran/hertz/history mesh n_meshes 1 meshes floor

and I want to dump the wall/particle interactions with

compute wallcomp all wall/gran/local pos id contactArea

So I expect 10 outputs here (pos (6), id (3=mesh, triangle, pcle), contactArea (1)). I'm outputting with a dump local at the last timestep, when particles are definitely in contact with the floor. The first few entries in the dumpfile show:

ITEM: TIMESTEP
561000
ITEM: NUMBER OF ENTRIES
92
ITEM: ENTRIES c_wallcomp[1] c_wallcomp[2] c_wallcomp[3] c_wallcomp[4] c_wallcomp[5] c_wallcomp[6] c_wallcomp[7] c_wallcomp[8] c_wallcomp[9] c_wallcomp[10]
0 0 0 0.0467421 -0.0157042 0.00756795 0 0 50 2.72346e-05
0 0 0 0.0569385 -0.0045916 0.0066844 0 0 123 3.63507e-05

So this is pretty much all as expected, except that every triangle ID is zero - you can see from the image that I expect most of the mesh elements to have particle contacts.

I guess this is a bug?

Cheers, Mark

AttachmentSize
Image icon mesh_ids.png355.73 KB
ckloss's picture

ckloss | Thu, 08/23/2012 - 16:16

Hi Mark,

thanks - yes there was some code left out in 2.X when merging which did this. I re-added the code for the next version - feel free to check if it's doing what you expect.

Cheers, Christoph

msbentley's picture

msbentley | Wed, 09/12/2012 - 11:22

Hi Christoph,

With version 2.1.1 the basic problem is resolved, and the triangle IDs are now printed correctly. However, there are other issues (I think also raised elsewhere). In between valid output I have blocks of zeros, e.g.

-0.030963 -0.0215656 0 -0.00682948 -0.0341067 0.00795393 0 30 628 2.34847e-05
-0.00682948 -0.0341067 3.46945e-18 0 0 0 0 31 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

and blocks of very small numbers

0 0 0 0 0 0 0 0 0 0
6.93558e-310 6.93558e-310 2.27351e-316 2.27351e-316 2.26923e-316 2.26923e-316 2.26923e-316 2.26923e-316 2.26923e-316 2.26923e-316
2.26923e-316 2.26923e-316 2.26923e-316 2.26923e-316 2.26923e-316 2.26924e-316 2.26924e-316 2.26924e-316 2.26924e-316 2.26924e-316

Cheers, Mark

stephane.griffiths | Thu, 09/13/2012 - 15:45

Hello Mark,

I'm sorry to bother you on your post, but I don't understand how to plot the data coming from wall/gran/local.

I use the compute function
compute forces all wall/gran/local id pos force

and the dump
dump forcedump all local 400 post/dump.force c_forces[1] ... c_forces[12]

And the lpp function used to visualize the dump/custom data does not work on this dump/local. Do you have an idea on what I'm doing wrong ? Is there an other way to plot the dump/local data ?

I thank you a lot in advance.
Stéphane

msbentley's picture

msbentley | Mon, 09/17/2012 - 11:32

Hi Stéphane,

It really depends what you want to plot - you can of course read the ASCII data in the dump local file and plot it as you like. I use the bdump command in pizza.py to read in these files (if it's not in the granular version, it's in the LAMMPS version) - at least to read them into python.

If you want to visualise the contact data, you can use the dump2force command (distributed with lpp) - you may have to tweak the code to have the right number of variables, since a dump local can also include contact area, heat flux etc. This reads the dump local file and produces VTK files in which the centres of particles in contact are connected with a line, whose colour can represent the force, contact area, heat flux etc.

Good luck!

Mark