"Force Chains" tool

Asked by Michele Griffa

Hello again

I noticed that in the Tools folder of ESyS-Particle tree there is a folder called "ForceChains".

Is it a post-processing tools for the visualization of the normal forces acting on particles which are in contact to each other ?

Is it under development or already developed ?

I've just started to work on a similar tool, if that is the case, to produce VTK dataset files from CheckPointer files.

Let me know

I could help develop that if it is not yet developed.

That kind of tool is at the top of my list of things to implement.

Thanks

Michele

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Michele,

There are a number of "experimental" post-processing tools in the ESyS-Particle Tools/ directory. Some are quite useful and well-tested (like dump2vtk, grainextract, fracextract) and others haven't been tested/used in anger for a long time. The ForceChains tool is one of these. I personally haven't ever used it so cannot be of too much assistance.

I suspect the tool is designed to help visualise the forces between particles as beams of different thickness proportional to the magnitude of the force. Beyond that I'm unsure whether the tool reads checkpoint files (unlikely) or the output from a particular type of FieldSaver (possible). Also don't know how the forcechain data is stored (vtk file?).

I've been meaning to read the code for the ForceChains tool and try to figure out how to use it. Perhaps you would like to have a go at this Michele?

I'm happy to help if you hit any problems.

Cheers,

Dion.

Revision history for this message
Michele Griffa (michele-griffa) said :
#2

Hi Dion

I've been digging into the code of the ForceChains tool. I think I got a general idea about

• how you can call that tool (the program name, its arguments and its options)

• which type of file it reads in

• which type of file it writes out

I provide a basic description of the the command line here for anyone interested in using it:

fcconv -i <input file name> -o <output file name> -vvf -vtk

If the -vtk option is used it converts "a file containing interaction forces in RAW2 format into a vtk-xml file (<ESyS-Particle Source Root>/Tools/ForceChains/vtk.cpp).
And from reading the content of this VTK-XML file it's clear that it's a unstructured grid.

If the -vvf option is used the program converts "a file containing interaction forces in RAW2 format into a .vvf file (PFC dump)" (<ESyS-Particle Source Root>/Tools/ForceChains/vvf.cpp).
This option is for converting the contact force dataset file into a file readable by the DEM commercial code PFC(2D or 3D).

You can use either option or both but at least one of them is mandatory.

The input file that the program reads seems to coincide perfectly with a file output by the FieldSaver InteractionVectorFieldSaverPrms(…,fieldName="Force",…):
the variables that it reads on each line correspond to those described by Ning in thread #92702.

N.B.: it seems that the program can handle one file at a time, where a single output file from the cited FieldSaver refers to a snapshot in the "contact force space" at a certain fixed time.
So, you'll have to run your program within a for loop in order to process the multiple files referring to all the time steps of recording.

I focused specifically on the VTK-XML files, since I would like to render the force chains using Paraview and these files as its input.

I provide here a little bit of description of what the created VTK-XML file contains:

• the points of the unstructured grid corresponds to the positions in 3D of the particles each of which is interacting with at least another particle according to the interaction type chosen and provided as parameter to the FieldSaver InteractionVectorFieldSaverPrms(…,fieldName="Force",…)

• the cells of the unstructured grid corresponds to simple lines connecting the couples of particles in contact with each other; since the cells as explicitedly defined according to VTK's XML format, the fiel contains the three basic DataArray for each cell, i.e. connectivity, offset and type;

• one cell attribute dataset is reported, it's the norm of the contact force.

If you open the VTK-XML file with Paraview, you get your unstructured grid representing the force chains. You can select the color of the lines (cells) according to the "force" attribute, i.e. the norm of the contact force for each couple of interacting particles. In that way, lighter colors correspond to higher force (or viceversa, depends upon how you define the color scale and mapping then).

The thickness of the lines is always the same, only the color change.
It seems to me that with this representation (lines/cells of an unstructured grid) it's not possible to render in Paraview the contact forces as cylinder of different radius according to the magnitude of the contact force.
You can select only the color of the cells according to their only scalar attribute, the norm of the force.

But it's already a good starting point to visualize contact force networks.

Thanks a lot to the developers for providing this extra Tool for post-processing.

Best regards

Michele
------------------------------------------------------------------------------------------------------------------------------
Michele Griffa, Ph.D.
EMPA, Swiss Federal Laboratories for Materials Testing and Research (ETH Domain)

Überlandstrasse 129
8600, Dübendorf, Switzerland

Ph.: +41 (0) 44 823 4789
Fax: +41 (0) 44 823 4009
email: <email address hidden>
Web site: http://www.empa.ch

Personal web site: http://www.calcolodistr.altervista.org/en/index_en.html
-----------------------------------------------------------------------------------------------------------------------------

>-----Original Message-----
>From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
>Dion Weatherley
>Sent: Dienstag, 24. November 2009 21:25
>To: Griffa, Michele
>Subject: Re: [Question #91547]: "Force Chains" tool
>
>Your question #91547 on ESyS-Particle changed:
>https://answers.launchpad.net/esys-particle/+question/91547
>
> Status: Open => Answered
>
>Dion Weatherley proposed the following answer:
>Hi Michele,
>
>There are a number of "experimental" post-processing tools in the ESyS-
>Particle Tools/ directory. Some are quite useful and well-tested (like
>dump2vtk, grainextract, fracextract) and others haven't been tested/used
>in anger for a long time. The ForceChains tool is one of these. I
>personally haven't ever used it so cannot be of too much assistance.
>
>I suspect the tool is designed to help visualise the forces between
>particles as beams of different thickness proportional to the magnitude
>of the force. Beyond that I'm unsure whether the tool reads checkpoint
>files (unlikely) or the output from a particular type of FieldSaver
>(possible). Also don't know how the forcechain data is stored (vtk
>file?).
>
>I've been meaning to read the code for the ForceChains tool and try to
>figure out how to use it. Perhaps you would like to have a go at this
>Michele?
>
>I'm happy to help if you hit any problems.
>
>Cheers,
>
>Dion.
>
>--
>If this answers your question, please go to the following page to let us
>know that it is solved:
>https://answers.launchpad.net/esys-
>particle/+question/91547/+confirm?answer_id=0
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/esys-particle/+question/91547
>
>You received this question notification because you are a direct
>subscriber of the question.

Revision history for this message
Dion Weatherley (d-weatherley) said :
#3

Hi Michele,

Thanks for the comprehensive explanation of how fcconv works. This will certainly be helpful for myself and others in future. Perhaps there is a way in paraview to visualise the thickness of the force chains by using a cylindrical glyph?

Thanks again for figuring out how this tool works!

Cheers,

Dion.

Revision history for this message
Michele Griffa (michele-griffa) said :
#4

Hi Dion

As long as I experiment with fcconv I'll post to this thread, if I think I learn or discover something that could be useful for other users.

Till now, I've looked for a way to control the line thickness in Paraview, without success.
I guess it's not so trivial. You may need to write some additional plugin by your self or similar stuff, working at the level of VTK.
Indeed, these lines are cells of a VTK unstructured grid (cells of type 3, also called VTK_LINE, i.e., simple line segments).

Paraview associates Glyphs (in this case of interest, cylinders) only to points of a unstructured grid. Not to cells.
With the current type of VTK unstructed grid dataset produced by fcconv it's not possible to associate cylinders to the normal contact force direction.

Here there's a suggestion, maybe for future releases of ESyS-Particle, for an eventual fcconv2 tool.

From the InteractionVectorFieldSaver(…, fieldName="force",…) output files, the hypothetical fcconv2 could extract, for each couple of contacting particles, the mid point along the segment connecting the
particles' centers, aka, the contact point. This is easy done: the contact point is alread in there the output files.

The mid point is necessary because Paraview, by default, locates the centers of the Glyphs (cylinders) in the points of the input dataset.
This input dataset will still be a unstructured grid if we use the VTK-XML format, but it will not contain information about Cells. Only information about Points.

fcconv2 then will have to extract from the FieldSaver output files 2 attributes to be associated to each mid point:

• the vector being the difference between the particles' positions, with whatever orientation (from particle 1 to 2 or viceversa, doesn't matter), then calculate its orthogonal version (same norm but orthogonal to the initial one, in 2D)
• the norm of the contact force (easy done because the contact force is stored in the FielSaver output files)

With this two point-centered data array, a vector field and a scalar field, we could in principle make the rendering in Paraview:

• import the dataset from the VTK unstructured grid (.vtu) file
• add a Glyph filter
• choose cylinder as type of glyph
• choose to rescale the cylinder according to the vector attribute (the cylinder will then be oriented according to the normal of this vector, an odd feature of Paraview, you cannot assign directly the direction of the cylinder)

I say in principle because:

1. the cylinder will have a length equal to the actual distance between the two particles in contact (coorect) BUT its radius will be a multiple of this length (wrong) while it should be scaled according to the scalar attribute, things impossible to realize with Paraview (you cannot set the scale of the cylinder radius according to a point-centered data array … sigh …)

So, we have to wait for some additional features in Paraview in order to visualize force chains as cylinders with different colors and radii.

Otherwise, we could do the rendering starting from a lower level, i.e., using POVray, like Ning did (see thread #92702).

I hope this long discussion my turn to be useful for future developments and for other users as well.

Best regards

Michele
------------------------------------------------------------------------------------------------------------------------------
Michele Griffa, Ph.D.
EMPA, Swiss Federal Laboratories for Materials Testing and Research (ETH Domain)

Überlandstrasse 129
8600, Dübendorf, Switzerland

Ph.: +41 (0) 44 823 4789
Fax: +41 (0) 44 823 4009
email: <email address hidden>
Web site: http://www.empa.ch

Personal web site: http://www.calcolodistr.altervista.org/en/index_en.html
-----------------------------------------------------------------------------------------------------------------------------

>-----Original Message-----
>From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
>Dion Weatherley
>Sent: Donnerstag, 10. Dezember 2009 20:59
>To: Griffa, Michele
>Subject: RE: [Question #91547]: "Force Chains" tool
>
>Your question #91547 on ESyS-Particle changed:
>https://answers.launchpad.net/esys-particle/+question/91547
>
> Status: Open => Answered
>
>Dion Weatherley proposed the following answer:
>Hi Michele,
>
>Thanks for the comprehensive explanation of how fcconv works. This will
>certainly be helpful for myself and others in future. Perhaps there is a
>way in paraview to visualise the thickness of the force chains by using
>a cylindrical glyph?
>
>Thanks again for figuring out how this tool works!
>
>Cheers,
>
>Dion.
>
>--
>If this answers your question, please go to the following page to let us
>know that it is solved:
>https://answers.launchpad.net/esys-
>particle/+question/91547/+confirm?answer_id=2
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/esys-particle/+question/91547
>
>You received this question notification because you are a direct
>subscriber of the question.

Revision history for this message
Dion Weatherley (d-weatherley) said :
#5

Hi Michele,

Thanks for the updated information. One of the guys here figured out how to visualise force-chains using OpenInventor so perhaps either POVray or Inventor would be the way to go.

BTW, I've set this question status to solved so it won't expire and we can still keep updating it as time goes on.

Cheers,

Dion.

Revision history for this message
Michele Griffa (michele-griffa) said :
#6

OK, thanks Dion for keeping this thread openable.
Thanks also for the suggestion about OpenInventor.
I'm not really a vis-guy and an expert of Object Oriented Programming, so for the moment I'll continue to use Paraview even though it's limited.
But with time I'll look into serious visualization with POVRay or OpenInventor.

Thanks again

Michele
------------------------------------------------------------------------------------------------------------------------------
Michele Griffa, Ph.D.
EMPA, Swiss Federal Laboratories for Materials Testing and Research (ETH Domain)

Überlandstrasse 129
8600, Dübendorf, Switzerland

Ph.: +41 (0) 44 823 4789
Fax: +41 (0) 44 823 4009
email: <email address hidden>
Web site: http://www.empa.ch

Personal web site: http://www.calcolodistr.altervista.org/en/index_en.html
-----------------------------------------------------------------------------------------------------------------------------

>-----Original Message-----
>From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
>Dion Weatherley
>Sent: Freitag, 11. Dezember 2009 21:41
>To: Griffa, Michele
>Subject: RE: [Question #91547]: "Force Chains" tool
>
>Your question #91547 on ESyS-Particle changed:
>https://answers.launchpad.net/esys-particle/+question/91547
>
> Status: Open => Solved
>
>Dion Weatherley changed the question status:
>Hi Michele,
>
>Thanks for the updated information. One of the guys here figured out how
>to visualise force-chains using OpenInventor so perhaps either POVray or
>Inventor would be the way to go.
>
>BTW, I've set this question status to solved so it won't expire and we
>can still keep updating it as time goes on.
>
>Cheers,
>
>Dion.
>
>--
>You received this question notification because you are a direct
>subscriber of the question.