3MAH / microgen

Microstructure generation

Home Page:https://3mah.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microgen logo

Microgen is a Python library designed to facilitate microstructure generation and meshing. Here are its core features:

  • Repeated cells: Generation of lattice structures such as octet trusses and honeycombs.
  • Triply Periodic Minimal Surfaces (TPMS): TPMS-based lattice generation known for favorable physical (mechanical, thermal, ...) properties like low density and large surface area.
  • Virtual composites microstructures: Generation of basic reinforcement geometries, including spheres, cylinders, ellipsoids, and more.
  • 3D Voronoi tessellation: Simulation of granular materials and polycrystalline metals.
  • Meshing: Regular and periodic meshing using Gmsh, remeshing using Mmg.

Generation of 3D objects is achievable through functions that utilize Open CASCADE (via Cadquery) or VTK (using PyVista). Neper offers tools for 3D tessellation, while Gmsh handles the generation of both regular and periodic meshes, with Mmg handling remeshing tasks.

Gyroid TPMS

PyPI package PyPI
Conda forge package Conda
Documentation Documentation
Status Status
Citation DOI
License License
Website Website
Binder Binder

Installation

With pip:

pip install microgen

With conda:

conda install conda-forge::microgen

To modify the sources, clone this repository and install microgen:

git clone https://github.com/3MAH/microgen.git
cd microgen
pip install -e .[all]
pre-commit install

The -e or --editable option allows to modify the sources without having to reinstall the package and [all] installs the optional development dependencies.

Run tests with pytest:

pytest tests -n auto

Examples

Click on the image to be redirected to the corresponding example on Microgen's documentation

Basic shapes

Repeated cells

Triply Periodic Minimal Surfaces (TPMS)

3D operations

Mesh

About

Microstructure generation

https://3mah.github.io

License:GNU General Public License v3.0


Languages

Language:Python 99.5%Language:Dockerfile 0.3%Language:Batchfile 0.2%Language:Shell 0.1%