Kanapy: Synthetic polycrystalline microstructure generator with geometry and texture
R.G. Prasad, Mahesh;
Kanapy is a python package for generating complex synthetic polycrystalline microstructures. The general implementation is done in Python with the performance critical part for the geometry module implemented in C++. The Python bindings for the code written in C++ are generated using the lightweight header-only library pybind11. The C++ part of the implementation utilizes the Eigen library for efficient linear algebra calculations. The texture module of Kanapy is implemented as MATLAB functions. It also utilizes several algorithms implemented in MTEX for texture analysis.
In Kanapy-v1, an efficient modeling strategy for generating the geometry of the synthetic microstructures using statistical data was presented. Some of the novel features provided include: modeling complex microstructures consisting of irregular grain shapes, particle (grain) packing through collision detection and response system, and collision handling through a two-layer collision detection scheme. Synthetic microstructures are a key aspect of the micromechanical modeling approach for the prediction of mechanical properties. Apart from microstructure geometry, a vital component of polycrystalline microstructures that has substantial influence on the material behavior is texture. Therefore, a synthetic microstructure can be considered incomplete without the information of texture. This is addressed in the current version of Kanapy by including new efficient texture reduction and orientation assignment algorithms to the already existing package.