Post processing / Rendering multisphere particles

Submitted by Michelle Phan on Fri, 01/10/2020 - 00:12

Hello everyboday;
I am working on irregular particles. I clumped the particles together by the fix multisphere command. I use Paraview to visualize the irregular particles but the rendering image is not good. It is hard to see the shape of particles. I am wondering if there are plugin of Paraview or other programs that can help me to visualize the shape better?
Thank you

mschramm | Fri, 01/10/2020 - 19:36

Hello,
I believe this is on the ParaView side of things.
Try using 3d glyphs to visualize the particles.
In options you can scale the particles by a vector, use radius (write radius to the output files if you are not doing this) to scale the particle.
Switch from using an arrow glyph to sphere, and scale the sphere by 1.0.
This should give excellent results.

mschramm | Mon, 01/13/2020 - 18:26

Hello,
It appears that the "settings" were not selected.
At the top of the properties window, you should see a cog on the upper right of the box, next to a search box. Clicking on this, expands the setting's options.
You should then be able to see the scale options.

Michelle Phan | Wed, 01/15/2020 - 01:10

Hello;
I am sorry for asking many questions as I rarely use the advanced functions in Paraview, and thank you for your patient. I tried to switch from Vector Components to Scalar Components but my Paraview does not have that option. I only have No Data Scaling Off, Magnitude and Vector Components. I downloaded the newest version but it still does not have.
I am not sure whether my Paraview is python or not as I downloaded it straight from the website, my version is 5.4.1. I added the file update.py from the link above to Macros in paraview, but when I click one the update button, my Paraview turned off and disappeared.

Michelle Phan | Wed, 01/15/2020 - 01:36

Then I used version 5.7.0 to run the Macros, but the Error messages pop up said " AttributeError: 'dict' object has no attibute 'iteritems'

mschramm | Wed, 01/15/2020 - 06:35

I am very sorry,
The option you should use is magnitude.

What platform are you using for paraview? The macro is working for me on ParaView 5.4., ParaView 5.6 on ubuntu 18.1, windows 10, and redhat 7.
Could you push an error to that github with your setup information (OS, python version, how did you install paraview)

Michelle Phan | Wed, 01/15/2020 - 08:51

Hello;
I am still having a problem. When I select magnitude, my particles disappeared.

I am using Ubuntu 18.04 to run the Paraview. I downloaded the Paraview straight from its website by selecting the version that I want. Then I extracted the zipped folder => go to bin => select "paraview". Then I selected macros=> add macro => selected update.py from the folder. Then the update button pop up, I clicked on it, but with the version from 5.4 to 5.6, whenever I clicked on the button, the Paraview turned off, except for 5.7, but its pop up the error.
" Missing parentheses in call to "print". Did you mean print(endTime) "
When I put the () to the code, another error pop up.
https://uowmailedu-my.sharepoint.com/:w:/g/personal/mnp733_uowmail_edu_a...
About python, I have no idea. Do I have to download specific software to run the python? Or dod something to enable Python to run on my Paraview?
Thank you very much for your time and support. I appreciate it.

mschramm | Wed, 01/15/2020 - 14:59

Hello,
Here is an image of my settings. I think the only issue now is that the radius needed to be reset to 1.0.
https://pasteboard.co/IQ5txnD.png

As for python, no, you shouldn't need a special version. As of this month, Python 2 is no longer receiving updates, however python 2 is still used by ParaView below version 5.7. This is why you received an error .
I was able to recreate the problem of paraview crashes when using vtk type files for the output files. Are you using vtk files for the LIGGGHTS output?

Michelle Phan | Wed, 01/15/2020 - 23:19

Hello;
Thank you for spending your time. I saw your image. However, this is not what I want to render. I want to visualize clumped particles as the irregular particle as shown in this video
https://www.youtube.com/watch?v=KJ6HTrxO_ok

Yes, I used vtk for my output files. Could you please suggest me which output files I should export to run the Python ?
Thank you

mschramm | Thu, 01/16/2020 - 00:11

Hello
Are you trying to apply a custom stl file to the multisphere?

I have used the above method for all of my simulations.
From the description of the video you gave, I don't believe that he did anything different (other than change the solid color).

The python macro assumes some things about the file name. I may work on it over the weekend to have it work with vtk files but no promises.
I use the dump custom command with file names of the form dump*.liggghts.
I then use the txt reader (.so file in the repository that I sent you) to read in my simulation files.

richti83's picture

richti83 | Fri, 01/17/2020 - 23:59

Hi

when you like to render the iregular shape, and you have the STL geometry file of this shape (!), you can use this ParaView Filter to connect the STL to the rigid-dump: Download [1] (Tools->Manage Custom FIlters->[Add])

In your LIGGGHTS Script use:

compute bid all rigid property id_multisphere #if of clump
compute btype all rigid property clumptype #center of mass
compute xcm all rigid property xcm #center of mass
compute fcm all rigid property fcm #center of mass
compute quat all rigid property quat #rotation arround COM
compute vel all rigid property vcm #velocity of COM
dump rigids all local ${ds} POST/rigids*.dump c_bid c_btype c_xcm[1] c_xcm[2] c_xcm[3] c_quat[1] c_quat[2] c_quat[3] c_quat[4] c_vel[1] c_vel[2] c_vel[3] c_fcm[1] c_fcm[2] c_fcm[3]

Use liggghts_rigid_reader for ParaView 4.5.1 (download [2]) (Tools->manage Plugins [add])

With a little effort it will result in something like this:
https://www.youtube.com/watch?v=iC5OZtnLc8Y&list=UUAq71PznyKqvyvlNnKJr0a...
or this
https://www.youtube.com/watch?v=W_bRl4wmkY8

Note: for different multisphere types you have to devide the resulting dump into pieces for every type first. I recommend using threshold filter applied to btype 1:1:N in Paraview.

Cheers,
Christian.

Please cite as: https://www.researchgate.net/publication/335396587_Tubular_Push_Conveyor...

[1] https://fmbcloud.ovgu.de/s/mBdTTb8HT4cZ48S
[2] https://github.com/richti83/ParaView_Reader_for_LIGGGHTS/blob/master/pre...

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