Skip to content

This code aims to achieve a standardized particle packing generation framework for granular materials.

License

Notifications You must be signed in to change notification settings

ChengshunShang1996/DEMGen

DEMGen: A Standard Particle Packing Generator for the Discrete Element Method

Release License Contributing

This code aims to achieve a standard particle packing generation framework for granular materials. This code not only allows users to generate a series of random packings that fulfill their requirements (such as particle size distribution, porosity, and stress) but also provides a series of tools for particle packing characterization of internally or externally generated packings.

Table of Contents

Main Features

This program can be used for DEM particle packing generation. From this point of view, it can be treated as a pre-processing tool for any 3D DEM code. Meanwhile, it can be used for quantitative packing characterization, allowing users to have a deep insight into the material properties from the view of geometry components. The main characteristics of this framework are:

  • It provides a standardized framework for particle packing generation.
  • Both dynamic methods and constructive methods are available for particle packing generation (The constructive method is limited to regular arrangement up to now).
  • Providing a method (radius expansion method with servo control) for achieving both packing density and initial stress.
  • The periodic boundary is available for boundary conditions, allowing users to clone a small RVE packing to a large one.
  • Providing a series of tools for packing characterization.

DEMGen Dependencies

DEMGen is fully written in the Python programming language and adopts the Object Oriented Programming (OOP) paradigm to offer modularity and extensibility. Due to the nature of Python, this program can be run on different platforms (Windows or Linux)

Please make sure you have installed Python3.X.X on your PC. Currently, Python3.10.X is recommended, as other versions haven't been tested.

Required Python Pakage:

  • numpy
  • matplotlib
  • pyevtk

Environment variable setting in a Command Prompt:

set PYTHONPATH=%PYTHONPATH%;'path_to_DEMGen'

For the dynamic generation methods, DEM calculations are required. The DEM Application of the Kratos Multiphysics framework is adopted here. A compiled Kratos for Windows environment (Python 3.10.11 and Visual Studio 2022) has been attached in the source code "./src/external/kratos". For using Kratos, the following environment variable need to be set in a Command Prompt:

set PYTHONPATH=%PYTHONPATH%;'path_to_DEMGen'/src/external/kratos
set PATH=%PATH%;'path_to_DEMGen'/src/external/kratos/libs

Tip: This compiled Kratos may not work properly due to the different system environment setting. So it is recommanded to compile your own Kratos according to the Kratos INSTALL.md.

Instructions

Input and Output Files

  • Input Parameters (.json):

This JSON file is used as input for the program. For generating particle packings, at least one input file is needed: ParametersDEMGen.json. For dynamic generation methods, both MaterialsDEM.json and ProjectParametersDEM.json are needed as the Kratos DEM simulation will be run.

  • Output Results (.mdpa):

This MDPA file is used for storing the results of a simulation. Usually, you can find the generated packing in the folder "./generated_cases/cases_$number$/show_packing/" (for dynamic methods) or "./show_packing/" (for constructive methods) of the working path. Both Paraview and GiD can be used to display the results.

Running Simulations

To run a simulation, launch the DEMGen_framework_main.py inside the folder ./src. For running the file correctly, please modify the "aim_path" (at the last of the file) to your own case path (absolute one).

Packing Generation

For running the particle packing generation process using different generation methods, different parameters need to be set in the ParametersDEMGen.json. Please study the example case of different methods for futher usage.

Packing Characterization

In progress...

Checking Results

In the case folder or in the generated case folder, the will be a folder call "show packing", there you can find the post-procesing file of the generated packing. Then it can be ckecked in Paraview or Gid.

Examples

Examples are available inside the folder examples.

Dynamic methods

Constructive methods

Here are some results from example test_gravitational_deposition_method.

Generated with rigid walls as boundary conditions.

                 

Final packing.

        

Generated with periodic boundaries.

                 

Final packing.

        

By comparing the results of the two conditions, we could find that using periodic boundaries can help us get a particle packing with more homogeneous force chains.

                 

Some results from example test_cubic_arrangement_method (left) and test_hpc_arrangement_method (right).

                 

Documentation

In progress... (Just checking this README.md for information)

How to Contribute

Please check the contribution guidelines.

How to Cite

To cite this repository, you can use the metadata from this file.

Authorship

1 International Center for Numerical Methods in Engineering (CIMNE)

2 Universitat Politècnica de Catalunya (UPC)

                 

License

DEMGen is licensed under the BSD license, which allows the program to be freely used by anyone for modification, private use, commercial use, and distribution, only requiring the preservation of copyright and license notices. No liability and warranty are provided.

About

This code aims to achieve a standardized particle packing generation framework for granular materials.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published