Skip to content

MingLiang-Qu/pores4thought

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Pores for thought: Generative adversarial networks for stochastic reconstruction of 3D multi-phase electrode microstructure with periodic boundaries

Repository for genration of 3D multi-phase electrode microstructure with periodic boundaries

real_generated

Authors

  • Andrea Gayon-Lombardo
  • Lukas Mosser
  • Prof Nigel Brandon
  • Samuel Cooper

Department of Earth Science and Engineering - Imperial College London

Dyson School of Design - Imperial College London

Citing this work

If you use these codes or parts of them, as well as the informtion provided in this repo, please cite the following article:

Gayon-Lombardo, A., Mosser, L., Brandon, N.P. et al. Pores for thought: generative adversarial networks for stochastic reconstruction of 3D multi-phase electrode microstructures with periodic boundaries. npj Comput Mater 6, 82 (2020). (https://doi.org/10.1038/s41524-020-0340-7)

Getting Started

These instructions will allow you to generate 2D slices of a SOFC anode, and 3D reconstructions of two types of electrode microstructures: a Lithium-ion cathode and a SOFC anode.

Prerequisites

  • We recommend the use of anconda
  • All codes are written in pytorch
pip install torch
  • For the pytorch version you will need to have installed h5py and tifffile
pip install h5py
pip install tifffile

Pre-trained Generator

The following steps are required to generate an image from a pre-trained GAN

  • Locate the folder 2D/postprocess or 3D/postprocess
  • To generate a volume of a Li-ion cathode, run:
python NMC_generate_threephase.py
  • To generate a volume of a SOFC anode, run:
python SOFC_generate_threephase.py

Larger volumes can be obtained by changing the size parameter alpha. E.g. to generate a 512x512x512 volume, alpha = 30:

params {
        'alpha' : 30
        }

Samples of already generated volumes of 64x64x64 voxels and 256x256x256 voxels are given in the folder 3D/Samples_volumes

Train new model

The following steps will guide you through the training process of a DCGAN

Data pre-treatment

python input_datasets_3D.py

Training step

  • The library corresponding to the pre-treated dataset (i.e. training set) must be in the same file as the main_train.py file

  • To run the training process, locate the folder 3D/train/ and run the code:

python main_train.py

Contributing

For contributing or submitting pull requests, please contact the authors:

Acknowledgments

  • AGL thanks CONACYT-SENER Mexico for funding her PhD

  • SJC thanks The Faraday Institute for funding

  • We would like to thank Prof Stephen J. Neethling for his input and valuable discussions

  • We also thank Prof Olivier Dubrule for his valuable input

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%