Tip
An interactive online version of this notebook is available, which can be accessed via
Alternatively, you may download this notebook and run it offline.
Single Particle Model with Electrolyte (SPMe)#
Model Equations#
The SPMe comprises an equation for the lithium concentration in a representative particle in the negative electrode \(c_{\text{s,n}}\), an equation for the lithium concentration in a representative particle in the positive electrode \(c_{\text{s,p}}\), and an equation which governs the behaviour of the first-order correction to the lithium concentration in the electrolyte \(c_{\text{e,k}}\). Here we use a roman subscript \(\text{k} \in \text{n, s, p}\) is used to denote the regions negative electrode, separator, and positive electrode, respectively.
At the centre of each particle the standard no-flux condition is imposed, and the flux on the surface of the particle is simply the current \(I\) divided by the thickness of the electrode \(L_{\text{k}}\), as in the SPM. Since lithium is transferred between the electrolyte and particles, the flux through the particle surface also enters the electrolyte diffusion equation as a source/sink term. There is no transfer of lithium between the electrolyte and current collectors, which leads to no flux boundary conditions on the lithium concentration in the electrolyte \(c_{\text{e,k}}\) at either end of the cell.
We must also impose initial conditions which correspond to setting an initial concentration in each particle \(c_{\text{s,k}}(t=0) = c_{\text{s,k,0}}\), and to having no deviation from the initial (uniform) lithium concentration in the electrolyte \(c_{\text{e,k}}(t=0) = c_{\text{e,0}}\).
The model equations for the SPMe read:
Particles:#
where \(D_{\text{s,k}}\) is the diffusion coefficient in the solid, \(N_{\text{s,k}}\) denotes the flux of lithium ions in the solid particle within the region \(\text{k}\), and \(r_{\text{k}} \in[0,R_{\text{k}}]\) is the radial coordinate of the particle in electrode \(\text{k}\). All other relevant parameters are given in the table at the end of this notebook.
Electrolyte:#
where \(D_{\text{e}}\) is the diffusion coefficient in the solid, \(N_{\text{e,k}}\) denotes the flux of lithium ions in the electrolyte within the region \(\text{k}\), and \(x\in[0,L]\) is the macroscopic through-cell distance. This equation is also solved subject to continuity of concentration and flux at the electrode/separator interfaces.
Voltage Expression#
The voltage is obtained from the expression:
where
where
More details can be found in [3].
Example solving SPMe using PyBaMM#
Below we show how to solve the SPMe model using the Simulation
class with all the default settings. For a more detailed example, see the notebook on the SPM.
First we need to import pybamm
[1]:
%pip install "pybamm[plot,cite]" -q # install PyBaMM if it is not installed
import pybamm
Note: you may need to restart the kernel to use updated packages.
We then load the SPMe model and create a simulation
[2]:
# load model
model = pybamm.lithium_ion.SPMe()
# create simulation
simulation = pybamm.Simulation(model)
The simulation is now ready to be solved
[3]:
# solve simulation
simulation.solve([0, 3600]) # time interval in seconds
[3]:
<pybamm.solvers.solution.Solution at 0x7f2774bea390>
To get a quick overview of the model outputs we can use the built-in plot
method of the simulation
[4]:
simulation.plot()
References#
The relevant papers for this notebook are:
[5]:
pybamm.print_citations()
[1] Joel A. E. Andersson, Joris Gillis, Greg Horn, James B. Rawlings, and Moritz Diehl. CasADi – A software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 2019. doi:10.1007/s12532-018-0139-4.
[2] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, and others. Array programming with NumPy. Nature, 585(7825):357–362, 2020. doi:10.1038/s41586-020-2649-2.
[3] Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. An asymptotic derivation of a single particle model with electrolyte. Journal of The Electrochemical Society, 166(15):A3693–A3706, 2019. doi:10.1149/2.0341915jes.
[4] Valentin Sulzer, Scott G. Marquis, Robert Timms, Martin Robinson, and S. Jon Chapman. Python Battery Mathematical Modelling (PyBaMM). ECSarXiv. February, 2020. doi:10.1149/osf.io/67ckj.