Particle coloring in ParaView12

Claudio Wolfer's picture
Submitted by Claudio Wolfer on Thu, 01/05/2012 - 11:56

Hi all

I'm trying to color the half of the particle cloud in one color and the others in an other color to see how the particles admix while simulation.
I try it with:
1) ExtractSelection-Filter and Select Points On to get nearly the half of the particles
2) Glyph the previous filter and coloring the particles in Display > Color by Solid Color > Set Solid Color... > choose my color
3) repeat 1) and 2) for the other half of particles

In the frame I do this steps it appears to be what I wanted. But when I press the play button the coloring jumps around in a way no particle of my dense packed cloud could do that. It seems to me that in paraview the particle index is not fixed to the particle ID so in each frame the indices belongs to an other atom than in the previous frame.

What is the correct flow of work to reach my coloring?

Thanks
Claudio

ckloss's picture

ckloss | Thu, 01/05/2012 - 16:03

I am pretty sure that this is possible directly in paraview, but I never tried it so far
what I typically do is to issue a fix property/atom in LIGGGHTS, and use the set command to set it to different values in different regions before the mixing starts

Christoph

Claudio Wolfer's picture

Claudio Wolfer | Mon, 01/09/2012 - 11:21

Hi Christoph

Thanks for help. I hope I understood what you meant in the right way. What I did is:
>fix color all property/atom Color scalar no yes yes 1
>set region up property/peratom Color 5
>set region down property/peratom Color 1
So I have a variable Color for each atom and give this variable different values for different regions. I guess this works because there are no errors while computing. I'm looking for a workflow to get the results out of liggghts and into paraview.
I'm trying:
>dump col all custom 1000 post/dump*.color id f_color
but that gives me only the value 1 for each atom_ID. What I want is a variable color which I can choose to color the particles in paraview like I can do this with f or omega and so on. When I write a dump file I have to convert it to a readable format for paraview. How can I do this with pizza?

Thnx.
Claudio

ckloss's picture

ckloss | Mon, 01/09/2012 - 13:35

I would use

fix color all property/atom Color scalar yes no no 1

Instead of making an "extra" dump, you can add the color to the dump that you do anyway. (currently, this is written to VTK as "customscalar", this will be enhanced in the next release of pizza)

The most probable reason why you dont see anything is that there are no particles present at the time you issue the set command. "Set" is a one-time assignment, and if you use fix insert/fix pour etc you should wait until all particles are in the domain (or assign the "color" step-by-step)

hope this helps

Christoph

Claudio Wolfer's picture

Claudio Wolfer | Mon, 01/09/2012 - 15:51

Hi Christoph

To insert the particles I use:
read_data particleCloud
All particles should be in the domain when I call the set command.

Despite in the solver output the set command seems to be executed:
Setting atom values ...
571 settings made for property/atom
Setting atom values ...
403 settings made for property/atom

The values in the f_color are still the default value instead the given values in the set commands:
fix color all property/atom Color scalar yes no no 1
set region above property/atom Color 5
set region below property/atom Color 8

dump dmp all custom 1000 post/dump.liggghts id ...blabla... radius f_color

Does the fix need some update after set? I guess the f_color is correct in the dump command.

Cheers
Claudio

ckloss's picture

ckloss | Wed, 01/11/2012 - 21:04

Normally, that should work... Can you email me a simple test case that reproduces the issue? I would have a look then

Thanks, Christoph

richti83's picture

richti83 | Thu, 02/02/2012 - 10:58

Hi Christoph,

did you solved this ?
I have the same behavior here:

region left block -0.24 0 -0.070 0.07 -0.25 0.3 units box
region right block 0.01 0.24 -0.070 0.07 -0.25 0.3 units box
fix color all property/atom color scalar yes no no 0.0
set region left property/atom color 1.0
Setting atom values ...
1706 settings made for property/atom
set region right property/atom color 2.0
Setting atom values ...
1599 settings made for property/atom
dump dmp all custom 200 post/dumppartikel*.liggghts id x y z vx vy vz radius f_color

As you can see the prop/atoms are assigned correctly, but in the dumpfile f_color is always the default value.

Thanks,
Christian

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

Claudio Wolfer's picture

Claudio Wolfer | Fri, 02/03/2012 - 08:58

Hi Christian

Do what's written above with a run 0 between fix color and the subsequent set. For me this works fine.

Cheers
Claudio

Maryam | Tue, 06/26/2012 - 18:25

Hi,
So if I want to dump youngsModulus that is defined through fix property/global, then I can’t use this f_fixID syntax as it only works for property/atom fixes, right?
I have different Young’s modulus for different atom types and I don’t know how to define it by fix property/atom and I still want to dump this property.
Could you please give me a hint?
Thank you very much
Maryam

Maryam