All Projects → andrew-abimansour → PyGran

andrew-abimansour / PyGran

Licence: GPL-2.0 license
A DEM toolkit for rapid simulation & quantitative analysis of granular systems

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to PyGran

dctb-utfpr-2018-2
Repositório para organizar os materiais e entregas das disciplinas ministradas pelo Prof. Diogo Cezar, na UTFPR-CP em 2018/02.
Stars: ✭ 12 (-76%)
Mutual labels:  materials
nndl-materials
邱锡鹏老师《神经网络与深度学习》一书参考视频及补充材料
Stars: ✭ 86 (+72%)
Mutual labels:  materials
lethe
Repository for the open-source lethe CFD/DEM/CFD-DEM project
Stars: ✭ 120 (+140%)
Mutual labels:  discrete-element-method
atomai
Deep and Machine Learning for Microscopy
Stars: ✭ 77 (+54%)
Mutual labels:  materials
Ios Developer Roadmap
Roadmap to becoming an iOS developer in 2018.
Stars: ✭ 5,514 (+10928%)
Mutual labels:  materials
ESPEI
Fitting thermodynamic models with pycalphad - https://doi.org/10.1557/mrc.2019.59
Stars: ✭ 46 (-8%)
Mutual labels:  materials
scarplet
Topographic edge detection of fault scarps and other landforms in digital elevation data
Stars: ✭ 14 (-72%)
Mutual labels:  dem
mini-map-maker
A tool for automatically generating 3D printable STLs from freely available lidar scan data.
Stars: ✭ 51 (+2%)
Mutual labels:  dem
Helpful Lab Materials
Easily write cover letters for submitting your academic manuscripts
Stars: ✭ 54 (+8%)
Mutual labels:  materials
xdem
Analysis of digital elevation models (DEMs)
Stars: ✭ 50 (+0%)
Mutual labels:  dem
kaleidoscope
🍀 A small collection of creative nodes to generate color palette and store values for Blender
Stars: ✭ 99 (+98%)
Mutual labels:  materials
qmflows
This library tackles the construction and efficient execution of computational chemistry workflows
Stars: ✭ 35 (-30%)
Mutual labels:  materials
study-snap
📓📲 Flutter app for managing study materials in form of photos.
Stars: ✭ 34 (-32%)
Mutual labels:  materials
PyChemia
Python Materials Discovery Framework
Stars: ✭ 59 (+18%)
Mutual labels:  materials
rlss-2019
Materials for the Practical Sessions of the Reinforcement Learning Summer School 2019: Bandits, RL & Deep RL (PyTorch).
Stars: ✭ 79 (+58%)
Mutual labels:  materials
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+9184%)
Mutual labels:  dem
OpenMaterial
3D model exchange format with physical material properties for virtual development, test and validation of automated driving.
Stars: ✭ 23 (-54%)
Mutual labels:  materials
tilde
Materials informatics framework for ab initio data repositories
Stars: ✭ 19 (-62%)
Mutual labels:  materials
mlearn
Benchmark Suite for Machine Learning Interatomic Potentials for Materials
Stars: ✭ 89 (+78%)
Mutual labels:  materials
EMMO
Elementary Multiperspective Material Ontology (EMMO)
Stars: ✭ 44 (-12%)
Mutual labels:  materials

Welcome to the PyGran webpage!

PyGran is an open-source toolkit primarily designed for analyzing DEM simulation data. In addition to performing basic and custom post-processing, PyGran enables running DEM simulation with LIGGGHTS in Python. It's recommended to use PyGran with Python 3.7 or higher versions. If you wish to use PyGran's mesh capabilities via VTK, Python<=3.8 is recommended.

The main features of PyGran:

  • Interactive DEM simulation and/or analysis using Python
  • Parallel "multiple parameter, single script" simulation for parametrization and sensitivity analysis
  • Intuitive syntax for particle manipulation and analysis (e.g. slicing, concatenating, etc.)
  • Post-processing coupled particle-mesh DEM simulation with VTK
  • Quick and easy plotting of DEM data with matplotlib
  • Support for high-performance computing with MPI

The core modules in PyGran utilize the following stand-alone packages:

  • simulation: provides APIs for running DEM simulation based on the pygran_sim package.
  • analysis: provides routines for post-processing DEM data based on the pygran_analysis package.

If you find PyGran useful in your research, please consider citing the following paper:

DOI for Citing PyGran

@article{aam2019pygran,
  title={PyGran: An object-oriented library for DEM simulation and analysis},
  author={Abi-Mansour, Andrew},
  journal={SoftwareX},
  volume={9},
  pages={168--174},
  year={2019},
  publisher={Elsevier},
  doi={10.1016/j.softx.2019.01.016}
}

Quick Installation

Installing PyGran is quite straight forward on a Unix/Unix-like machine. Just fire up a terminal and then use pip to install PyGran:

pip install pygran

This will install a basic version of pygran. For a full installation (that includes mpi4py, vtk, etc.), run:

pip install pygran[extras]

Basic Usage

Running DEM simulation with LIGGGHTS

PyGran also provides an interface for running DEM simulation with LIGGGHTS. This is achieved by importing the simulation module as shown in the script below for simulating granular flow in a hopper.

from pygran import simulation, params

# Create a DEM object for simulation
sim = simulation.DEM(
    boundary=("f", "f", "f"),
    box=(-1e-3, 1e-3, -1e-3, 1e-3, 0, 4e-3),
    species=(
        {
            "material": params.stearicAcid, 
            "radius": ("constant", 5e-5)},
        ),
    gravity=(9.81, 0, 0, -1),
    mesh={
        "hopper": { # arbitrary mesh name
            "file": "silo.stl", # mesh filename
            "mtype": "mesh/surface", # mesh type
            "material": params.steel, # mesh material
        }
    },
)

# Insert 1000 particles for species 1 (stearic acid)
insert = sim.insert(species=1, value=1000)

# Evolve the system in time
sim.run(nsteps=1e6, dt=1e-7)

Post-processing DEM output data

Using PyGran for doing post-analysis is also quite straight forward. Computing particle overlaps shown below for instance can be done in few lines of code:

from pygran import analysis

# Instantiate a System class from a dump file
sys = analysis.System(Particles='granular.dump')

# Instantiate a nearest-neighbors class
nns = analysis.Neighbors(Particles=sys.Particles)
overlaps = nns.overlaps

For more examples on using PyGran for running DEM simulation, check out the examples page.

Questions or suggestions?

For reporting bugs or suggesting new features/improvements to the code, please open an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].