Skip to content

About

A Battery pack simulator using Julia

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

86 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BatteryToolkit

a ModelingToolkit based battery pack inspired by PyBaMM

How to run

Running a simulation can be as easy as

using ModelingToolkit
using BatteryPeck

@mtkbuild sys = SingleCellPack(config=(96,2), Qcell=78);

e = Experiment([
    PowerStep(11000, 500),
    RestStep(8*3600),
]*7)

@time sol = simulate(sys,e, saveat=1)

Experiment

The experiment can be defined using steps like

Experiment([
    PowerStep(11000, 500),
    RestStep(8*3600),
    DriveStep("speed comparison/power.csv", 3600/2),
    RestStep(8*3600),
    DriveStep("speed comparison/power.csv", 3600/2),
    ChargeStep(0.8, 11000),
    RestStep(6*3600)
]*100)

Plotting solutions

Solutions can be accessed like you're used to!

using Plots

plot(sol, idxs=[sys.cell.soc])

About

A Battery pack simulator using Julia

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages