Code Monkey home page Code Monkey logo

diffthermo_ocv_paper_local's Introduction

diffthermo

diffthermo is a python library for fitting thermodynamically consistent OCV models. It takes OCV and SoC as input, automatically does all the fitting and returns OCV models in PyBaMM and Matlab formats.

Installation

Install the environment first

conda create -n diffthermo python=3.11  torch=2.0.0 numpy=1.24 matplotlib pandas

After succesfully installed the environment,

conda activate diffthermo 

and then copy the diffthermo folder into your work directory.

Usage

It's as simple as only 3 lines of commands!

from diffthermo.utils import train, write_ocv_functions
# fit the OCV function
params_list = train(datafile_name='data.csv', 
                    number_of_Omegas = 6, 
                    learning_rate = 1000.0, 
                    total_training_epochs = 8000,
                    loss_threshold = 0.01)
# write the fitted OCV function in PyBaMM OCV function format
write_ocv_functions(params_list)

After the fitting, you can find your fitted PyBaMM OCV function in the file fitted_ocv_functions.py, and the MATLAB OCV function in the file fitted_ocv_functions.m. Copy and paste them into your own projects and that's it! Incredibly easy, isn't it?

See examples for the files. If you want to learn more on the method, please refer to the paper "Open-Circuit Voltage Models Should Be Thermodynamically Consistent", https://pubs.acs.org/doi/10.1021/acs.jpclett.3c03129

Folders In This Repo

diffthermo: the source code.

examples: example on how to fit a thermodynamically consistent OCV functions with a graphite OCV dataset.

data_for_manuscripts: contains all source code & run results for the paper "Open-Circuit Voltage Models Should Be Thermodynamically Consistent".

pybamm_OCV_functions: contains all the 12 fitted thermodynamically consistent OCV functions, implemented in PyBamm. You can get your OCV model in Matlab by running the fitting process and check the output file fitted_ocv_functions.m.

Cite this work

If you find this repo useful in your research, please cite this work as follows (BibTex Format):

@article{doi:10.1021/acs.jpclett.3c03129,
author = {Yao, Archie Mingze and Viswanathan, Venkatasubramanian},
title = {Open-Circuit Voltage Models Should Be Thermodynamically Consistent},
journal = {The Journal of Physical Chemistry Letters},
volume = {0},
number = {0},
pages = {1143-1151},
year = {0},
doi = {10.1021/acs.jpclett.3c03129},
URL = { 
        https://doi.org/10.1021/acs.jpclett.3c03129
},
eprint = { 
        https://doi.org/10.1021/acs.jpclett.3c03129
}
}

diffthermo_ocv_paper_local's People

Contributors

yaomz16 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.