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.15/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.
02:24:53 - INFO - LOGGING (log: True) 02:24:53 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 02:24:53 - INFO - GRAPH (nodes: 4, edges: 6, alg. depth: 2, loop depth: 0, runtime: 0.065ms) 02:24:53 - INFO - STARTING -> TRANSIENT (Duration: 3600.00s) 02:24:53 - INFO - -------------------- 1% | 0.4s<24.5s | 11.1 it/s 02:24:54 - INFO - #####--------------- 28% | 1.0s<1.1s | 11.4 it/s 02:24:54 - INFO - ########------------ 44% | 1.1s<0.6s | 11.4 it/s 02:24:54 - INFO - #############------- 67% | 1.1s<0.2s | 11.3 it/s 02:24:54 - INFO - #################### 100% | 1.2s<--:-- | 10.9 it/s 02:24:54 - INFO - FINISHED -> TRANSIENT (total steps: 14, successful: 14, runtime: 1249.81 ms)
C-Rate Sweep
Higher C-rates cause larger concentration gradients and overpotentials, leading to steeper voltage drop-off and more pronounced temperature rise.
02:24:55 - INFO - LOGGING (log: True) 02:24:55 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 02:24:55 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.056ms) 02:24:55 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 02:24:55 - INFO - -------------------- 1% | 0.2s<15.1s | 11.6 it/s 02:24:56 - INFO - ####---------------- 24% | 0.7s<1.2s | 11.8 it/s 02:24:56 - INFO - #########----------- 45% | 0.8s<0.4s | 12.1 it/s 02:24:56 - INFO - ###############----- 79% | 0.8s<0.1s | 12.1 it/s 02:24:56 - INFO - #################### 100% | 0.9s<--:-- | 11.9 it/s 02:24:56 - INFO - FINISHED -> TRANSIENT (total steps: 11, successful: 11, runtime: 935.18 ms) 02:24:57 - INFO - LOGGING (log: True) 02:24:57 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 02:24:57 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.055ms) 02:24:57 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 02:24:57 - INFO - -------------------- 1% | 0.2s<17.4s | 10.6 it/s 02:24:58 - INFO - ####---------------- 20% | 0.7s<1.2s | 15.9 it/s 02:24:58 - INFO - ###########--------- 56% | 0.8s<0.2s | 16.5 it/s 02:24:58 - INFO - #################--- 88% | 0.8s<0.0s | 16.6 it/s 02:24:58 - INFO - #################### 100% | 0.9s<--:-- | 17.0 it/s 02:24:58 - INFO - FINISHED -> TRANSIENT (total steps: 13, successful: 13, runtime: 903.75 ms) 02:24:59 - INFO - LOGGING (log: True) 02:24:59 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 02:24:59 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.049ms) 02:24:59 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 02:24:59 - INFO - -------------------- 1% | 0.6s<27.9s | 11.0 it/s 02:25:00 - INFO - ####---------------- 24% | 1.4s<1.1s | 17.2 it/s 02:25:00 - INFO - ############-------- 61% | 1.5s<0.2s | 17.8 it/s 02:25:00 - INFO - ##################-- 90% | 1.6s<0.0s | 17.8 it/s 02:25:00 - INFO - STOP (StopSimulation: 'undervoltage: V=1.8735 V <= 2.5 V') 02:25:00 - INFO - INTERRUPTED -> TRANSIENT (total steps: 20, successful: 17, runtime: 1607.23 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.