Code Monkey home page Code Monkey logo

battsimpy's Introduction

battsimpy

A python package for simulating Lithium-ion battery performance. Equivalent circuit, Single-Particle, and full Pseudo-2D (P2D) porous electrode models are available.

Presently, the P2D model is the only one we are including, and this has been verified against the LIONSIMBA MATLAB package. We have used their finite-volume based approach, and would like to refer others to their paper titled: LIONSIMBA: A Matlab Framework Based on a Finite Volume Model Suitable for Li-Ion Battery Design, Simulation, and Control

Author

Matthew Klein Contact: [email protected]

Installation

The third-party packages required are as follows: python2.7, numpy, scipy, matplotlib, and assimulo.

assimulo is used to provide access to the IDA solver in LLNL's Sundials package. While providing a simple interface to IDA, it does not provide the use of the sparse direct solvers in IDA, which highly limits the compuational speed here. This will be an area for improvement for us moving forward.

My preferred method for getting the third-party packages to run battsimpy is to install Anaconda2 and then conda install assimulo. Then, after installing Anaconda2:

conda install -c chria assimulo=2.9

This is the quickest way to get going for me.

Setup

Two configuration files need to be either generated, or modified from the provided examples. The model_...conf and sim_...conf files should be setup.

For simply running the provided model and simulation the only key that needs to be changed is the INPUT_DATA_ROOT. This should be: /your/path/to/battsimpy/model_parameters/

Change the INPUT_DATA_ROOT key in the model configuration file.

Change the OUTPUT_ROOT and the DATE keys in the simulation configuration file. The OUTPUT_ROOT should be setup as follows: /path/for/output/data/

The DATE key is for a subdirectory in your OUTPUT_ROOT to dump the output simulation data. e.g., /OUTPUT_ROOT/DATE/ is the full path used for the output simulation data.

Useage

cd to your local directory for /path/to/battsimpy/battsimpy/.

To run an example simulation:

python testdriver.py /path/to/battsimpy/ model_conffile.conf sim_conffile.conf

Some example plots:

python plotdriver.py /path/to/battsimpy/ model_conffile.conf sim_conffile.conf

More detailed setup

We are working to provide a more detailed User Manual to explain how to setup the full set of model parameters and configuration files from scratch for users that need to take full advantage of this.

battsimpy's People

Contributors

matthewpklein avatar

Watchers

 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.