8. How-to for superquadric particles¶
8.1. Introduction¶
Superquadric simulations allow LIGGGHTS(R) to use superquadric bodies as particles. This text describes how to perform superquadric simulations in LIGGGHTS(R).
8.2. Compilation¶
To compile LIGGGHTS(R) with this feature the boost library must be available on the system. On most Linux-distributions a recent version can be installed via the package managment systems.
The way how to enable the superquadric feature depends on the build-system.
8.2.1. Using make¶
Before starting the compilation, you have to enable the superquadric model in your Makefile. You have to add the following settings to your Makefile:
LMP_INC += -DSUPERQUADRIC_ACTIVE_FLAG -DNONSPHERICAL_ACTIVE_FLAG
In case of a non-system-wide boost installation add:
EXTRA_INC += -IPath/to/your/Boost/include
Note
Make sure that you add the definitions after the original assignments of LMP_INC and EXTRA_INC. Otherwise your changes will be overwritten.
Note
Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking. (link)
8.2.2. Using CMake¶
To enable the superquadric feature using the CMake build system, we provide CMake a command-line parameter.
cmake ../src -DUSE_SUPERQUADRIC=on
8.3. Compile the ParaView plug-in¶
The superquadric feature of LIGGGHTS comes with its own dedicated ParaView plug-in to properly visualize superquadric particles.
The compilation of the plug-in is done with the following steps. Adjust the paths according to your local installation.
cd ~/CFDEM/LIGGGHTS/tools/paraview/SuperquadricGlyph
mkdir build
cd build
cmake .. -DParaView_DIR:PATH=/absolute/path/to/paraview/build/dir
make
Note
The path to ParaView is the build directory, and not the source directory. If a CFDEM environment has been sourced, then CMake should be able to automatically find the proper path to ParaView.
If compilation finishes without any errors, then the build directory will contain a library named libSuperquadricGlyphFilter.so.
To visualize superquadrics in ParaView, open the converted dump files of a superquadric case, click in the menu “Tools –> Manage Plugins…”, click on the “Load New …” button and select the libSuperquadricGlyphFilter.so file.
8.4. Detailed description¶
The overall simulation structure stays the same for superquadric simulations as used for standard LIGGGHTS(R) simulations. In order to create a superquadric simulation based on an existing case you have to perform following steps:
For contact models (pair_style gran as well as fix wall/gran) use surface superquadric
The superquadric model requires a special integrator, namly fix nve/superquadric
To define new superquadric particles use the fix particletemplate/superquadric
8.5. Performance¶
The superquadric model uses the framework of LIGGGHTS(R). Therefore, the parallel scalability is linear as LIGGGHTS(R) itself. Compared to standard LIGGGHTS(R), the calculation of contact points is computational expensive for superquadric bodies.