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.
18:22:05 - INFO - LOGGING (log: True) 18:22:05 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 18:22:05 - INFO - GRAPH (nodes: 4, edges: 6, alg. depth: 2, loop depth: 0, runtime: 0.043ms) 18:22:05 - INFO - STARTING -> TRANSIENT (Duration: 3600.00s) 18:22:28 - INFO - -------------------- 1% | 23.5s<24:34 | 0.20 it/s 18:22:32 - INFO - -------------------- 2% | 27.3s<16:02 | 0.22 it/s 18:22:38 - INFO - -------------------- 3% | 33.0s<12:57 | 0.21 it/s 18:22:46 - INFO - -------------------- 4% | 40.7s<10:54 | 0.18 it/s 18:22:54 - INFO - #------------------- 6% | 48.8s<08:25 | 0.17 it/s 18:23:00 - INFO - ##------------------ 10% | 55.2s<05:10 | 0.16 it/s 18:23:07 - INFO - ###----------------- 16% | 01:02<03:00 | 0.16 it/s 18:23:14 - INFO - #####--------------- 28% | 01:09<01:24 | 0.15 it/s 18:23:22 - INFO - ########------------ 44% | 01:16<46.4s | 0.15 it/s 18:23:29 - INFO - #############------- 67% | 01:24<17.8s | 0.14 it/s 18:23:33 - INFO - #################### 100% | 01:28<--:-- | 0.18 it/s 18:23:33 - INFO - FINISHED -> TRANSIENT (total steps: 14, successful: 14, runtime: 88165.42 ms)
C-Rate Sweep
Higher C-rates cause larger concentration gradients and overpotentials, leading to steeper voltage drop-off and more pronounced temperature rise.
18:23:34 - INFO - LOGGING (log: True) 18:23:34 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 18:23:34 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.048ms) 18:23:34 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 18:23:37 - INFO - -------------------- 1% | 2.2s<02:38 | 1.1 it/s 18:23:38 - INFO - -------------------- 2% | 3.8s<02:39 | 0.96 it/s 18:23:40 - INFO - -------------------- 3% | 5.3s<02:09 | 0.87 it/s 18:23:42 - INFO - #------------------- 5% | 7.1s<01:42 | 0.78 it/s 18:23:44 - INFO - #------------------- 9% | 9.8s<01:28 | 0.66 it/s 18:23:45 - INFO - ##------------------ 14% | 11.0s<40.7s | 0.71 it/s 18:23:46 - INFO - ####---------------- 24% | 11.2s<4.4s | 2.1 it/s 18:23:46 - INFO - #########----------- 45% | 11.5s<1.6s | 2.5 it/s 18:23:46 - INFO - ###############----- 79% | 11.7s<0.3s | 3.2 it/s 18:23:47 - INFO - #################### 100% | 12.3s<--:-- | 2.8 it/s 18:23:47 - INFO - FINISHED -> TRANSIENT (total steps: 11, successful: 11, runtime: 12312.42 ms) 18:23:48 - INFO - LOGGING (log: True) 18:23:48 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 18:23:48 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.044ms) 18:23:48 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 18:23:54 - INFO - -------------------- 1% | 6.2s<04:44 | 0.63 it/s 18:23:57 - INFO - -------------------- 2% | 9.3s<03:29 | 0.64 it/s 18:24:01 - INFO - #------------------- 6% | 12.7s<01:55 | 0.68 it/s 18:24:03 - INFO - #------------------- 9% | 14.7s<01:28 | 0.63 it/s 18:24:04 - INFO - ##------------------ 13% | 16.1s<51.6s | 0.65 it/s 18:24:08 - INFO - ####---------------- 20% | 20.0s<47.1s | 0.53 it/s 18:24:10 - INFO - ######-------------- 32% | 21.8s<20.8s | 0.54 it/s 18:24:12 - INFO - ###########--------- 56% | 24.5s<8.7s | 0.49 it/s 18:24:16 - INFO - #################--- 88% | 28.0s<1.9s | 0.43 it/s 18:24:19 - INFO - #################### 100% | 30.8s<--:-- | 0.41 it/s 18:24:19 - INFO - FINISHED -> TRANSIENT (total steps: 13, successful: 13, runtime: 30760.38 ms) 18:24:20 - INFO - LOGGING (log: True) 18:24:20 - INFO - BLOCKS (total: 4, dynamic: 1, static: 3, eventful: 0) 18:24:20 - INFO - GRAPH (nodes: 4, edges: 5, alg. depth: 2, loop depth: 0, runtime: 0.042ms) 18:24:20 - INFO - STARTING -> TRANSIENT (Duration: 1800.00s) 18:24:28 - INFO - -------------------- 1% | 8.4s<04:03 | 1.4 it/s 18:24:29 - INFO - -------------------- 2% | 9.5s<03:41 | 1.2 it/s 18:24:32 - INFO - -------------------- 3% | 12.9s<03:15 | 0.91 it/s 18:24:34 - INFO - #------------------- 5% | 13.9s<02:15 | 0.91 it/s 18:24:35 - INFO - #------------------- 6% | 15.5s<02:00 | 0.83 it/s 18:24:42 - INFO - #------------------- 8% | 22.3s<02:27 | 0.63 it/s 18:24:48 - INFO - ##------------------ 10% | 28.6s<02:47 | 0.49 it/s 18:24:54 - INFO - ##------------------ 13% | 34.6s<02:50 | 0.39 it/s 18:24:56 - INFO - ###----------------- 17% | 36.4s<01:21 | 0.44 it/s 18:24:58 - INFO - ####---------------- 24% | 38.5s<45.0s | 0.45 it/s 18:25:02 - INFO - ############-------- 61% | 42.6s<4.6s | 0.71 it/s 18:25:06 - INFO - ##################-- 90% | 46.0s<1.1s | 0.59 it/s 18:25:06 - INFO - STOP (StopSimulation: 'undervoltage: V=1.8736 V <= 2.5 V') 18:25:06 - INFO - INTERRUPTED -> TRANSIENT (total steps: 20, successful: 17, runtime: 46113.61 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.