Utility for reading easyly checkPointer files

Asked by Diego Peinado Martín

Hello again, I'm wondering if there is yet made an utility for reading the checkPointer files in Python. The objetive is to read the particle position from the example flow_hopper.py and to make a visualization.

I've another question only for curiosity. In a previous question I've seen that the method followed by LSM is close to the one exposed in the book computational granular dynamics by Pöschel & Schwager. The time integration scheme is the same than in the book ? Its a predictor-corrector type. Another question, the tangential forces are implemented as Cundall and Strack model ?

Thanks in advance and best regards.

Question information

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

Hi Diego,

We plan to start developing a new library for reading and post-processing CheckPoint files in Python but unfortunately we have not even a prototype for that yet. Currently I and other colleagues use the post-processing tool "dump2vtk" that comes with ESyS-Particle v2.0 to convert CheckPoint files to VTK Unstructured Grid Files then use either ParaView (http://www.paraview.org/) or VisIt (http://www.llnl.gov/visit) for interactive/scripted visualisation. I plan to write a tutorial/FAQ at some stage on this but I'll try to briefly explain the "dump2vtk" part here:

To use dump2vtk, you need to supply a few commandline arguments. Suppose you have created a bunch of CheckPoint files with the fileNamePrefix = "myCheckFiles" and have saved them every 10000 timesteps. To convert all CheckPoint files from timestep 0 to timestep 100000 (inclusive), you would need to issue the following command in the shell:

dump2vtk -i myCheckFiles -o myVTKFiles_ -t 0 11 10000

This will create 11 VTK files called myVTKFiles_0.vtu, myVTKFiles_1.vtu,...,myVTKFiles_10.vtu than can then be opened in ParaView or VisIt for interactive visualisation.

IMPORTANT: If you create CheckPoint files in a simulation using "RotSpheres", you need to add "-rot" to the argument list of dump2vtk e.g:

dump2vtk -i myCheckFiles -o myVTKFiles_ -t 0 11 10000 -rot

A lot of interactive visualisation can be easily done using dump2vtk and ParaView. I use it almost daily. Users are warned however that the VTK files can get *very* large for large models (>100K particles) and you may run into memory overload problems on the workstation running ParaView. A decent multi-core workstation with >8Gb RAM is a good investment for interactive visualisation!

Diego, I'll answer your other questions soon.

Cheers,

Dion.

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

Hi Diego,

Here's an answer to your other questions about the numerical scheme of ESyS-Particle.

> [Diego asked:] The time integration scheme is the same than in the book (Pöschel & Schwager)?

No. ESyS-Particle does not currently implement a predictor-corrector time-integration scheme. The time-integration scheme in ESyS-Particle is a simple first-order finite-difference scheme. A simple example of how this is done can be found in Model/Particle.cpp in the integrate() subroutine:

[quote]
    // 1st order scheme, 13 Flops
    m_vel+=m_force*m_div_mass*dt; // 7 Flops
    m_pos+=m_vel*dt; // 6 Flops
[unquote]

This is one of the simplest time-integration schemes for DEM simulations and generally requires smaller timestep increments (dt) but the advantages are alluded to by the comments above...it is computationally quite inexpensive compared with the predictor-corrector scheme. You will notice that a second-order scheme is commented out in Model/Particle.cpp. This second scheme has not been recently tested and I cannot guarantee it will work without major edits to other parts of the code.

To clarify, Pöschel & Schwager is (coincidentally) an excellent introduction to many of the concepts and algorithms employed in ESyS-Particle but the code was developed completely independently of that book. One should not assume ESyS-Particle implements all the algorithms in that book exactly. I recommend Pöschel & Schwager to new DEM researchers because I think it an excellent introduction to DEM algorithms generally.

> [Diego asked:] the tangential forces are implemented as Cundall and Strack model ?

Yes, for NRotFriction interactions, the implementation is equivalent to to Cundall and Strack friction logic. For RotFriction interactions there are some minor differences in the way tangential frictional forces are partitioned between translational forces and rotational moments. ESyS-Particle assumes particles are "rough" rather than "ideal" frictional spheres. Hence frictional forces result in some sliding as well as relative rotation between touching particles.

I hope to write an updated journal paper on the numerical scheme of ESyS-Particle some time soon but cannot guarantee when it will be available as a manuscript or in press. Most questions about the numerical scheme (force calculations and time-integration) can be found by reading the code in the Model/ subdirectory of ESyS-Particle.

Cheers,

Dion.

Revision history for this message
Diego Peinado Martín (diego-peinado) said :
#3

Dion, thanks a lot again. If I have enough time, and I can improve my knowledge of how it's programmed LSM, I would like to help in coding some parts. I've been reading part of the code (huge) and by the moment it is difficult to see how does all fit. The Parallelization issues, the python interface ... well it is too much for having a complete picture. But it is true that probably the modellization issues can be isolated so we can see how to code other posibilities (I'm thinking in frictional walls and meshes, and the problem of sharp edges in meshes).

Regards,
Diego.

Revision history for this message
Diego Peinado Martín (diego-peinado) said :
#4

Thanks Dion Weatherley, that solved my question.

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

Hi Diego,

You are most welcome to contribute to software development of ESyS-Particle as the development team hopes ESyS-Particle will become a community software project involving contributors across the globe. The Model/ directory is a great place to start as that contains the implementation of different particle types and (most importantly) the various interaction laws.

I can certainly sympathise regarding how hard it is to understand how the code fits together. I started working with ESyS-Particle about 2 years ago when the code-base was essentially as complex as it is now. I continue to learn new things about the code every other day! Dr. Steffen Abe and myself plan to start writing a Programmer's Guide at some stage to help navigate the code. Unfortunately, both Steffen and myself can only spend a small amount of our time on ESyS-Particle software support as we both derive the majority of our salaries from research grants using ESyS-Particle for applied computational research.

Steffen will host a practical workshop on ESyS-Particle from 21-25 September, 2009 in Aachen, Germany covering DEM principles, ESyS-Particle usage and software development. If you would like more information, please contact me directly (<email address hidden>) for a copy of the workshop flyer.

Cheers,

Dion.