You are here
MicroStructPy: Generation of statistically representative microstructures with direct grain geometry control
I would like to share an article that was recently published in CMAME.
It is about MicroStructPy, a very flexible microstructure generator able to represent various statistics for microstructures with multiple phases. It works in 2D and 3D and you can provide, for each phase, grain size distributions, volume fraction, elongation and orientation distribution for elongated grains, etc.
Actually, the nice thing is that it is entirely written in Python, can be installed via "pip install", and the input file for a microstructure can be written in XML. So there is a very simple learning curve. Also, the source code, examples, and documentation are freely available through an open source license.
Hope you find it useful!
- Julian J. Rimoli's blog
- Log in or register to post comments
- 6790 reads

Comments
Thanks for sharing
Thanks Julián for sharing the code on PyPI.
Ashkan,
MicroStructPy
Thanks for sharing this information Prof. Dr. Rimoli. I am sure this would be helpful for micromechanics community. It would be interesting for me if the distribution of oriented ellipsoids can be modelled.
Hi, thanks for your comment.
Hi, thanks for your comment. Yes, this can be done. Here you have the corresponding documentation:
https://docs.microstructpy.org/en/latest/cli/material.html?highlight=ellipsoid#ellipsoid
And here there is an example for 2D elliptical grains (the same procedure carries in 3D):
https://docs.microstructpy.org/en/latest/examples/cli/elliptical_grains.html
Periodic mesh
Thank you for sharing the code. A quick question that can this code generate periodic mesh on the RVE boundaries?