Microgen is a simple python library that helps to generate and mesh microstructures.
Here are the main features:
- Entirely written in Python 3 and based on CadQuery and PyVista libraries.
- It allows to generate simple reinforcement geometries (spheres, cylinder, ellipsoids, …) to generate virtual composites microstructures.
- Three-dimensional Voronoi tessellation rallons to simulate the response granular materials and polycrystalline metals.
- Regular mesh and periodic mesh are implemented using Gmsh, remeshing using Mmg is also implemented.
| Provider | Status |
|---|---|
| Read the Docs |
With conda:
conda install -c conda-forge -c cadquery -c set3mah microgen
With pip (Linux only):
pip install microgen
You may need to install dependencies mentioned in the requirements.txt file
pip install -r requirements.txt
To modify the sources, clone this repository and set up the following environment:
Create a conda environment with all the required dependencies
conda env create -f environment.yml -n microgen-dev
conda activate microgen-dev
Then install microgen:
python setup.py install
Click on the image to be redirected to the corresponding example on Microgen's documentation


