PyBaMM | Fast and flexible physics-based battery models in Python
kandi X-RAY | PyBaMM Summary
kandi X-RAY | PyBaMM Summary
PyBaMM (Python Battery Mathematical Modelling) solves physics-based electrochemical DAE models by using state-of-the-art automatic differentiation and numerical solvers. The Doyle-Fuller-Newman model can be solved in under 0.1 seconds, while the reduced-order Single Particle Model and Single Particle Model with electrolyte can be solved in just a few milliseconds. Additional physics can easily be included such as thermal effects, fast particle diffusion, 3D effects, and more. All models are implemented in a flexible manner, and a wide range of models and parameter sets (NCA, NMC, LiCoO2, ...) are available. There is also functionality to simulate any set of experimental instructions, such as CCCV or GITT, or specify drive cycles.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Solve the model
- Return the maximum of child elements
- Builds the model
- Return the value of key
- Generate a JVM model from a model
- Convert symbol id to julia variable name
- Convert a symbol to a Julian formula
- Converts a variable to a string
- Return LaTeX representation of the model
- R Calculate the dimensional parameters
- Returns a dictionary of variables
- Calculate a dictionary of variables
- Integrate model
- Set up the experiment
- Processes the given unprocessed model
- Simple division function
- Calculate the variables for the given variables
- Simplify multiplication
- Discretise a model
- Integrate a model
- Get a julia function from a symbol
- Solve a model
- Integrate a differential equation
- Set dimensionless parameters
- Integrate the model with the given parameters
- Performs a step on the model
PyBaMM Key Features
PyBaMM Examples and Code Snippets
Community Discussions
Trending Discussions on PyBaMM
QUESTION
I'm using the PyBaMM package to model battery cells and I would like to use Dask to run several simulations in parallel. The example below is my attempt to use dask.delayed
. The Dask approach is slower than the non-Dask approach. Is there a better way to use Dask for this example? Should I setup a Dask Client()
to run the simulations in parallel? I'm running this example on my local machine but I would eventually like to run a similar example on a cluster.
Elapsed times from running the example on an 8-core MacBook Pro are given below. Comment out the appropriate section in main()
to run with or without Dask.
ANSWER
Answered 2021-Oct-14 at 18:06Based on the suggestions from @rrpelgrim, I implemented a Client()
object which appears to improve the parallel execution of my example code by using the distributed scheduler. The modified example is shown below. You can compare the elapsed time with and without Dask by commenting out the appropriate section in main()
. Elapsed times using an 8-core CPU are given in the table.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PyBaMM
You can use PyBaMM like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page