This repository holds the data and code required to reproduce results presented in "Graph neural networks for efficient learning of mechanical properties of polycrystals".
@article{HESTROFFER2023,
title = {Graph neural networks for efficient learning of mechanical properties of polycrystals},
journal = {Computational Materials Science},
volume = {217},
pages = {111894},
year = {2023},
issn = {0927-0256},
doi = {https://doi.org/10.1016/j.commatsci.2022.111894},
url = {https://www.sciencedirect.com/science/article/pii/S092702562200605X},
author = {Jonathan M. Hestroffer and Marie-Agathe Charpagne and Marat I. Latypov and Irene J. Beyerlein},
}
Install dependencies. Please note that installing PyTorch and PyTorchGeometric will be more involved and custom to your machine/GPU. See links provided.
pip install -r requirements.txt
Generate microstructure graphs for all representative volume elements (RVEs).
python create_graphs.py
Assemble graphs and rve mechanical response into PyTorch datalists.
python write_data.py
The different evaluations presented in the original paper are:
- 10-fold cross-validation of texture groups (A-G)
- Train (A-G) / Test (A-G)
- Train (A-G) / Test (H-L)
- 5-fold reduced data 'psuedo cross-validation', Train (A-G) / Test (H-L)
For each evaluation, loss histories, parity plots, and model checkpoints are outputted.
Usage: python model.py [OPTIONS]
Options:
--eval INT Evaluation number (e.g., 1 - 4, default: 1)
--prop STRING Material property of interest (stiffness/strength, default: stiffness)
--config INT Hyper-parameter configuration number (default: 0)
--config_dir PATH Directory with hyper-parameter configuration .jsons (default: ./config/)
--output_dir PATH Output directory (default: ./config/)
--seed INT Random seed (default: 42)