betaFeedback

WorksPhysics and Astronomy

A fast solver for the pseudo-two-dimensional model of lithium-ion batteries

Abstract

The pseudo-two-dimensional (P2D) model is a complex mathematical model that can capture the electrochemical processes in Li-ion batteries. However, the model also brings a heavy computational burden. Many simplifications to the model have been introduced in the literature to reduce the complexity. We present a method for fast computation of the P2D model which can be used when simplifications are not accurate enough. By rearranging the calculations, we reduce the complexity of the linear algebra problem. We also employ automatic differentiation, using an open source package JAX for robustness, while also allowing easy implementation of changes to coefficient expressions. The method alleviates the computational bottleneck in P2D models without compromising accuracy.

Introduction

Lithium-ion (Li-ion) batteries are essential in modern energy storage and widely used in devices from portable electronics to large electric vehicles. Li-ion batteries have high energy efficiency and high power density compared to their predecessors such as lead-acid and zinc-carbon batteries [1]. They

Email addresses: [email protected] (Rachel Han), [email protected] (Colin Macdonald), [email protected] (Brian Wetton) garnered great research interest since their commercial inception in the 1980s [2].

However, the battery needs to be monitored for control and optimization purposes, especially for complex systems. This is due to the nonlinear internal behaviour in the battery that is difficult to capture with external observations. The battery management system (BMS) plays a key part in this purpose. Its functions include predicting the state of charge (SOC) (the level of charge given the battery capacity), the state of health (SOH) (a qualitative measure of how much the battery has degraded from its original specifications) and the remaining useful life (RUL) [3]. These characteristics cannot be directly measured and can only be inferred by models.

The battery management system battery models can largely be classified into two categories: equivalent circuit models and electrochemical models. In more recent literature, data-driven methods such as deep learning have been developed that try to predict internal battery behaviour, as done in [4], [5] and [6]. We focus on a particular electrochemical model called the pseudo-two-dimensional (P2D) model, also known as the Doyle-Fuller-Newman model [7]. It is a full physics based model described by partial differential algebraic equations. This complex model allows for a more accurate description of the battery but also brings a heavy computational burden on a practical BMS. In the literature, there are many electrochemical models with reduced complexity such as the single particle model [8], [9] and approximations of solid-phase diffusion [10], [11]. The simplified models are used in applications such as control, on-line monitoring, optimization, parameter estimation and age prediction [12]. In this work, we present a method for fast computation of the P2D model which can be used when the simplifications are not sufficiently accurate.

The nonlinear partial differential algebraic equations (PDAE) that describe the P2D model are often implemented by Finite Difference Methods (FDM), Finite Volume Methods (FVM) and Finite Elements Methods (FEM) [13]. Commercial software such as COMSOL Inc. Multiphysics software [14] has FDM and FEM implementations for the P2D model. LIONSIMBA [15] uses FVM to implement the P2D model in MATLAB with reductions made in the solid-phase diffusion. It is typical in literature ([16], [15]) to use black box differential algebraic solvers, such as the DASSL solver [17] and SUNDIALS [18] for time stepping.

In this paper, we develop a fast solver for the thermal P2D model taken from [15] using FDM, backward Euler and Newton’s method in Python. Additionally, we also employ automatic differentiation, using an open-source package JAX [19]. This framework allows terms in the model to be changed easily, such as the diffusive and conductivity expressions. The method alleviates the computational bottleneck inherent in P2D models, without compromising accuracy.

Thermal P2D model equations

The pseudo-two-dimensional (P2D) model is an electrochemical model that captures the kinetics, transport processes and thermodynamics of a lithium-ion battery [7]. The name pseudo-2D comes from the interesting simplification of the battery geometry. In the xx dimension, the processes in electrolyte phase across the battery are described. The second dimension, rr, comes from the following assumption: in the porous electrodes, the host intercalation materials such as lithium cobalt oxide and graphite are represented by spherical particles at each channel location in xx, where rr is in the direction normal to the surface of each particle. Moreover, xx is of macroscopic scale whereas rr is microscopic. P2D is not a strict two-dimensional model but rather a pseudo-2D model because the two dimensions with different scales are coupled. Figure 2 illustrates the simplified geometry of the P2D model.

P2D model abstraction of a lithium-ion battery

Figure 2. The P2D model abstraction of Figure 1

The P2D model is described by the following quantities: lithium-ion concentrations, potentials, ionic flux across the interface of the spherical particle, current density and temperature. These quantities describe the transport of lithium ion species, conservation of charge, kinetics of charge transfer and thermal behaviour of the battery. The lithium-ion concentrations are denoted by u(x,t)u(x,t) in the electrolyte (liquid phase) and intercalated lithium concentration c(x,r,t)c(x,r,t) in the solid particle (solid phase). The electric potentials in the liquid and solid phase are Φ(x,t)\Phi(x,t) and Ψ(x,t)\Psi(x,t) respectively. The interfacial ionic flux is denoted by j(x,t)j(x,t), II is the current density and T(x,t)T(x,t) is the temperature. We take the model form and coefficients from [15]. The governing equations form a PDAE system, where the system is described by partial differential equations and algebraic constraints. We present the form of the equations in detail below, so that the reader can see how we exploit the structure of the nonlinear PDAE to obtain the fast solver.

Throughout the paper, we will use the notation i∈{a,p,s,n,z}i \in\{a,p,s,n,z\} in subscript

to denote the battery section: the positive current collector, cathode, separator, anode and the negative current collector respectively. The ends of the battery are at x=0x = 0 and x=Lx = L, where LL is the length of the battery. Figure 1 summarizes the domain. The subscript “eff” is used to denote the effective coefficients based on Bruggeman theory [20], which accounts the for varying conductivity or diffusivity due to different materials in composite materials. The model parameters, coefficients and symbols are taken from [15] and also listed in Appendix § 8 and Appendix § 15.

Representation of chemical properties of lithium-ion battery with lithium cobalt oxide and graphite

Figure 1. A representation of chemical properties of lithium-ion battery with lithium cobalt oxide and graphite. The purple spheres represent Lithium (Li) that are intercalated in cathode and anode active materials.

Electrodes and Separator

The intercalation of Li+\mathrm{Li}^{+} in the solid particles drive the charge and discharge in Li-ion batteries. The intercalation is driven by diffusion of the lithium concentration,

∂c∂t=1r2∂∂r(r2Ds∂c(r,t)∂r),(1)\frac{\partial c}{\partial t} = \frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}D^{\mathrm{s}}\frac{\partial c(r,t)}{\partial r}\right), \tag*{(1)}
∂c(r,t)∂r∣r=0=0,∂c(r,t)∂r∣r=Rp=−j(x,t)Deff,is(T(x,t)).(2)\left.\frac{\partial c(r,t)}{\partial r}\right|_{r=0}=0,\qquad\left.\frac{\partial c(r,t)}{\partial r}\right|_{r=R_{\mathrm{p}}}=-\frac{j(x,t)}{D^{\mathrm{s}}_{\mathrm{eff},i}(T(x,t))}. \tag*{(2)}

Here, DsD^{\mathrm{s}} is a constant solid-phase diffusion coefficient and Deff,isD^{\mathrm{s}}_{\mathrm{eff},i} for i∈{p,n}i \in\{p,n\} is the effective solid-phase diffusion coefficient which depends on temperature in xx. The kinetics of charge transfer at the electrodes are described by the Butler-Volmer equation,

j(x,t)=2keffu(x,t)(cs,imax⁡−c∗(x,t))c∗(x,t)sinh⁡[0.5FRTηi(x,t)](3)j(x,t)=2k_{\mathrm{eff}}\sqrt{u(x,t)(c^{\max}_{\mathrm{s},i}-c^{*}(x,t))c^{*}(x,t)}\sinh\left[\frac{0.5F}{RT}\eta_i(x,t)\right] \tag*{(3)}

for i∈{p,n}i \in\{p,n\}, where ηi(x,t)\eta_i(x,t) denotes the overpotential. The equation (2.2) is an algebraic constraint in the PDAE, along with the equation for ηi(x,t)\eta_i(x,t) in (2.10). In the porous electrodes i∈{p,n}i \in\{p,n\}, the accumulation of Li+\mathrm{Li}^{+} in the electrolyte phase is described in terms of diffusion of the ions and jj:

ϵi∂u(x,t)∂t=∂∂x[Deff,i∂u(x,t)∂x]+ai(1−t+)j(x,t),(4)\epsilon_i\frac{\partial u(x,t)}{\partial t}=\frac{\partial}{\partial x}\left[D_{\mathrm{eff},i}\frac{\partial u(x,t)}{\partial x}\right]+a_i(1-t_{+})j(x,t), \tag*{(4)}

with equal flux conditions enforced at the boundaries,

∂u(x,t)∂x∣x=x^0,x^n=0,(5)\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_0,\hat{x}_n}=0, \tag*{(5)}
−Deff,p∂u(x,t)∂x∣x=x^p−=−Deff,s∂u(x,t)∂x∣x=x^p+,(6)-\mathbf{D}_{\mathrm{eff},p}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_p^-} = -\mathbf{D}_{\mathrm{eff},s}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_p^+}, \tag*{(6)}
−Deff,s∂u(x,t)∂x∣x=x^s−=−Deff,n∂u(x,t)∂x∣x=x^s+.(7)-\mathbf{D}_{\mathrm{eff},s}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_s^-} = -\mathbf{D}_{\mathrm{eff},n}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_s^+}. \tag*{(7)}

The coefficient Deff,i\mathbf{D}_{\mathrm{eff},i} is the effective diffusive coefficient of Li+\mathrm{Li}^{+} in the electrolyte. The interface positions x^i\hat{x}_i are shown in Figure 1.

In the separator where there are no solid particles, we have j=0j=0 which yields

ϵi∂u(x,t)∂t=∂∂x[Deff,s∂u(x,t)∂x],(8)\epsilon_i\frac{\partial u(x,t)}{\partial t} = \frac{\partial}{\partial x}\left[D_{\mathrm{eff},s}\frac{\partial u(x,t)}{\partial x}\right], \tag*{(8)}

with boundary conditions

−Deff,p∂u(x,t)∂x∣x=x^p−=−Deff,s∂u(x,t)∂x∣x=x^p+,(9)-\mathbf{D}_{\mathrm{eff},p}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_p^-} = -\mathbf{D}_{\mathrm{eff},s}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_p^+}, \tag*{(9)}
−Deff,s∂u(x,t)∂x∣x=x^s−=−Deff,n∂u(x,t)∂x∣x=x^s+.(10)-\mathbf{D}_{\mathrm{eff},s}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_s^-} = -\mathbf{D}_{\mathrm{eff},n}\left.\frac{\partial u(x,t)}{\partial x}\right|_{x=\hat{x}_s^+}. \tag*{(10)}

In the electrodes i∈{p,n}i \in\{p,n\}, the transport of Li+\mathrm{Li}^{+} is described by Φ\Phi, TT, uu and jj:

aiFj(x,t)=−∂∂x[κeff,i∂Φ(x,t)∂x]+∂∂x[κeff,iRT(x,t)∂ln⁡u(x,t)∂x],(11)a_iFj(x,t) = -\frac{\partial}{\partial x}\left[\kappa_{\mathrm{eff},i}\frac{\partial\Phi(x,t)}{\partial x}\right] + \frac{\partial}{\partial x}\left[\kappa_{\mathrm{eff},i}\mathcal{R}T(x,t)\frac{\partial\ln u(x,t)}{\partial x}\right], \tag*{(11)}

with boundary conditions

∂Φ(x,t)∂x∣x=x^0=0,(12)\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_0}=0, \tag*{(12)}
−κeff,p∂Φ(x,t)∂x∣x=x^p−=−κeff,s∂Φ(x,t)∂x∣x=x^p+,(13)-\kappa_{\mathrm{eff},p}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_p^-} = -\kappa_{\mathrm{eff},s}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_p^+}, \tag*{(13)}
−κeff,s∂Φ(x,t)∂x∣x=x^s−=−κeff,n∂Φ(x,t)∂x∣x=x^s+,(14)-\kappa_{\mathrm{eff},s}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_s^-} = -\kappa_{\mathrm{eff},n}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_s^+}, \tag*{(14)}
Φ(x,t)∣x=x^n=0,(15)\left.\Phi(x,t)\right|_{x=\hat{x}_n}=0, \tag*{(15)}

where κeff,i\kappa_{\mathrm{eff},i} is the effective electrolyte phase conductivity.

Again, in the separator, the ionic flux jj is 0. Therefore, the ionic transport in the separator is described by:

0=−∂∂x[κeff,s∂Φ(x,t)∂x]+∂∂x[κeff,sT(x,t)Υ∂ln⁡u(x,t)∂x](16)0=-\frac{\partial}{\partial x}\left[\kappa_{\mathrm{eff},s}\frac{\partial\Phi(x,t)}{\partial x}\right]+\frac{\partial}{\partial x}\left[\kappa_{\mathrm{eff},sT}(x,t)\Upsilon\frac{\partial\ln u(x,t)}{\partial x}\right] \tag*{(16)}

with boundary conditions

−κeff,p∂Φ(x,t)∂x∣x=x^p−=−κeff,s∂Φ(x,t)∂x∣x=x^p+,(17)-\kappa_{\mathrm{eff},p}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_{p}^{-}}=-\kappa_{\mathrm{eff},s}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_{p}^{+}}, \tag*{(17)}
−κeff,s∂Φ(x,t)∂x∣x=x^s−=−κeff,n∂Φ(x,t)∂x∣x=x^s+.(18)-\kappa_{\mathrm{eff},s}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_{s}^{-}}=-\kappa_{\mathrm{eff},n}\left.\frac{\partial\Phi(x,t)}{\partial x}\right|_{x=\hat{x}_{s}^{+}}. \tag*{(18)}

The movement of electrons in the electrodes is governed by Ohm’s law [21], which involves the solid phase potential Ψ\Psi,

∂∂x[σeff,i∂Ψ(x,t)∂x]=aiFj(x,t),(19)\frac{\partial}{\partial x}\left[\sigma_{\mathrm{eff},i}\frac{\partial\Psi(x,t)}{\partial x}\right]=a_iFj(x,t), \tag*{(19)}
σeff,i∂Ψ(x,t)∂x∣x=x^0,x^n=−Iapp(t),σeff,i∂Ψ(x,t)∂x∣x=x^p,x^s=0.(20)\sigma_{\mathrm{eff},i}\left.\frac{\partial\Psi(x,t)}{\partial x}\right|_{x=\hat{x}_0,\hat{x}_n}=-I_{\mathrm{app}}(t),\qquad\sigma_{\mathrm{eff},i}\left.\frac{\partial\Psi(x,t)}{\partial x}\right|_{x=\hat{x}_p,\hat{x}_s}=0. \tag*{(20)}

For each electrode i∈{p,n}i\in\{p,n\}, σeff,i\sigma_{\mathrm{eff},i} is the effective solid-phase conductivity and IappI_{\mathrm{app}} is the applied current.

The heat created in the battery is described by:

ρiCp,i∂T(x,t)∂t=∂∂x[λi∂T(x,t)∂x]+Qohm+Qrxn+Qrev,(21)\rho_i C_{p,i}\frac{\partial T(x,t)}{\partial t}=\frac{\partial}{\partial x}\left[\lambda_i\frac{\partial T(x,t)}{\partial x}\right]+Q_{\mathrm{ohm}}+Q_{\mathrm{rxn}}+Q_{\mathrm{rev}}, \tag*{(21)}

which includes different heat sources. As mentioned in [15], the ohmic generation rate QohmQ_{\mathrm{ohm}} takes account of heat generated from the movement of Li+\mathrm{Li}^{+}, the reaction generation rate QrxnQ_{\mathrm{rxn}} describes the heat resulting from the ionic flux and overpotentials, and finally the reversible generation rate QrevQ_{\mathrm{rev}} accounts for the change of entropy in the electrodes. Details of these expressions can be found in the Appendix A. The thermal flux continuity interface conditions for temperature are enforced,

−λz∂T(x,t)∂x∣x=x^0=−λp∂T(x,t)∂x∣x=x^p+,(22)-\lambda_z\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_0}=-\lambda_p\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_p^{+}}, \tag*{(22)}
−λn∂T(x,t)∂x∣x=x^n−=λz∂T(x,t)∂x∣x=x^n+.(23)-\lambda_n\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_n^{-}}=\lambda_z\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_n^{+}}. \tag*{(23)}

Similarly, the temperature effects in the separator is described but without Qrxn\mathbf{Q}_{\mathrm{rxn}} and Qrev\mathbf{Q}_{\mathrm{rev}}:

ρiCp,i∂T(x,t)∂t=∂∂x[λi∂T(x,t)∂x]+Qohm,(24)\rho_i C_{p,i}\frac{\partial T(x,t)}{\partial t}=\frac{\partial}{\partial x}\left[\lambda_i\frac{\partial T(x,t)}{\partial x}\right]+\mathbf{Q}_{\mathrm{ohm}}, \tag*{(24)}
−λp∂T(x,t)∂x∣x=x^p−=−λs∂T(x,t)∂x∣x=x^p+,(25)-\lambda_p\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_p^-}=-\lambda_s\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_p^+}, \tag*{(25)}
−λs∂T(x,t)∂x∣x=x^s−=−λn∂T(x,t)∂x∣x=x^s+.(26)-\lambda_s\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_s^-}=-\lambda_n\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=\hat{x}_s^+}. \tag*{(26)}

Lastly, we give an equation for the surface overpotential η(x,t)\eta(x,t) of the electrode i∈{p,n}i \in\{p,n\}:

ηi(x,t)=Ψ(x,t)−Φ(x,t)−Ui(T(x,t),c(x,r,t))(27)\eta_i(x,t)=\Psi(x,t)-\Phi(x,t)-U_i(T(x,t),c(x,r,t)) \tag*{(27)}

where UiU_i is the open circuit potential which is fitted experimentally (see Appendix § 8).

Current Collectors

The current collectors consist of conductive metal materials for transfer of electrons. We model the thermal effects in these regions:

ρiCp,i∂T(x,t)∂t=∂∂x(λi∂T(x,t)∂x)+Iapp2(t)σeff,i,(28)\rho_i C_{p,i}\frac{\partial T(x,t)}{\partial t}=\frac{\partial}{\partial x}\left(\lambda_i\frac{\partial T(x,t)}{\partial x}\right)+\frac{I_{\mathrm{app}}^2(t)}{\sigma_{\mathrm{eff},i}}, \tag*{(28)}

with boundary conditions

−λa∂T(x,t)∂x∣x=0=h(Tref−T(x,t)),(29)-\lambda_a\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=0}=h(T_{\mathrm{ref}}-T(x,t)), \tag*{(29)}
−λz∂T(x,t)∂x∣x=L=h(T(x,t)−Tref),(30)-\lambda_z\left.\frac{\partial T(x,t)}{\partial x}\right|_{x=L}=h(T(x,t)-T_{\mathrm{ref}}), \tag*{(30)}

with heat exchange coefficient hh. The boundary conditions represent Newton’s law of cooling at the two ends of the battery, with ambient temperature TrefT_{\mathrm{ref}}.

Implementation

The system of equations in § 2 is discretised in space by cell centred finite differences, and in time using backward Euler method for the time-dependent variables, u(x,t)u(x,t), c(x,r,t)c(x,r,t) and T(x,t)T(x,t). The complete discretizations are given in Table 1 and Table 2. We describe the structure of the discrete nonlinear system below.

Electrodes, i∈{p,n}i \in\{p,n\}
Solid phase concentration
0=cn,mk−1−cn,mk+Ds[1rn2(rn+1/22cn+1,mk−cn,mkΔr−rn−1/22cn,mk−cn−1,mkΔrΔr)]0=c_{n,m}^{k-1}-c_{n,m}^{k}+D^{s}\left[\frac{1}{r_{n}^{2}}\left(\frac{r_{n+1/2}^{2}\frac{c_{n+1,m}^{k}-c_{n,m}^{k}}{\Delta r}-r_{n-1/2}^{2}\frac{c_{n,m}^{k}-c_{n-1,m}^{k}}{\Delta r}}{\Delta r}\right)\right],
c1,mk−c0,mkΔr=0,cN+1,mk−cN,mkΔr+jmkDeffs=0.\frac{c_{1,m}^{k}-c_{0,m}^{k}}{\Delta r}=0,\qquad\frac{c_{N+1,m}^{k}-c_{N,m}^{k}}{\Delta r}+\frac{j_{m}^{k}}{D_{\mathrm{eff}}^{s}}=0.
Electrolyte concentration
0=umk−1−umk−Δtϵi(Deff,mr(um+1k−umk)Δx2−Deff,ml(umk−um−1k)Δx2+ai(1−t+)jmk)0=u_{m}^{k-1}-u_{m}^{k}-\frac{\Delta t}{\epsilon_{i}}\left(\frac{D_{\mathrm{eff},m}^{r}(u_{m+1}^{k}-u_{m}^{k})}{\Delta x^{2}}-\frac{D_{\mathrm{eff},m}^{l}(u_{m}^{k}-u_{m-1}^{k})}{\Delta x^{2}}+a_{i}(1-t_{+})j_{m}^{k}\right),
up1k−up0kΔxp=0,unMn+1k−unMnkΔxn=0,\frac{u_{p1}^{k}-u_{p0}^{k}}{\Delta x_{p}}=0,\qquad\frac{u_{nM_{n}+1}^{k}-u_{nM_{n}}^{k}}{\Delta x_{n}}=0,
upMpk+upMp+1k2=us0k+us1k2,usMsk+usMs+1k2=un0k+un1k2.\frac{u_{pM_{p}}^{k}+u_{pM_{p}+1}^{k}}{2}=\frac{u_{s0}^{k}+u_{s1}^{k}}{2},\qquad\frac{u_{sM_{s}}^{k}+u_{sM_{s}+1}^{k}}{2}=\frac{u_{n0}^{k}+u_{n1}^{k}}{2}.
Electrolyte potential
aiFjmk+(κeffrΦm+1k−ΦmkΔx2−κefflΦmk−Φm−1kΔx2)−γ(κeffrTm+1kln⁡um+1k−ln⁡umkΔx2)a_{i}Fj_{m}^{k}+\left(\kappa_{\mathrm{eff}}^{r}\frac{\Phi_{m+1}^{k}-\Phi_{m}^{k}}{\Delta x^{2}}-\kappa_{\mathrm{eff}}^{l}\frac{\Phi_{m}^{k}-\Phi_{m-1}^{k}}{\Delta x^{2}}\right)-\gamma\left(\kappa_{\mathrm{eff}}^{r}T_{m+1}^{k}\frac{\ln u_{m+1}^{k}-\ln u_{m}^{k}}{\Delta x^{2}}\right)
Φp1−Φp0Δx=0,ΦnN+ΦnN+12=0,\frac{\Phi_{p1}-\Phi_{p0}}{\Delta x}=0,\qquad\frac{\Phi_{nN}+\Phi_{nN+1}}{2}=0,
ΦpMpk+ΦpMp+1k2=Φs0k+Φs1k2,ΦsMsk+ΦsMs+1k2=Φn0k+Φn1k2.\frac{\Phi_{pM_{p}}^{k}+\Phi_{pM_{p}+1}^{k}}{2}=\frac{\Phi_{s0}^{k}+\Phi_{s1}^{k}}{2},\qquad\frac{\Phi_{sM_{s}}^{k}+\Phi_{sM_{s}+1}^{k}}{2}=\frac{\Phi_{n0}^{k}+\Phi_{n1}^{k}}{2}.
Solid phase potential
σeff,iΨm+1k−2Ψmk+Ψm−1kΔxi2=0,\sigma_{\mathrm{eff},i}\frac{\Psi_{m+1}^{k}-2\Psi_{m}^{k}+\Psi_{m-1}^{k}}{\Delta x_{i}^{2}}=0,
σeff,pΨp1k−Ψp0kΔxp=−Iapp,σeff,pΨpMp+1k−ΨpMpkΔxp=0,\sigma_{\mathrm{eff},p}\frac{\Psi_{p1}^{k}-\Psi_{p0}^{k}}{\Delta x_{p}}=-I_{\mathrm{app}},\qquad\sigma_{\mathrm{eff},p}\frac{\Psi_{pM_{p}+1}^{k}-\Psi_{pM_{p}}^{k}}{\Delta x_{p}}=0,
σeff,nΨn1k−Ψn0kΔxn=0,σeff,nΨnMn+1k−ΨnMnkΔxn=0.\sigma_{\mathrm{eff},n}\frac{\Psi_{n1}^{k}-\Psi_{n0}^{k}}{\Delta x_{n}}=0,\qquad\sigma_{\mathrm{eff},n}\frac{\Psi_{nM_{n}+1}^{k}-\Psi_{nM_{n}}^{k}}{\Delta x_{n}}=0.

Table 1. Discretisation of PDAE from Section 2

Electrodes, i∈{p,n}i \in\{p,n\}
Temperature
ρiCp,iTmk−Tmk−1Δt−(λi[Tm+1k−2Tmk+Tm−1kΔx2]+Qohm+Qrxn+Qrev)=0,\rho_i C_{p,i}\frac{T_m^k-T_m^{k-1}}{\Delta t}-\left(\lambda_i\left[\frac{T_{m+1}^k-2T_m^k+T_{m-1}^k}{\Delta x^2}\right]+Q_{ohm}+Q_{rxn}+Q_{rev}\right)=0,
−λaTaMa+1k−TaMakΔxa=−λpTp1k−Tp0kΔxp,−λnTnMn+1k−TnMnkΔxn=−λzTz1k−Tz0kΔxz.-\lambda_a\frac{T_{aM_a+1}^k-T_{aM_a}^k}{\Delta x_a}=-\lambda_p\frac{T_{p1}^k-T_{p0}^k}{\Delta x_p},\qquad-\lambda_n\frac{T_{nM_n+1}^k-T_{nM_n}^k}{\Delta x_n}=-\lambda_z\frac{T_{z1}^k-T_{z0}^k}{\Delta x_z}.
TpMpk+TpMp+1k2=Ts0k+Ts1k2,TsMsk+TsMs+1k2=Tn0k+Tn1k2.\frac{T_{pM_p}^k+T_{pM_p+1}^k}{2}=\frac{T_{s0}^k+T_{s1}^k}{2},\qquad\frac{T_{sM_s}^k+T_{sM_s+1}^k}{2}=\frac{T_{n0}^k+T_{n1}^k}{2}.
Ionic flux
jmk−2keff,iumk(cmax⁡−cmk)cmksinh⁡0.5FRTmkηmk=0j_m^k-2k_{\mathrm{eff},i}\sqrt{u_m^k(c_{\max}-c_m^k)c_m^k}\sinh\frac{0.5F}{RT_m^k}\eta_m^k=0
Overpotential
ηmk−Ψmk+Φmk−Ui=0\eta_m^k-\Psi_m^k+\Phi_m^k-U_i=0
Current collectors, i∈{a,z}i \in\{a,z\}
Temperature
ρiCp,iTm+1k−TmkΔt−(λi[Tm+1k−2Tmk+Tm−1kΔx2]+Iapp2σeff,i)=0,\rho_i C_{p,i}\frac{T_{m+1}^k-T_m^k}{\Delta t}-\left(\lambda_i\left[\frac{T_{m+1}^k-2T_m^k+T_{m-1}^k}{\Delta x^2}\right]+\frac{I_{\mathrm{app}}^2}{\sigma_{\mathrm{eff},i}}\right)=0,
−λaTa1k−Ta0kΔxa=h(Tref−Ta1/2k),−λzTzMz+1k−TzMzkΔxz=h(TzMz+1/2k−Tref).-\lambda_a\frac{T_{a1}^k-T_{a0}^k}{\Delta x_a}=h(T_{\mathrm{ref}}-T_{a1/2}^k),\qquad-\lambda_z\frac{T_{zM_z+1}^k-T_{zM_z}^k}{\Delta x_z}=h(T_{zM_z+1/2}^k-T_{\mathrm{ref}}).
Separator, i=si=s
Electrolyte concentration
0=umk−1−umk−Δtϵi(Deff,mr(um+1k−umk)Δx2−Deff,ml(umk−um−1k)Δx2),0=u_m^{k-1}-u_m^k-\frac{\Delta t}{\epsilon_i}\left(\frac{D_{\mathrm{eff},m}^r(u_{m+1}^k-u_m^k)}{\Delta x^2}-\frac{D_{\mathrm{eff},m}^l(u_m^k-u_{m-1}^k)}{\Delta x^2}\right),
−Deff,pMpruMp+1−uMpΔxp=−Deff,s0rus1−us0Δxs,−Deff,sMsruMs+1−uMsΔx=−Deff,n0run1−un0Δxn-D_{\mathrm{eff},pM_p}^r\frac{u_{M_p+1}-u_{M_p}}{\Delta x_p}=-D_{\mathrm{eff},s0}^r\frac{u_{s1}-u_{s0}}{\Delta x_s},\qquad-D_{\mathrm{eff},sM_s}^r\frac{u_{M_s+1}-u_{M_s}}{\Delta x}=-D_{\mathrm{eff},n0}^r\frac{u_{n1}-u_{n0}}{\Delta x_n}
Electrolyte potential
−(κeffrΦm+1k−ΦmkΔx2−κefflΦmk−Φm−1kΔx2)+γ(κeffrTm+1kln⁡um+1k−ln⁡umkΔx2)=0,-\left(\kappa_{\mathrm{eff}}^r\frac{\Phi_{m+1}^k-\Phi_m^k}{\Delta x^2}-\kappa_{\mathrm{eff}}^l\frac{\Phi_m^k-\Phi_{m-1}^k}{\Delta x^2}\right)+\gamma\left(\kappa_{\mathrm{eff}}^r T_{m+1}^k\frac{\ln u_{m+1}^k-\ln u_m^k}{\Delta x^2}\right)=0,
−κeff,pMprΦMp+1−ΦMpΔxp=−κeff,s0rΦs1−Φs0Δxs,−κeff,sMsrΦMs+1−ΦMsΔxs=−Deff,n0run1−un0Δxn.-\kappa_{\mathrm{eff},pM_p}^r\frac{\Phi_{M_p+1}-\Phi_{M_p}}{\Delta x_p}=-\kappa_{\mathrm{eff},s0}^r\frac{\Phi_{s1}-\Phi_{s0}}{\Delta x_s},\qquad-\kappa_{\mathrm{eff},sM_s}^r\frac{\Phi_{M_s+1}-\Phi_{M_s}}{\Delta x_s}=-D_{\mathrm{eff},n0}^r\frac{u_{n1}-u_{n0}}{\Delta x_n}.
Temperature
ρiCp,iTm+1k−TmkΔt−(λi[Tm+1k−2Tmk+Tm−1kΔx2]+Qohm)=0,\rho_i C_{p,i}\frac{T_{m+1}^k-T_m^k}{\Delta t}-\left(\lambda_i\left[\frac{T_{m+1}^k-2T_m^k+T_{m-1}^k}{\Delta x^2}\right]+Q_{ohm}\right)=0,
−λpTpMp+1k−TpMpkΔxp=−λsTs1k−Ts0kΔxs,13−λnTs1k−Ts0kΔxs=−λnTnMn+1k−TnMnkΔxn.-\lambda_p\frac{T_{pM_p+1}^k-T_{pM_p}^k}{\Delta x_p}=-\lambda_s\frac{T_{s1}^k-T_{s0}^k}{\Delta x_s},\qquad13-\lambda_n\frac{T_{s1}^k-T_{s0}^k}{\Delta x_s}=-\lambda_n\frac{T_{nM_n+1}^k-T_{nM_n}^k}{\Delta x_n}.

Table 2. Discretisation of PDAE from Section 2

Solving the nonlinear system

We first describe how to solve the resulting nonlinear system from the PDAE without considering the specific structure of the problem. We will call this basic implementation as naïve method. After discretising in space, we obtain a set of differential algebraic equations (DAE). In particular, we obtain a semi-explicit index-1 DAE, where one can distinguish the differential and algebraic variables. Variables without time derivatives are called algebraic as in standard PDAE literature [22]. We denote the discrete versions of the electrochemical quantities c(x,r,t)c(x,r,t), j(x,t)j(x,t), u(x,t)u(x,t), Φ(x,t)\Phi(x,t), Ψ(x,t)\Psi(x,t), T(x,t)T(x,t) and η(x,t)\eta(x,t) as

c=(cp,cn),j=(jp,jn),u=(up,us,un),\mathbf{c}=(c_p,c_n),\qquad\mathbf{j}=(j_p,j_n),\qquad\mathbf{u}=(u_p,u_s,u_n),
Φ=(Φp,Ψ,Φn),Ψ=(Ψp,Ψn),\mathbf{\Phi}=(\Phi_p,\Psi,\Phi_n),\qquad\mathbf{\Psi}=(\Psi_p,\Psi_n),
T=(Ta,Tp,Ts,Tn,Tz),η=(ηp,ηn).\mathbf{T}=(T_a,T_p,T_s,T_n,T_z),\qquad\boldsymbol{\eta}=(\eta_p,\eta_n).

We can group the differential variables in xx as U^=[u,T]\hat{\mathbf{U}}=[\mathbf{u},\mathbf{T}] and algebraic variables as U~=[Φ,Ψ,j,η]\tilde{\mathbf{U}}=[\mathbf{\Phi},\mathbf{\Psi},\mathbf{j},\boldsymbol{\eta}]. The solid particle concentration c\mathbf{c} is also a differential variable in rr. After discretising in time using backward Euler, we form the following set of nonlinear equations,

0=ck−ΔtG(ck,U^k,U~k)−ck−1(31)\mathbf{0}=\mathbf{c}^{k}-\Delta tG(\mathbf{c}^{k},\hat{\mathbf{U}}^{k},\tilde{\mathbf{U}}^{k})-\mathbf{c}^{k-1} \tag*{(31)}
0=U^k−ΔtF^(ck,U^k,U~k)−U^k−1(32)\mathbf{0}=\hat{\mathbf{U}}^{k}-\Delta t\hat{F}(\mathbf{c}^{k},\hat{\mathbf{U}}^{k},\tilde{\mathbf{U}}^{k})-\hat{\mathbf{U}}^{k-1} \tag*{(32)}
0=F~(ck,U^k,U~k),(33)\mathbf{0}=\tilde{F}(\mathbf{c}^{k},\hat{\mathbf{U}}^{k},\tilde{\mathbf{U}}^{k}), \tag*{(33)}

where kk denotes the time step. From (3.1), we form a larger multi-dimensional vector valued function F(U)F(U), where UU is the aggregate vector containing all the unknowns,

U=[cpcnupusunjpjnηpηnΦpΨΦnΨpΨnTaTpTsTnTz]T(34)U=\left[ \begin{array}{cccccccccccccccccc} c_p & c_n & u_p & u_s & u_n & j_p & j_n & \eta_p & \eta_n & \Phi_p & \Psi& \Phi_n & \Psi_p & \Psi_n & T_a & T_p & T_s & T_n & T_z \end{array} \right]^{T} \tag*{(34)}

Solving for (3.1) is equivalent to finding the root of the function

F(Uk)=0(35)F(U^k)=\mathbf{0} \tag*{(35)}

at every kkth time step. We solve for the root of (3.3) iteratively using Newton’s iteration,

Up+1=Up−[J−1(Up)]F(Up)(36)U^{p+1}=U^p-\left[\mathcal{J}^{-1}(U^p)\right]F(U^p) \tag*{(36)}

where pp denotes the ppth iterate of the Newton’s method and J\mathcal{J} is the Jacobian of F\mathbf{F} at UpU^p. Solving for the inverse of J(Up)\mathcal{J}(U^p) is computationally expensive, especially when we have a large system. Therefore, we use a linear solver to solve for δp=[J−1(Up)]F(Up)\delta^p = [\mathcal{J}^{-1}(U^p)]\mathbf{F}(U^p),

J(U)δp=F(Up).(37)\mathcal{J}(U)\delta^p = \mathbf{F}(U^p). \tag*{(37)}

We generate the iterates Up+1U^{p+1} by

Up+1=Up−δp(38)U^{p+1} = U^p - \delta^p \tag*{(38)}

at every iteration until we converge to the root. In this way, we can approximate the solution to PDAE by repeatedly solving large linear systems.

To give an idea of the size of the nonlinear system in this application, we outline the number of unknowns. In each battery section i∈{p,n}i \in\{p,n\}, there are MiM_i points in xx. For each point in xx, there are NiN_i points in rr. Then, the unknowns representing the solid-phase concentration c\mathbf{c} has Mp(Np+2)+Mn(Nn+2)M_p(N_p+2)+M_n(N_n+2) points, where Ni+2N_i+2 accounts for the ghost points [23] needed to impose boundary conditions at r=0r=0 and r=Rpr=R_p. Similarly, each of upu_p, usu_s and unu_n has Mp+2M_p+2, Ms+2M_s+2 and Mn+2M_n+2 unknowns respectively, and the same applies for the unknowns Φ\mathbf{\Phi} and T\mathbf{T}. For jj and η\eta, there are MpM_p and MnM_n points respectively in the positive and negative electrode, since there are no boundary conditions for these variables. In total, there are

Mp(Np+2)+Mn(Nn+2)+3(Mp+Ms+Mn+6)+(Mp+Mn+4)+2(Mp+Mn)M_p(N_p+2)+M_n(N_n+2)+3(M_p+M_s+M_n+6)+(M_p+M_n+4)+2(M_p+M_n)

unknowns. For example, when we set the number of grid points in each battery section and for each solid particle to be M=N=30M=N=30, we have 2456 unknowns in the resulting system. The number grows quadratically because of the dimension rr of the particles. This emphasizes the need for fast and robust solver for the full P2D model. The main contribution of this work is a fast solver strategy to the linear systems using some of the special structure of the discretised P2D model. For speed and robustness, we also need to consider how to efficiently construct the Jacobians in Newton iterations.

Automatic-differentiation for Jacobians

The fastest method of computing the Jacobian is to manually differentiate the function components with respect to every element in UpU^p a priori. Then, the cost of computation is just the function evaluation of the differentiated components. This can be done for relatively simple models. However, for the fully-coupled P2D model, manual differentiation is inconvenient due to complex equations and prone to errors in the implementation. As alternatives, one can use numerical, symbolic or automatic differentiation (AD). Numerical differentiation, which involves finite differences, is easy to implement and fast. With numerical differentiation, we must choose the step size hh which is especially difficult for systems with multiple scales. We refer the readers to [24] for the details on how round-off and truncation errors depend on the step size hh.

On the other hand, symbolic and automatic differentiation (AD) compute exact Jacobians. Software for AD records every operation done on the inputs of a function, then builds a graph that encodes all the operations [25]. Then the rules of differentiation are applied on every node of the graph. Symbolic differentiation produces a full expression for the derivative, then the numerical values are substituted. This approach, however, has a problem of expression swell causing slower performance, as pointed out by [25]. We use AD for better performance, which uses intermediate values of computations to calculate the derivatives on the fly. There are two ways to do this, the forward and reverse mode AD. For functions f:Rn→Rmf : \mathbb{R}^{n} \to\mathbb{R}^{m} where n>mn > m, the reverse mode is preferred because the Jacobian can be constructed in mm passes but also uses additional space. In contrast, the forward mode is preferred for when m>nm > n because it takes nn passes to build the Jacobian. When m=nm = n, as is the case for our system, the forward mode is usually preferred due to the large memory usage with the reverse mode. However, in § 4.2, we show how we can use the backward mode AD to efficiently build the Jacobians. For further details on how AD works, we refer the reader to [25]. Note that the use of symbolic/automatic differentiation allows changes in terms in the equations (effective diffusivity expressions, for example) with no user effort needed to modify the Jacobian.

A particular AD software that is suitable for the Python environment is a library named JAX [19], which we use extensively in our implementation. § 4.2 discusses how JAX gives an extra performance boost.

Decoupled method

As mentioned in § 3.1, the major bottleneck of the computation comes from solving the linear system

J(Up)δ=F(Up)(39)\mathcal{J}(U^{p})\delta= \mathbf{F}(U^{p}) \tag*{(39)}

at every Newton iteration at every time step. J\mathcal{J} is of size O(NM)×O(NM)\mathcal{O}(NM) \times\mathcal{O}(NM). In this section, we present a decoupled method to solve the linear system in two steps which results in a smaller Jacobian matrix of size O(M)×O(M)\mathcal{O}(M) \times\mathcal{O}(M). We do this by decoupling the equation for c\boldsymbol{c} from F(U)\mathbf{F}(U). The technique results in an exact solve without any approximations. This way, we can reduce the computation cost of solving the linear system at every Newton iteration. From (2.1) we see that equation for lithium-ion concentration cc is linear except at the boundary of the sphere r=Rpr = R_p. Writing the discretised (2.1) in a matrix form, we obtain

Acmk=[0c1,mk−1⋮cN,mk−10]−jmkDeffs(Tmk)[00⋮01](40)A\boldsymbol{c}^{k}_{m} = \begin{bmatrix} 0 \\ c^{k-1}_{1,m} \\ \vdots\\ c^{k-1}_{N,m} \\ 0 \end{bmatrix} - \frac{j^{k}_{m}}{D_{\mathrm{eff}}^{s}(T^{k}_{m})} \begin{bmatrix} 0 \\ 0 \\ \vdots\\ 0 \\ 1 \end{bmatrix} \tag*{(40)}

where cmkc^{k}_{m} is the particle equation at point xmx_m; therefore, for each m=1,2,…,Mm = 1, 2, \ldots, M, we would have to solve (40). Without the decoupling, which will be described shortly, (40) is solved as part of the larger system, as it is coupled to every other variable through jj. AA is the tridiagonal coefficient matrix for and cmkc^{k}_{m}. Let an=−DsΔtrn2Δr2rn−1/2a_n = \frac{-D^{s}\Delta t}{r_n^2\Delta r^2}r_{n-1/2}, bn=1+DsΔtrn2Δr2b_n = 1 + \frac{D^{s}\Delta t}{r_n^2\Delta r^2}, cn=−DsΔtrn2Δr2rn+1/2c_n = \frac{-D^{s}\Delta t}{r_n^2\Delta r^2}r_{n+1/2}. Then,

A=(−11000⋯00a1b1c10⋯000a2b2c2⋯0⋮⋮⋱⋱⋱⋮⋮⋮⋱⋱⋮00⋯⋯⋯−1Δr1Δr).(41)A = \begin{pmatrix} -1 & 1 & 0 & 0 & 0 & \cdots& 0 \\ 0 & a_1 & b_1 & c_1 & 0 & \cdots& 0 \\ 0 & 0 & a_2 & b_2 & c_2 & \cdots& 0 \\ \vdots& \vdots& \ddots& \ddots& \ddots& & \vdots\\ \vdots& \vdots& & \ddots& \ddots& & \vdots\\ 0 & 0 & \cdots& \cdots& \cdots& -\frac{1}{\Delta r} & \frac{1}{\Delta r} \end{pmatrix}. \tag*{(41)}

We now show how the system can be decoupled. Rearranging (40), we can split cmk\mathbf{c}_m^k into two parts

cImk=A−1[0c0,mk−1…cN,mk−10]T,\mathbf{c}_{I_m}^k = A^{-1}\left[0\quad c_{0,m}^{k-1}\quad\ldots\quad c_{N,m}^{k-1}\quad0\right]^T,
cIImk=jmkDs(Tmk)A−1[00…01]T.\mathbf{c}_{II_m}^k = \frac{j_m^k}{D_s(T_m^k)}A^{-1}\left[0\quad0\quad\ldots\quad0\quad1\right]^T.

The constant vector A−1[00…01]TA^{-1}\left[0\quad0\quad\ldots\quad0\quad1\right]^T in cIImk\mathbf{c}_{II_m}^k, which we denote γ\gamma, is a vector that can be precomputed once. By formulating as such, we have partially decoupled the particle equations from the whole system. This is because we can compute cImk\mathbf{c}_{I_m}^k by solving

AcImk=[0c1,mk−1⋮cN,mk−10](42)A\mathbf{c}_{I_m}^k = \begin{bmatrix} 0\\ c_{1,m}^{k-1}\\ \vdots\\ c_{N,m}^{k-1}\\ 0 \end{bmatrix} \tag*{(42)}

cheaply via tridiagonal LU factorisation. Thus, we avoid the full O(NM)×O(NM)O(NM) \times O(NM) Jacobian of F(U)F(U). The vector cIImk\mathbf{c}_{II_m}^k can be obtained by scalar-vector multiplication once we have a solution for j\mathbf{j} and T\mathbf{T}. Equations that are functions of cc, (3), (2.8) and (27), only require the interfacial concentration c∗(x,t)c^*(x,t). In our original system, c∗c^* is approximated as

c∗(xm,t)≈cm∗k=cN,mk+cN+1,mk2.c^*(x_m,t) \approx c_m^{*k} = \frac{c_{N,m}^k+c_{N+1,m}^k}{2}.

This can be rewritten as

cm∗k=c1N,mk+c1N+1,mk2⏟= αmk−jmkDeff(Tmk)γN+1+γN2⏟= β.c_m^{*k} = \underbrace{\frac{c_{1N,m}^k+c_{1N+1,m}^k}{2}}_{=\,\alpha_m^k} - \underbrace{\frac{j_m^k}{D_{\mathrm{eff}}(T_m^k)}\frac{\gamma_{N+1}+\gamma_N}{2}}_{=\,\beta}.

Treating αmk\alpha_m^k and β\beta as constants, c∗(x,t)c^*(x,t) is a function of j\mathbf{j} and T\mathbf{T}, cm∗k=αmk−jmkDs(Tmk)βc_m^{*k}=\alpha_m^k-\frac{j_m^k}{D_s(T_m^k)}\beta. In this way, none of the channel equations depend explicitly on variable cc. Therefore, cc does not need to be computed in the Newton iterations. We can proceed with the Newton iteration with U=(u,j,η,Tϕ,ψ)U=(\mathbf{u},\mathbf{j},\boldsymbol{\eta},\mathbf{T}\boldsymbol{\phi},\boldsymbol{\psi}) where we solve a linear system of a O(M)×O(M)O(M)\times O(M) matrix. Table 3 compares the size of the Jacobian for each method. We stress here that the decoupled method solves the same system as the naïve method. We obtain the same solution to machine precision. If there is a nonlinear dependence in the particle diffusion, the decoupling will still apply, although the tridiagonal solves (42) for each particle will need to be updated at each Newton step.

Np=NnN_p = N_nMp=MnM_p = M_nMs=Ma=MzM_s = M_a = M_zNjacN_{\mathrm{jac}}: naiveNjacN_{\mathrm{jac}}: decoupled
10105411171
202051171291
303052331411
404053891531
505055851651

Table 3. The table shows the size of the Jacobian for each method at different resolutions. The same number of grid points in rr and xx for positive and negative electrode was used. The number of grid points was set fixed to 5 in the separator, positive and negative current collector. The size of the Jacobian grows by O(NM)O(NM) for the naive method, whereas only O(M)O(M) for decoupled.

In Section 4.1, we further improve the efficiency by reordering the entries of Jacobian and computing only the nonzero entries of the reduced Jacobian.

Reordering the Jacobian

The vector UU from our decoupled system can be reordered such that the Jacobian is a banded diagonal matrix. By reordering, we can use an appropriate banded linear solver to enhance the performance. We rearrange UU in an alternating fashion,

U=[up  us  un  jp  jn  ηp  ηnΨp  Ψn  Φp  Φs  Φn  Ta  Tp  Ts  Tn  Tz]T(43)\begin{aligned} U = [&u_p\ \ u_s\ \ u_n\ \ j_p\ \ j_n\ \ \eta_p\ \ \eta_n \\ &\Psi_p\ \ \Psi_n\ \ \Phi_p\ \ \Phi_s\ \ \Phi_n\ \ T_a\ \ T_p\ \ T_s\ \ T_n\ \ T_z]^{\mathsf{T}} \tag*{(43)} \end{aligned}
↓\downarrow
Ur=[Ta  up0  Ψp0  Φp0  Tp0up1  jp0  ηp0  Φsp1  Φep1  Tp1  up2 ⋯ TpMpupMp+1 ΨpMp+1  ΦpMp+1  TpMp+1us0 Φs0  Ts0  us1  Φes1  Ts1 ⋯ usMs+1  ΦsMs+1  TsMs+1⋯ un1  jn0  ηn0  Φsn1  Φen1  Tn1 ⋯ Tz]T(44)\begin{aligned} U_r = [&T_a\ \ u_{p0}\ \ \Psi_{p0}\ \ \Phi_{p0}\ \ T_{p0} \\ &u_{p1}\ \ j_{p0}\ \ \eta_{p0}\ \ \Phi_{sp1}\ \ \Phi_{ep1}\ \ T_{p1}\ \ u_{p2}\ \cdots\ T_{pM_p} \\ &u_{pM_p+1}\ \Psi_{pM_p+1}\ \ \Phi_{pM_p+1}\ \ T_{pM_p+1} \\ &u_{s0}\ \Phi_{s0}\ \ T_{s0}\ \ u_{s1}\ \ \Phi_{es1}\ \ T_{s1}\ \cdots\ u_{sM_s+1}\ \ \Phi_{sM_s+1}\ \ T_{sM_s+1} \\ &\cdots\ u_{n1}\ \ j_{n0}\ \ \eta_{n0}\ \ \Phi_{sn1}\ \ \Phi_{en1}\ \ T_{n1}\ \cdots\ T_z]^{\mathsf{T}} \tag*{(44)} \end{aligned}

The variables are ordered such that uiu_i, jij_i, ηi\eta_i, Ψi\Psi_i, Φi\Phi_i and TiT_i at each ii–th grid point are next to each other, rather than the original set up described in (34). Figure 3 illustrates how the sparsity pattern of the Jacobian changes.

Figure 3. The sparsity pattern of Jacobian from the unordered system on the left. On the right is the sparsity pattern after the Jacobian is reordered.

Banded matrix

The reordered Jacobian, which we denote by Jr\mathcal{J}_r, can be stored in a diagonal ordered form. There are 23 nonzero lower and 23 upper diagonals in Jr\mathcal{J}_r. Then, Jr\mathcal{J}_r can be represented as a matrix of size (23+23+1)×Ntot(23 + 23 + 1) \times N_{\mathrm{tot}} where NtotN_{\mathrm{tot}} is the size of UU. We denote this banded matrix by Jb\mathcal{J}_b. The entries are stored in the following way,

Jb[u+i−j,j]=Jr[i,j],i=0,1,…,(l+u),j=0,1,…,Ntot.\mathcal{J}_b[u+i-j,j]=\mathcal{J}_r[i,j], \quad i=0,1,\ldots,(l+u), \quad j=0,1,\ldots,N_{\mathrm{tot}}.

The number of rows in Jb\mathcal{J}_b is fixed for a given model, as the number of rows correspond to the number of partial derivatives in the system. Jb\mathcal{J}_b is passed to the banded linear solver, which uses LU\mathit{LU} decomposition to solve the linear system.

Constructing the Jacobian

We describe some of the performance gains that can be achieved by using JAX in Python. JAX is especially useful for high-performance computations because it uses a domain-specific compiler XLA (Accelerated Linear Algebra) that can optimize computations at a lower level with improved memory usage. and speed. Compiling code just-in-time (jit) via XLA in Python accelerates the performance because the source code is directly compiled to machine code as the program runs. This is often faster than interpreting, which is typical for languages like Python, making the performance comparable to that of compiled languages like C. The readers can refer to [19] and [26] for more information.

In our problem, a fast compiler that optimizes differentiation computation is very useful because we need to compute the system Jacobian at UU at every Newton step. In addition to differentiation, the compiler can speed up any array manipulations. Any functions that are compiled using XLA incur initial overhead when first called, and is cached to be used later. This is useful for functions that are called many times, as is the case in our problem with multiple Newton updates and time stepping. For example, the first time we build the Jacobian, there is an overhead of roughly 15 seconds (independent of the size of the vector). The proceeding computations are fast.

However, there are limitations of using JAX’s built-in forward-mode Jacobian function. While JAX can automatically output the Jacobian when UU is fed into its built-in function, the output is dense. Currently, the sparse output of Jacobians is not supported. This creates an extra overhead of converting the matrix into a sparse form to use sparse linear solvers. This drawback also causes a computational bottleneck. The evaluation of Jacobian with JAX’s built-in function is quite costly for large vectors, even when compiled with XLA. This is likely coming from the redundant computation effort computing partial derivatives that evaluate to zeros. By the method discussed in Sections 4.1, we bypass this problem by directly constructing the banded reordered Jacobian, Jb\mathcal{J}_b, without using JAX’s built-in Jacobian function.

For each discretised PDE equation, we take the partial derivatives with respect to their arguments via backward mode AD on a scalar level (RNtot→R\mathbb{R}^{N_{\mathrm{tot}}} \to\mathbb{R}). This avoids computing redundant zeros. Many of the discretised equations are repeated over the grid points, but they can be vectorized. We predetermine the sparsity of Jb\mathcal{J}_b prior to the simulation, which is unique to the reordering scheme and the model. At each Newton update, we populate the matrix with partial derivatives with the predetermined sparsity. The array update process is sped up by compilation via XLA. This method provides an efficient way constructing the Jacobian that takes advantage of the tools provided by JAX.

Experimental setup

All simulations were done on Mac CPU, with 3.5 GHz Dual-Core Intel Core i7 processor and 8GB RAM, in Python. Our code is freely available on Github at https://github.com/hanrach/p2d_fast_solver. We ran the simulations until the full battery discharge at 1C, which is observed at t=3620t = 3620 seconds. At the current collectors and the separator, coarse grids (Ma,Ms,Mz=5M_a,M_s,M_z = 5) were used for speed, because of the simpler governing equations in those sections. We varied the grid sizes in the electrodes, with same number of grid points at each positive and negative electrode in xx and rr (Mp=Np=Mn=NnM_p = N_p = M_n = N_n). The time step in the backward Euler method was fixed to Δt=10\Delta t = 10.

Voltage curves under different C rates

We experimentally validate our solver by comparing the voltage curves against Figure 9 in [15]. We run the simulation until the full discharge at different C rates with the heat exchange coefficient hh fixed to 1W/(m2K)1\mathrm{W}/(\mathrm{m}^2\mathrm{K}). We plot how the average temperature and the battery voltage changes over time in Figure 4. The battery voltage is defined as the difference in solid phase potential at the two ends of the electrodes, V=Ψp0−ΨnMnV = \Psi_{p_0} - \Psi_{n_{M_n}}. As expected, at higher C rates the temperature rises rapidly and the voltage drops quickly to the cut-off voltage of 2.5V. These figures are qualitatively similar to Figure 9 in [15]. The script examples/different_C_rates.py was used to generate Figure 4.

Figure 4. Temperature and voltage changes during the discharge cycle under 0.5C, 1C and 2C.

Comparsion between the naïve method and the fast solver

We compare the performance between the naïve method, which does not include the decoupling and uses the built-in Jacobian function in JAX, and the fast method where we decouple cc as well as construct the Jacobian in a diagonal ordered form directly. When solving the linear system Jδp=UpJ\delta p = U^p for the naïve method, we convert the dense Jacobian into a sparse matrix and apply a generic sparse linear solver. Table 4 summarizes the methods.

DecoupledJacobian FunctionLinear Solver
NaïveNoJAXGeneric sparse
FastYesCustomTridiagonal and banded

Table 4. The fast method improves upon the naïve method by decoupling the solid particle equations from the electrolyte equations, and employing the custom Jacobian function and linear solvers that exploit the structure of the matrices.

Figure 5 compares the cumulative time spent on solving the linear systems within the Newton iterations. The overhead of conversion for the naïve method is not costly compared to the actual time to solve the linear systems. This factor is not included in the measurements in Figure 5. At a moderately fine grid M=30M = 30, the naïve method spends a total of about 3.5

Figure 5. The total time of linear solves after the solver is run up to t=3520t = 3520. The xx-axis corresponds to the size of the solution (particle and channel). M=NM = N tested are 5, 10, 20 and 30. The time to assemble the coefficients of the linear systems (40) are not included, since they can be precomputed.

seconds. The fast solver is roughly 12 times faster than the naïve method, spending about 0.3 seconds.

Figure 6 compares the total time of simulation between the naive solver and the fast solver for varied M=NM = N. We especially observe that the time spent on evaluating the Jacobian is drastically reduced. At M=30M = 30, the fast solver outperforms the naive method by ≈5000\approx5000 times.

Figure 6. The total simulation time until full discharge at 1C. M=NM = N tested are 5, 10, 20 and 30.

The code used to generate the performance measurements can be found in the script performance/full_simulation_comparison.py. The data in Table 6 was also generated by the same code. The script performance/reordered_performance.py was used to obtain data for Table 7 and Table 5.

MM1020304050
Fast solver{sup}†`4.09 s4.24 s3.98 s4.15 s4.49 s
LIONSIMBA{sup}†`7.46 s9.85 s15.48 s26.80 s54.60 s
LIONSIMBA{sup}*`28 s57 s105 s134 s223 s
DUALFOIL{sup}*`28 s69 s97 s137 s185 s
COMSOL{sup}*`96 s114 s143 s189 s244 s

Table 5. Comparison of simulation time between solvers. {sup}†The data was obtained from 3.5 GHz Dual-Core Intel Core i7 with 8GB of RAM. {sup}*The data was taken from [15] collected on a different machine.

Evaluation (s)Total (s)
Naive2.22×1042.22 \times10^4 s2.31×1042.31 \times10^4 s
Decoupled only (decoupled method)15.72 s21.63 s
Decoupled & Banded (fast method)0.3943 s3.898 s

Table 6. Evaluation time is the time spent on evaluating J(U)\mathcal{J}(U) and F(U)\mathbf{F}(U). The simulations were compared at M=30M = 30.

MM1020304050
Solve0.2130.2890.3460.41740.532
Evaluation0.3760.4120.3860.4260.483
Total4.0924.2433.9874.15364.494

Table 7. Averaged times of the fast solver over 20 runs. Solve time indicates the total time spent on linear solves. Evaluation time is the time spent on evaluating J(U)\mathcal{J}(U) and F(U)\mathbf{F}(U).

Comparison between the fast solver and other solvers

We also compare the solver against LIONSIMBA [15], DUALFOIL [7] and COMSOL [14]. We take the P2D model simulation data of LIONSIMBA, DUALFOIL and COMSOL from [15], which simulates a discharge cycle of 1C under isothermal conditions, done on a Windows 7 PC with 8GB of RAM. We also include the runtimes of LIONSIMBA obtained on our machine (3.5 GHz Dual-Core Intel Core i7 with 8GB of RAM). For these simulations, the grid size was kept the same across all battery sections. Table 5 shows that the simulation times from our fast solver stay roughly constant for the resolutions tested, whereas this is not true for other solvers.

Results

The fast method improves the efficiency of the naive solver in two ways. Firstly, by decoupling the system, we reduce the time to solve the linear systems, as shown in Figure 5. The figure compares performance between the general sparse linear solver and the banded solver (scipy.linalg.solve_banded) along with tridiagonal solves with LULU factorisation. By reformulating the problem and taking advantage of the linear structure in (40), we improve the linear algebraic efficiency.

Secondly, we work around the major bottleneck of the computation by implementing our own Jacobian building function. Under the AD framework with JAX, a large portion of the simulation time is spent on evaluating the Jacobian and F(U)\mathbf{F}(U). This dominates the total simulation time shown in Figure 6. JAX’s Jacobian function takes up to six hours to evaluate the Jacobians with the full channel and particle system. Decoupling alone without using our custom Jacobian building function (the decoupled method) significantly cuts the time to evaluate the Jacobian. Evaluating the Jacobian of size O(M)×O(M)\mathcal{O}(M) \times\mathcal{O}(M) is much cheaper with JAX’s Jacobian function, as opposed to O(NM)×O(NM)\mathcal{O}(NM) \times\mathcal{O}(NM). For all grid points tested, the decoupled method is faster than the naïve method, drastically outperforming as MM increases. The decoupled formulation achieves performance that is ≈870\approx870 times faster than the naïve method at M=30M = 30.

The fast method further improves the efficiency. JAX is only used to compute the partial derivatives via backward mode differentiation. Compared to the decoupled method, the custom function reduces the time to evaluate the Jacobian up to ≈7\approx7 times at M=30M = 30. This is evidently due to the fact that the banded matrix in diagonal ordered form (of size 47×Ntot47 \times N_{\mathrm{tot}}) has a fixed number of rows and only the number of columns increases with MaM_a, MpM_p, MsM_s, MnM_n and MzM_z. Table 6 compares the time to auto differentiate and evaluate J(U)\mathcal{J}(U) and F(U)\mathbf{F}(U) and the total simulation time of the three methods discussed.

Table 7 summarises the performance of the fast solver. There is an initial overhead (≈15\approx15 seconds) that comes with using XLA compiler, which can be precomputed before the actual simulation. Therefore, we do not factor it into the total time. We observe that the total time spent on the simulation stays roughly constant between three to five seconds. The grids at all battery domains were set equal, with Np=Nn=10,20,30,40,50N_p = N_n = 10, 20, 30, 40, 50 and Ma=Mp=Ms=Mn=Mz=10,20,30,40,50M_a = M_p = M_s = M_n = M_z = 10, 20, 30, 40, 50. For these grid resolutions, we observe that the evaluation and solve times are not the dominating factors but the miscellaneous calculation overhead. This explains why the simulation time seem constant with respect to NN and MM. Choosing M=N≳100M = N \gtrsim100, a clearer upward trend emerges where the solve time dominates the computation (results not included). For practical applications, such fine resolution may not be needed and M=N≤50M = N \le50 would suffice.

Conclusion

We have implemented a fast and robust implementation of the full P2D model without reducing the model. We give a thorough description of the discretisation of the PDAE involving cell-centred finite differences and backward Euler time stepping. The resulting system is a set of nonlinear equations, which can be solved by Newton’s method.

In order to robustly compute the Jacobian at every Newton’s iteration, automatic differentiation is used via the Python package JAX. Because the full P2D model has a linear structure in the particle equations (2.1), we are able to decouple the particle and channel equations at each time step. After decoupling, we solve one large tridiagonal linear system per time step and smaller sparse systems (channel equations) within the Newton iterations. The full system is thus solved more efficiently.

The decoupled method enables us to run the simulation 1C discharge cycle in a reasonable time under the AD framework, whereas such framework is infeasible when we use the naive method. This was made possible by rearranging the variables in the channel equations to create a matrix that is banded, which can be solved efficiently. The computation was made more efficient by directly building the banded Jacobian using the XLA compiler.

An additional way we can increase the efficiency is implementing a adaptive time stepping scheme, based on error on cc only. We have implemented this for the scaled P2D model based on [27], which is a work in progress by Hennessey et al. The adaptive time stepping takes larger time steps in the beginning and gradually adjusts to smaller steps as the problem gets harder near the end of the cycle. For the scaled P2D model, it improved the efficiency by roughly a factor of two compared to the fixed time stepping scheme. This is future work to be explored.

We have demonstrated that by exploiting the structure of the problem, and utilizing state-of-art software, the complex P2D model can be solved accurately in under a few seconds. The fast solver can be potentially used as part of larger computations, such as optimizing multiple-battery pack behaviours. The solver would be especially useful where the P2D model has to be solved repeatedly over many cycles for estimation, optimization or control purposes.

Symbols and Additional equations

List of Symbols

u(x,t)u(x,t)Electrolyte salt concentration [mol/m3^{3}]
c∗(x,t)c^{*}(x,t)Solid-phase surface concentration [mol/m3^{3}]
DiD_iElectrolyte diffusivity [m2^{2}/s]
DisD_i^{s}Solid-phase diffusivity [m2^{2}/s]
kik_iReaction rate [m2.5^{2.5}/ (mol0.5^{0.5}s)]
lil_iThickness [m]
Rp,iR_{p,i}Particle radius [m]
ρi\rho_iDensity [kg/m3^{3}]
Cp,iC_{p,i}Specific heat [J/(kg·K)]
λi\lambda_iThermal conductivity [W/(m·K)]
σi\sigma_iSolid-phase conductivity [S/m]
ϵi\epsilon_iPorosity [-]
aia_iParticle surface area to volume [m2^{2}/m3^{3}]
EakiE_a^{k_i}Reaction constant activation energy [J/mol]
brugg\mathrm{brugg}Bruggeman’s coefficient [-]
FFFaraday’s constant [C/mol]

Table 8.

RR | Universal gas constant [J/(mol·K)] t+t_{+} | Transference number [-] ϵf,i\epsilon_{f,i} | Filler fraction [-]

Open Circuit Potential

Up=Up,ref+(T(x,t)−Tref)∂Up∂T∣TrefU_p = U_{\mathrm{p,ref}} + \left(T(x,t)-T_{\mathrm{ref}}\right)\left.\frac{\partial U_p}{\partial T}\right|_{T_{\mathrm{ref}}}
Un=Un,ref+(T(x,t)−Tref)∂Un∂T∣TrefU_n = U_{\mathrm{n,ref}} + \left(T(x,t)-T_{\mathrm{ref}}\right)\left.\frac{\partial U_n}{\partial T}\right|_{T_{\mathrm{ref}}}

Entropy Change

∂Up∂T∣Tref=−0.001(0.199521039−0.928373822θp+1.364550689000003θp2−0.6115448939999998θp31−5.661479886999997θp+11.47636191θp2−9.82431213599998θp3+3.046755063θp4)\left.\frac{\partial U_p}{\partial T}\right|_{T_{\mathrm{ref}}} =-0.001\left(\frac{0.199521039-0.928373822\theta_p+1.364550689000003\theta_p^2-0.6115448939999998\theta_p^3}{1-5.661479886999997\theta_p+11.47636191\theta_p^2-9.82431213599998\theta_p^3+3.046755063\theta_p^4}\right)
∂Un∂T∣Tref=0.001(0.005269056+3.299265709θn−91.79325798θn2+1004.911008θn3−5812.278127θn4+19329.7549θn5−37147.8947θn6+38379.18127θn7−16515.05308θn81−48.09287227θn+1017.234804θn2−10481.80419θn3+59431.3θn4−195881.6488θn5+374577.3152θn6−385821.1607θn7+165705.8597θn8)\left.\frac{\partial U_n}{\partial T}\right|_{T_{\mathrm{ref}}} =0.001\left(\frac{0.005269056+3.299265709\theta_n-91.79325798\theta_n^2+1004.911008\theta_n^3-5812.278127\theta_n^4+19329.7549\theta_n^5-37147.8947\theta_n^6+38379.18127\theta_n^7-16515.05308\theta_n^8}{1-48.09287227\theta_n+1017.234804\theta_n^2-10481.80419\theta_n^3+59431.3\theta_n^4-195881.6488\theta_n^5+374577.3152\theta_n^6-385821.1607\theta_n^7+165705.8597\theta_n^8}\right)
θp=cs,p∗(x,t)cs,pmax⁡\theta_p=\frac{c^*_{\mathrm{s,p}}(x,t)}{c^{\max}_{\mathrm{s,p}}}
θn=cs,n∗(x,t)cs,nmax⁡\theta_n=\frac{c^*_{\mathrm{s,n}}(x,t)}{c^{\max}_{\mathrm{s,n}}}

Open circuit potential

Up,ref=−4.656+88.669θp2−401.119θp4+342.909θp6−462.471θp8+433.434θp10−1+18.933θp2−79.532θp4+37.311θp6−73.083θp8+95.96θp10U_{\mathrm{p,ref}}= \frac{-4.656+88.669\theta_p^2-401.119\theta_p^4+342.909\theta_p^6-462.471\theta_p^8+433.434\theta_p^{10}} {-1+18.933\theta_p^2-79.532\theta_p^4+37.311\theta_p^6-73.083\theta_p^8+95.96\theta_p^{10}}
Un,ref=0.7222+0.1387θn+0.029θn0.5−0.0172θn+0.0019θn0.5+0.2808e0.9−15θn−0.7984e0.4465θn−0.4108U_{\mathrm{n,ref}}=0.7222+0.1387\theta_n+0.029\theta_n^{0.5}-\frac{0.0172}{\theta_n}+\frac{0.0019}{\theta_n^{0.5}}+0.2808e^{0.9-15\theta_n}-0.7984e^{0.4465\theta_n-0.4108}

Heat source terms (electrodes)

Qohm=σeff,i(∂Ψ(x,t)∂x)2+κeff,i(∂Φe(x,t)∂x)2+2κeff,iRT(x,t)F(1−t+)∂ln⁡u(x,t)∂xΦe(x,t)∂xQ_{\mathrm{ohm}}=\sigma_{\mathrm{eff},i}\left(\frac{\partial\Psi(x,t)}{\partial x}\right)^2+\kappa_{\mathrm{eff},i}\left(\frac{\partial\Phi_e(x,t)}{\partial x}\right)^2+\frac{2\kappa_{\mathrm{eff},i}RT(x,t)}{F}(1-t_+)\frac{\partial\ln u(x,t)}{\partial x}\frac{\Phi_e(x,t)}{\partial x}
Qrxn=Fai,j(x,t)ηi(x,t)Q_{\mathrm{rxn}}=F a_{i,j}(x,t)\eta_i(x,t)
Qrev=Fai,j(x,t)T(x,t)∂Ui∂T∣TrefQ_{\mathrm{rev}}=F a_{i,j}(x,t)T(x,t)\left.\frac{\partial U_i}{\partial T}\right|_{T_{\mathrm{ref}}}

Heat source terms (separator)

Qohm=κeff,i(∂Φe(x,t)∂x)2+2κeff,iRT(x,t)F(1−t+)∂ln⁡u(x,t)∂xΦe(x,t)∂xQ_{\mathrm{ohm}}=\kappa_{\mathrm{eff},i}\left(\frac{\partial\Phi_e(x,t)}{\partial x}\right)^2+\frac{2\kappa_{\mathrm{eff},i}RT(x,t)}{F}(1-t_+)\frac{\partial\ln u(x,t)}{\partial x}\frac{\Phi_e(x,t)}{\partial x}

Coefficients

Deff,i=εibrugg×10−4×10−4.43−54T(x,t)−229−5×10−3u(x,t)−0.22×10−3u(x,t)D_{\mathrm{eff},i}=\varepsilon_i^{\mathrm{brugg}} \times10^{-4} \times10^{-4.43-\frac{54}{T(x,t)-229-5\times10^{-3}u(x,t)}-0.22\times10^{-3}u(x,t)}
keff,i=εibrugg×10−4×u(x,t)(−10.5+0.668×10−3u(x,t)+0.494×10−6u(x,t)2+T(x,t)(0.074−1.78×10−5u(x,t)−8.86×10−10u(x,t)2)+T(x,t)2(−6.96×10−5+2.8×10−8u(x,t))2)k_{\mathrm{eff},i}=\varepsilon_i^{\mathrm{brugg}} \times10^{-4}\times u(x,t)\left(-10.5+0.668\times10^{-3}u(x,t)+0.494\times10^{-6}u(x,t)^2+T(x,t)\left(0.074-1.78\times10^{-5}u(x,t)-8.86\times10^{-10}u(x,t)^2\right)+T(x,t)^2\left(-6.96\times10^{-5}+2.8\times10^{-8}u(x,t)\right)^2\right)
keff=kieEakiR(1T(x,t)−1Tref)k_{\mathrm{eff}}=k_i e^{\frac{E_a^{k_i}}{R}\left(\frac{1}{T(x,t)}-\frac{1}{T_{\mathrm{ref}}}\right)}
Deff,is=DiseEaDisR(1T(x,t)−1Tref)D_{\mathrm{eff},i}^{s}=D_i^{s}e^{\frac{E_a^{D_i^{s}}}{R}\left(\frac{1}{T(x,t)}-\frac{1}{T_{\mathrm{ref}}}\right)}
σeff,i=σi(1−εi−εf,i)\sigma_{\mathrm{eff},i}=\sigma_i(1-\varepsilon_i-\varepsilon_{f,i})
Υ=2(1−t+)RF\Upsilon=\frac{2(1-t_+)R}{F}

Parameters used in simulation

ParameterUnit/valueAl CCCathodeSeparatorAnodeCarbon CC
ceinitc_e^{\mathrm{init}}[mol/m3][\mathrm{mol}/\mathrm{m}^{3}]-100010001000-
csavg,initc_s^{\mathrm{avg},\mathrm{init}}[mol/m3][\mathrm{mol}/\mathrm{m}^{3}]-25751-26128-
csmax⁡c_s^{\max}[mol/m3][\mathrm{mol}/\mathrm{m}^{3}]-51554-30555-
DiD_i[m2/s][\mathrm{m}^{2}/\mathrm{s}]-7.5×10−107.5 \times10^{-10}7.5×10−107.5 \times10^{-10}7.5×10−107.5 \times10^{-10}-
DisD_i^{s}[m2/s][\mathrm{m}^{2}/\mathrm{s}]-10−1410^{-14}-3.9×10−143.9 \times10^{-14}-
kik_i[m2.5/(mol0.5s)][\mathrm{m}^{2.5}/(\mathrm{mol}^{0.5}\mathrm{s})]-2.334×10−112.334 \times10^{-11}-5.301×10−115.301 \times10^{-11}-
lil_i[m][\mathrm{m}]10−510^{-5}8×10−58 \times10^{-5}2.5×10−52.5 \times10^{-5}8.8×10−58.8 \times10^{-5}10−510^{-5}
Rp,iR_{p,i}[m][\mathrm{m}]-2×10−62 \times10^{-6}-2×10−62 \times10^{-6}-
ρi\rho_i[kg/m3][\mathrm{kg}/\mathrm{m}^{3}]27002500110025008940
Cp,iC_{p,i}[J/(kg K)][\mathrm{J}/(\mathrm{kg}\ \mathrm{K})]897700700700385
λi\lambda_i[W/(m K)][\mathrm{W}/(\mathrm{m}\ \mathrm{K})]2372.10.161.7401
σi\sigma_i[S/m][\mathrm{S}/\mathrm{m}]3.55×1073.55 \times10^{7}100-1005.96×1075.96 \times10^{7}
ϵi\epsilon_i--0.3850.7240.485-
aia_i[m2/m3][\mathrm{m}^{2}/\mathrm{m}^{3}]-885000-723600-
Ea,iDsE_{a,i}^{D_s}[J/mol][\mathrm{J}/\mathrm{mol}]-5000-5000-
Ea,ikiE_{a,i}^{k_i}[J/mol][\mathrm{J}/\mathrm{mol}]-5000-5000-
brugg--444-
FF96485 [C/mol][\mathrm{C}/\mathrm{mol}]-----
RR8.314472 [J/(mol K)][\mathrm{J}/(\mathrm{mol}\ \mathrm{K})]-----
t+t_+0.354
ϵf,i\epsilon_{f,i}--0.025-0.0326-

Table 9.

References

  1. [1]N. Nitta, F. Wu, J. T. Lee, G. Yushin, Li-ion battery materials: present and future, Materials Today 18 (5) (2015) 252 – 264. doi:https://doi.org/10.1016/j.mattod.2014.10.040. URL http://www.sciencedirect.com/science/article/pii/S1369702114004118
  2. [2]J. Heelan, E. Gratz, Z. Zheng, Q. Wang, M. Chen, D. Apelian, Y. Wang, Current and prospective li-ion battery recycling and recovery processes, The Journal of The Minerals, Metals & Materials Society (TMS) 68 (10) (2016) 2632–2638.DOI
  3. [3]B. Pattipati, K. Pattipati, J. P. Christopherson, S. M. Namburu, D. V. Prokhorov, Liu Qiao, Automotive battery management systems, in: 2008 IEEE AUTOTESTCON, 2008, pp. 581–586.DOI
  4. [4]K. Liu, K. Li, J. Deng, A novel hybrid data-driven method for li-ion battery internal temperature estimation, in: 2016 UKACC 11th International Conference on Control (CONTROL), IEEE, 2016, pp. 1–6.DOI
  5. [5]K. A. Severson, P. M. Attia, N. Jin, N. Perkins, B. Jiang, Z. Yang, M. H. Chen, M. Aykol, P. K. Herring, D. Fraggedakis, M. Z. Bazant, S. J. Harris, W. C. Chueh, R. D. Braatz, Data-driven prediction of battery cycle life before capacity degradation, Nature Energy 4 (5) (2019) 383–391. doi:10.1038/s41560-019-0356-8. URL https://doi.org/10.1038/s41560-019-0356-8
  6. [6]M.-F. Ng, J. Zhao, Q. Yan, G. J. Conduit, Z. W. Seh, Predicting the state of charge and health of batteries using data-driven machine learning, Nature Machine Intelligence 2 (3) (2020) 161–170. doi: 10.1038/s42256-020-0156-7. URL https://doi.org/10.1038/s42256-020-0156-7
  7. [7]M. Doyle, Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell, Journal of The Electrochemical Society 140 (6) (1993) 1526. doi:10.1149/1.2221597.DOI
  8. [8]M. Guo, G. Sikha, R. E. White, Single-particle model for a lithium-ion cell: Thermal behavior, Journal of The Electrochemical Society 158 (2) (2010) A122.DOI
  9. [9]E. Prada, D. Di Domenico, Y. Cref, J. Bernard, V. Sauvant-Moynot, F. Huet, Simplified electrochemical and thermal model of LiFePO₄-graphite Li-ion batteries for fast charge applications, Journal of The Electrochemical Society 159 (9) (2012) A1508.DOI
  10. [10]V. Ramadesigan, V. Boovaragavan, J. C. Pirkle Jr, V. R. Subramanian, Efficient reformulation of solid-phase diffusion in physics-based lithium-ion battery models, Journal of The Electrochemical Society 157 (7) (2010) A854.
  11. [11]X. Han, M. Ouyang, L. Lu, J. Li, Simplification of physics-based electrochemical model for lithium ion battery on electric vehicle. Part I: Diffusion simplification and single particle model, Journal of Power Sources 278 (2015) 802–813.DOI
  12. [12]A. Jokar, B. Rajabloo, M. Désilets, M. Lacroix, Review of simpli- fied pseudo-two-dimensional models of lithium-ion batteries, Journal of Power Sources 327 (2016) 44–55.DOI
  13. [13]V. Ramadesigan, P. W. C. Northrop, S. De, S. Santhanagopalan, R. D. Braatz, V. R. Subramanian, Modeling and simulation of lithium-ion bat- teries from a systems engineering perspective, Journal of The Electro- chemical Society 159 (3) (2012) R31–R45. doi:10.1149/2.018203jes. URL https://doi.org/10.1149%2F2.018203jes
  14. [14]L. Cai, R. E. White, Mathematical modeling of a lithium ion battery with thermal effects in COMSOL Inc. Multiphysics (MP) software, Journal of Power Sources 196 (14) (2011) 5985 – 5989. doi:https://doi.org/10.1016/j.jpowsour.2011.03.017. URL http://www.sciencedirect.com/science/article/pii/ S0378775311005994
  15. [15]M. Torchio, L. Magni, R. B. Gopaluni, R. D. Braatz, D. M. Raimondo, LIONSIMBA: a Matlab framework based on a finite volume model suit- able for Li-ion battery design, simulation, and control, Journal of The Electrochemical Society 163 (7) (2016) A1192.DOI
  16. [16]G. G. Botte, V. R. Subramanian, R. E. White, Mathematical modeling of secondary lithium batteries, Electrochimica Acta 45 (15-16) (2000) 2595–2609.DOI
  17. [17]L. R. Petzold, Description of DASSL: a differential/algebraic system solver, Tech. rep., Sandia National Labs., Livermore, CA (USA) (1982).
  18. [18]A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, D. E. Shumaker, C. S. Woodward, Sundials: Suite of nonlinear and differ- ential/algebraic equation solvers, ACM Transactions on Mathematical Software (TOMS) 31 (3) (2005) 363–396.
  19. [19]J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, S. Wanderman-Milne, JAX: composable transformations of Python+NumPy programs (2018). URL http://github.com/google/jax
  20. [20]V. D. Bruggeman, Berechnung verschiedener physikalischer Konstan- ten von heterogenen Substanzen. I. Dielektrizitätskonstanten und Leitfähigkeiten der Mischkörper aus isotropen Substanzen, Annalen der physik 416 (7) (1935) 636–664.
  21. [21]J. Newman, K. Thomas-Alyea, Electrochemical Systems, The ECS Series of Texts and Monographs, Wiley, 2004. URL https://books.google.ca/books?id=vArZuoHM-xYC
  22. [22]U. Ascher, L. Petzold, Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations, Other Titles in Applied Mathematics, Society for Industrial and Applied Mathematics, 1998. URL https://books.google.ca/books?id=VL51G5JYYAYCDOI
  23. [23]J. W. Thomas, Numerical Partial Differential Equations: Finite Difference Methods, Vol. 22 of Texts in Applied Mathematics, Springer-Verlag, New York, 1995.DOI
  24. [24]R. L. Burden, J. D. Faires, Numerical analysis (2011).
  25. [25]A. G. Baydin, B. A. Pearlmutter, A. A. Radul, J. M. Siskind, Automatic differentiation in machine learning: a survey, The Journal of Machine Learning Research 18 (1) (2017) 5595–5637.
  26. [26]X. team within Google, XLA: Optimizing compiler for machine learning. URL https://www.tensorflow.org/xla
  27. [27]M. Hennessy, I. Moyles, T. Myers, B. Wetton, The P2D model for Li-ion battery electrodes: When is it really needed?

Paper details

vlnc:W_rh76kxdk
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents