Skip to content

A demo code for implementation of differentiable thermodynamic modeling in JAX.

License

Notifications You must be signed in to change notification settings

BattModels/JAX-TherMo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JAX-TherMo

A demo code for implementation of differentiable thermodynamic modeling in JAX, taking the Cu-Rh system as an example.

Install

No installation for this code is needed. Just download the files in one folder.

JAX should be installed first.

Run the code

Use train.py to train the model.

Use pd.py to calculate the phase diagram based on the trained model.

Results

After running the code, you should be able to get the results as in the "Results" folder, including the loss function and its decomposition into different contributions, the gradient of the loss function, the model parameters and the Gibbs energies of involved phases, all evolving with the training process, as well as the predicted phase diagram based on the trained model.

Reference

Please cite the reference below if you use this code in your work:

Guan, Pin-Wen. Differentiable thermodynamic modeling. Scripta Materialia 207 (2022) 114217.

@article{GUAN2022114217,
title = {Differentiable thermodynamic modeling},
journal = {Scripta Materialia},
volume = {207},
pages = {114217},
year = {2022},
issn = {1359-6462},
doi = {https://doi.org/10.1016/j.scriptamat.2021.114217},
url = {https://www.sciencedirect.com/science/article/pii/S1359646221004978},
author = {Pin-Wen Guan},
keywords = {Thermodynamic modeling, Differentiable programming, Machine learning},
}

About

A demo code for implementation of differentiable thermodynamic modeling in JAX.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.8%
  • Shell 4.2%