https://github.com/battmoteam/battmo.jl

Differentiable simulation of batteries in Julia using Jutul.jl

https://github.com/battmoteam/battmo.jl

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords from Contributors

automatic-differentiation blackoil co2-sequestration compositional finite-volume multiscale porous-media-flow reservoir-simulation
Last synced: 10 months ago · JSON representation

Repository

Differentiable simulation of batteries in Julia using Jutul.jl

Basic Info
Statistics
  • Stars: 27
  • Watchers: 4
  • Forks: 3
  • Open Issues: 11
  • Releases: 15
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

Documentation Build Status

BattMo.jl is a framework for continuum modelling of lithium-ion batteries written in Julia

[!TIP] Please see the docs for more details, tutorials and examples: https://battmoteam.github.io/BattMo.jl/dev/

The Battery Modelling Toolbox (BattMo) is a resource for continuum modelling of electrochemical devices in MATLAB. The initial development features a pseudo X-dimensional (PXD) framework for the Doyle-Fuller-Newman model of lithium-ion battery cells. This is currently a early release that implements a subset of features from the MATLAB version of BattMo with improved numerical performance. BattMo.jl is based on Jutul.jl and uses finite-volume discretizations and automatic differentiation to simulate models in 1D, 2D and 3D.

Installation

This package is registered in the General Julia registry. To add it to your Julia environment, open Julia and run

julia using Pkg; Pkg.add("BattMo")

Getting started

For an example of usage, you can add the GLMakie plotting package:

julia using Pkg Pkg.add("GLMakie")

You can then run the following to simulate the predefined p2d_40 case:

```julia using BattMo, GLMakie

BattMo stores cell parameters, cycling protocols and settings in a user-friendly JSON format to facilitate reuse. For our example, we load

the cell parameter set from a NMC811 vs Graphite-SiOx cell whose parameters were determined in the Chen 2020 paper.

We also load an example cycling protocol for a simple Constant Current Discharge.

cellparameters = loadcellparameters(; fromdefaultset = "Chen2020") cyclingprotocol = loadcyclingprotocol(; fromdefaultset = "CCDischarge")

Next, we select the Lithium-Ion Battery Model setup with default model settings.

The default Lithium-Ion Battery Model Setup selected below corresponds to a basic P2D model setup, where neither current collectors nor thermal effects are considered.

model_setup = LithiumIonBattery()

Then we setup a Simulation by passing the model, cell parameters and a cycling protocol.

We first prepare the simulation:

sim = Simulation(modelsetup, cellparameters, cycling_protocol);

When the simulation is prepared, there are some validation checks happening in the background, which verify whether i) the cell parameters, cycling protocol and settings are sensible and complete

Now we can run the simulation

output = solve(sim;)

The output is a NamedTuple storing the results of the simulation within multiple dictionaries. Let's plot the cell current and cell voltage over time and make a plot with the GLMakie package.

states = output[:states]

t = [state[:Control][:Controller].time for state in states] E = [state[:Control][:Voltage][1] for state in states] I = [state[:Control][:Current][1] for state in states] fig = Figure() ax = Axis(fig[1, 1], ylabel = "Voltage / V", xlabel = "Time / s", title = "Discharge curve") lines!(ax, t, E) ax = Axis(fig[1, 2], ylabel = "Current / A", xlabel = "Time / s", title = "Discharge curve") lines!(ax, t, I) display(fig) ```

This should produce the following plot: Discharge curve

3D simulation example

Run a 3D model and plot the results in an interactive viewer.

```julia using BattMo

For our example, we load

the cell parameter set from of a commercial Type LP2770120 prismatic LiFePO4/graphite cell whose parameters were determined in the xU 2015 paper.

We also load an example cycling protocol for a simple Constant Current Discharge.

cellparameters = loadcellparameters(; fromdefaultset = "Xu2015") cyclingprotocol = loadcyclingprotocol(; fromdefaultset = "CCDischarge") modelsettings = loadmodelsettings(; fromdefaultset = "P4Dpouch") simulationsettings = loadsimulationsettings(; fromdefaultset = "P4Dpouch")

modelsetup = LithiumIonBattery(; modelsettings)

sim = Simulation(modelsetup, cellparameters, cyclingprotocol; simulationsettings); output = solve(sim)

plot3Dresults(output) ```

3D plot

Acknowledgements

BattMo has received funding from the European Union’s Horizon 2020 innovation program under grant agreement numbers:

  • 875527 HYDRA
  • 957189 BIG-MAP
  • 101104013 BATMAX
  • 101103997 DigiBatt

Owner

  • Name: BatteryModel.com
  • Login: BattMoTeam
  • Kind: organization
  • Email: simon.clark@sintef.no
  • Location: Norway

Models for batteries and electrochemical devices.

GitHub Events

Total
  • Create event: 65
  • Commit comment event: 11
  • Release event: 5
  • Issues event: 13
  • Watch event: 16
  • Delete event: 26
  • Issue comment event: 15
  • Push event: 633
  • Pull request review event: 7
  • Pull request event: 77
Last Year
  • Create event: 65
  • Commit comment event: 11
  • Release event: 5
  • Issues event: 13
  • Watch event: 16
  • Delete event: 26
  • Issue comment event: 15
  • Push event: 633
  • Pull request review event: 7
  • Pull request event: 77

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 287
  • Total Committers: 8
  • Avg Commits per committer: 35.875
  • Development Distribution Score (DDS): 0.54
Past Year
  • Commits: 184
  • Committers: 7
  • Avg Commits per committer: 26.286
  • Development Distribution Score (DDS): 0.283
Top Committers
Name Email Commits
Xavier Raynaud x****d@g****m 132
Olav Møyner o****r@g****m 76
hnil H****n@s****o 40
Olav Møyner o****r@s****o 25
LorenaH84 l****3@g****m 9
Erasdna s****s@g****m 2
hnil h****n@s****o 2
bradyplanden b****n@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 13
  • Total pull requests: 91
  • Average time to close issues: 5 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 6
  • Total pull request authors: 8
  • Average comments per issue: 1.31
  • Average comments per pull request: 0.1
  • Merged pull requests: 69
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 87
  • Average time to close issues: 3 months
  • Average time to close pull requests: 7 days
  • Issue authors: 4
  • Pull request authors: 6
  • Average comments per issue: 0.09
  • Average comments per pull request: 0.07
  • Merged pull requests: 65
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • eibar-flores (8)
  • augustjohansson (1)
  • xavierr (1)
  • SimonStier (1)
  • moyner (1)
  • JuliaTagBot (1)
Pull Request Authors
  • LorenaH84 (51)
  • moyner (27)
  • eibar-flores (4)
  • augustjohansson (3)
  • FrancescaWatson (2)
  • xavierr (2)
  • BradyPlanden (1)
  • Erasdna (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • julia 12 total
    • pypi 260 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 18
  • Total maintainers: 2
pypi.org: battmo

Battery simulation with BattMo in Python.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 260 Last month
Rankings
Dependent packages count: 8.6%
Average: 28.7%
Dependent repos count: 48.7%
Maintainers (2)
Last synced: 10 months ago
juliahub.com: BattMo

Differentiable simulation of batteries in Julia using Jutul.jl

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 12 Total
Rankings
Dependent repos count: 9.8%
Average: 37.5%
Dependent packages count: 38.8%
Forks count: 41.2%
Stargazers count: 60.3%
Last synced: 10 months ago