Constant-Current Discharge with the SPMe
Constant-current (CC) discharge simulation using CellElectrothermal, which wraps
PyBaMM's SPMe with a lumped thermal sub-model. PathSim integrates the coupled ODE system.
Model
The SPMe extends the Single Particle Model (SPM) with electrolyte concentration dynamics, significantly improving accuracy at moderate-to-high C-rates. Solid-phase diffusion in each electrode follows:
MATHDISPLAY0ENDMATH
The terminal voltage is determined by open-circuit potentials and Butler–Volmer overpotentials. Cell temperature is tracked via PyBaMM's lumped thermal sub-model:
MATHDISPLAY1ENDMATH
Brosa Planella et al., arXiv:2203.16091 (2022).
/opt/hostedtoolcache/Python/3.11.16/x64/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html from .autonotebook import tqdm as notebook_tqdm
Single 1 C Discharge
Chen2020 is a 21700-format NMC/graphite cell with 5 Ah nominal capacity, so 1 C = 5 A.
ESDIRK43 is used because the discretised SPMe ODE is stiff.
12:03:34 - INFO - LOGGING (log: True) 12:03:34 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 12:03:34 - INFO - GRAPH (nodes: 4, edges: 6, alg. depth: 2, loop depth: 0, runtime: 0.047ms) 12:03:34 - INFO - STARTING -> TRANSIENT (Duration: 3600.00s) 12:03:34 - INFO - -------------------- 1% | 0.3s<23.1s | 11.8 it/s 12:03:35 - INFO - #####--------------- 28% | 0.9s<1.0s | 12.5 it/s 12:03:35 - INFO - ########------------ 44% | 1.0s<0.5s | 12.3 it/s 12:03:35 - INFO - #############------- 67% | 1.1s<0.2s | 12.4 it/s 12:03:35 - INFO - #################### 100% | 1.2s<--:-- | 12.3 it/s 12:03:35 - INFO - FINISHED -> TRANSIENT (total steps: 14, successful: 14, runtime: 1155.56 ms)
C-Rate Sweep
Higher C-rates cause larger concentration gradients and overpotentials, leading to steeper voltage drop-off and more pronounced temperature rise.
12:03:36 - INFO - LOGGING (log: True) 12:03:36 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 12:03:36 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.034ms) 12:03:36 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 12:03:36 - INFO - -------------------- 1% | 0.1s<8.5s | 20.5 it/s 12:03:36 - INFO - ####---------------- 24% | 0.4s<0.6s | 22.4 it/s 12:03:36 - INFO - #########----------- 45% | 0.4s<0.2s | 22.5 it/s 12:03:36 - INFO - ###############----- 79% | 0.5s<0.1s | 19.8 it/s 12:03:36 - INFO - #################### 100% | 0.6s<--:-- | 18.0 it/s 12:03:36 - INFO - FINISHED -> TRANSIENT (total steps: 11, successful: 11, runtime: 559.82 ms) 12:03:37 - INFO - LOGGING (log: True) 12:03:37 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 12:03:37 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.043ms) 12:03:37 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 12:03:37 - INFO - -------------------- 1% | 0.2s<15.0s | 12.2 it/s 12:03:37 - INFO - ####---------------- 20% | 0.7s<1.4s | 14.5 it/s 12:03:38 - INFO - ###########--------- 56% | 0.8s<0.3s | 14.1 it/s 12:03:38 - INFO - #################--- 88% | 0.9s<0.0s | 13.9 it/s 12:03:38 - INFO - #################### 100% | 1.0s<--:-- | 14.0 it/s 12:03:38 - INFO - FINISHED -> TRANSIENT (total steps: 13, successful: 13, runtime: 955.22 ms) 12:03:38 - INFO - LOGGING (log: True) 12:03:38 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 12:03:38 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.041ms) 12:03:38 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 12:03:39 - INFO - -------------------- 1% | 0.5s<20.6s | 14.2 it/s 12:03:39 - INFO - ####---------------- 24% | 1.0s<0.9s | 22.3 it/s 12:03:39 - INFO - ############-------- 61% | 1.1s<0.1s | 22.2 it/s 12:03:39 - INFO - ##################-- 90% | 1.2s<0.0s | 21.8 it/s 12:03:39 - INFO - STOP (StopSimulation: 'undervoltage: V=1.8737 V <= 2.5 V') 12:03:39 - INFO - INTERRUPTED -> TRANSIENT (total steps: 20, successful: 17, runtime: 1187.76 ms)
Summary
CellElectrothermalwraps the PyBaMM SPMe + lumped thermal ODE and integrates it as a standardDynamicalSystemin PathSim.- Higher C-rates produce steeper V–SOC curves and greater temperature rise.
- For an external thermal model (e.g. a custom cooling loop), see notebook 02.