Coder Social home page Coder Social logo

jellybamm's Introduction

Scheduled Documentation Status

Logo

Welcome to JellyBamm

The lithium-ion battery cell simulator powered by PyBaMM. JellyBamm allows you to specify cyclindrical jellyroll cell designs parametrically or extract them from images.

Leverage the experiments and parameter sets from PyBaMM and scale up your simulations from 1D representations to detailed 2D (and 3D - in future) cell simulations. Include thermal effects and account for inhomogenteities introduced by tabs or variable inputs for heat transfer.

Include statistical distributions in the battery parameters for sections of the cell.

Installing

Execute the following command to install JellyBamm with pip after navigating to the root folder:

pip install -e .

Getting Started

Example notebooks can be found in the docs\examples folder. Example scripts can be found in the run_scripts folder. Here is an example:

import openpnm as op
import matplotlib.pyplot as plt
import jellybamm
import liionpack as lp
import pybamm


plt.close("all")

# pybamm.set_logging_level("INFO")
wrk = op.Workspace()
wrk.clear()


if __name__ == "__main__":
    # Geometry of 1D mesh
    Nunit = 10
    spacing = 0.1
    pos_tabs = [-1]
    neg_tabs = [0]
    length_3d = 1.0

    # Experiment
    I_app = 1.0
    dt = 30
    Nsteps = 12
    hours = dt * Nsteps / 3600
    experiment = pybamm.Experiment(
        [
            f"Discharge at {I_app} A for {hours} hours",
        ],
        period=f"{dt} seconds",
    )

    # OpenPNM project
    project, arc_edges = jellybamm.make_1D_net(Nunit, spacing, pos_tabs, neg_tabs)

    # Parameter set
    param = pybamm.ParameterValues("Chen2020")
    # JellyBaMM discretises the spiral using the electrode height for spiral length
    # This parameter set has the longer length set to the Electrode width
    # We want to swap this round
    param["Electrode width [m]"] = length_3d
    initial_soc = None

    # Run simulation
    project, output = jellybamm.run_simulation_lp(
        parameter_values=param,
        experiment=experiment,
        initial_soc=initial_soc,
        project=project,
    )
    lp.plot_output(output)

Running the tests

pytest

Contributing

Please read the docs for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD-3-Clause license - see the LICENSE file for details

Acknowledgments

  • Great thanks to the PyBaMM and OpenPNM teams

jellybamm's People

Contributors

tomtranter avatar rtimms avatar mleot avatar

Stargazers

mazh avatar  avatar  avatar Amélie Kempf avatar  avatar Jie Lin avatar  avatar  avatar Saransh Chopra avatar Mario Klanac avatar

Watchers

James Cloos avatar  avatar  avatar Saransh Chopra avatar

jellybamm's Issues

Make docs

  • Add docs from liionpack
  • Add examples into docs
  • Update readthedocs
  • Update all docstrings
  • Make new logo

Easier thermal boundary conditions

Beforehand as part of config you could set the heat transfer coefficient and determine whether to apply this to all the free stream boundary pores or just 1/3 of them for demonstration purposes. Like the tab picker it would be good to have a thermal boundary picker utility

Add logger

Quite a few functions had print statements. Make a logger and put them there if necessary

Issue with cc heating

I'm having some trouble with running the normal tab design and recreating the results from the 46800 paper, as the cc ohmic heating always diverges, resulting in extremely high temperatures. Is this a known issue?

About ecm package

@TomTranter @rtimms

"ecm" package is depend on the python in between 2.5 to 2.9.
and remaining packages will depend on python above 3.0

How can I use this?
because of the "ecm" package, I am not able to do any simulation.

please help me.

Examples not working

I was going through the repository and I found that the examples available as jupyter notebooks error out -

  1. current-density-distribution.ipynb - The files var_Current_collector_current_density_lower.mat, var_Current_collector_current_density_upper.mat, and MJ141-mid-top_m_cc_new.pnm are missing. 2 of these files are available in the tests folder but there isn't any 8A subdirectory present there.
  2. solution-data-and-processed-variables.ipynb - Is this notebook supposed to be the same as the one in PyBaMM? There were a few PyBaMM errors in this notebook like the variable name 'Negative particle surface concentration' is without units.
  3. The third notebook doesn't open as the JSON is invalid. I tried fixing the JSON but then it started giving another error.

And I also wanted to ask if the scripts in the run_scripts folder are example scripts? I am also facing some issues with them but I don't know if they are supposed to run independently.

Hello Stargazers

Hi @helgestein and @mklanac,
I noticed you both starred this repo so have some interest in it. I guess you read one of my papers or noticed it used PyBaMM. I'm in the middle of a big refactor so thought I'd get in touch in case you would like to get more involved in the development. There are plenty of things to do and just having some extra QA on hand would be useful. I intend to tidy it all up and transfer it to the pybamm-team organisation and then publish a paper on the code in JOSS like I have recently done for liionpack https://joss.theoj.org/papers/10.21105/joss.04051
Any help would mean we could co-author the paper.
Thanks

Change config

This was set up originally so that you could define a bunch of simulations and start them running in separate consoles in parallel but the parallel computing of liionpack will probably mess this up. It's also useful for having a record of what the simulation was for a folder of output later on. However, it's a little clunky and shouldn't be the default way to call the program. Make it more user friendly and tidy up the functionality and test whether parallel still works

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.