Since the discovery of the electrochemical intercalation reaction of lithium in layered titanium disulfide (TiS2) by Whittingham in 1976, lithium-ion batteries (LIB) have grown in popularity and application to surpass all other electrical energy storage devices  . This groundbreaking discovery demonstrated the reversible shuttling of lithium ions in solid layered materials and sparked the development of intercalation electrode materials for room temperature secondary batteries. However, due to the low voltage of TiS2 as a cathode material (approximately 2 V vs. Li+/Li) and the lack of a safe anode the time, the Li/TiS2 battery was not commercialized.
The intercalation mechanism would later be revisited in the search of a safe anode, which completely avoids the danger of lithium dendrites. These needle-like structures protrude from the metallic anode surface during platting, causing internal short circuits and battery-related fires. The coupling of two intercalation electrode materials is therefore, the fundamental basis of the ubiquitous LIB which are used in most consumer electronics and have recently captured public attention due to their application in electric vehicles. It is therefore meritorious, for the 2019 Nobel Prize in chemistry, to be awarded to John Goodenough, M. Stanley Whittingham and Akira Yoshino, for developing the LIB . We should also mention the nickel metal hydride batteries (NiMH), the emerging sodium-ion batteries (SIB) and potassium-ion batteries, which likewise make use of intercalation active materials.
Inasmuch as intercalation of energy carrying species inside electrodes is fundamental to the operation of the aforementioned battery chemistries, the mathematical modeling of this mechanism is equally critical to the success of physics-based battery models. The time-dependent radial transport of species inside spherical active particles is governed by Fick’s second law
where is the concentration of the intercalated species [mol·m−3], is the solid-state diffusion coefficient [m2·s−1], r is the radial distance from the center of the particle [m] and t is time [s]. Equation (1) does not assume a constant diffusion coefficient, which indeed, may vary as a function of the concentration. This has consequences on the complexity of the numerical solution method as we shall later explore in detail. For a physics-based battery model, we should highlight that the ultimate goal is to derive the particle surface concentration for a given surface flux boundary condition (Neumann boundary condition) using a numerical solution method that is both robust and computationally inexpensive. The surface concentration is the most important parameter which governs reaction kinetics and the state-of-charge in electrochemical battery models.
Several efficient methods for solving Equation (1) in the case of a constant diffusion coefficient exist and have been applied in many battery models   . A constant diffusion coefficient is the customary assumption in battery models, a simplification which allows analytical and numerical solutions from heat transfer theory to be used . Such numerical methods are detailed in the classic reviews by Subramanian et al.  and Zeng et al. . In our assessment, Liu’s pseudo steady-state method (PSS) resolves the seemingly antagonistic requirements of computational speed and numerical accuracy . A recent modification to the PSS method, provides faster and stable results for long time simulations .
A challenging problem which has remained relatively unscrutinized for many years, is how to efficiently simulate a variable diffusion coefficient   . This problem deserves increased attention because of the need to address stress effects in particles,  phase separation in two-phase materials and temperature effects occurring at high discharge rates. Overwhelming evidence corroborates that a constant diffusion coefficient is a rare exception in intercalation particles. For example, the diffusion coefficient in nickel hydroxide particles used in NiMH batteries, varies by 3 orders of magnitude over the span of the state-of-charge  . In addition, the diffusion coefficient in Na3V2(PO4)2F3 active particles in SIB varies by 2 orders of magnitude, even though ex situ XRD patens reveal negligible variation in lattice parameters, a characteristic of solid-solution processes  .
While incorporating a concentration-dependent diffusion coefficient in electrochemical models leads to more accurate simulation results, the lack of an analytical exact solution method for Equation (1), for a general, nonlinear form of the diffusion coefficient, means one has to rely on numerical methods.  Traditionally, this is solved by the explicit and implicit finite difference methods (FDM)  . However, explicit schemes are conditionally stable and therefore, computationally expensive. For a grid spacing , the von Neumann stability condition for the explicit scheme
imposes a strong time step restriction for particle sizes of the order of 0.5 - 5 µm in radius. In general, FDM do not conserve a perfect mass balance and this error is propagated to the overall battery simulation at long times . Other grid-based methods, with a perfect mass conservation include, the finite element method (FEM) and the finite volume method (FVM). While both methods are renowned for their robustness, they have the inherent disadvantage of not calculating concentrations at specific node points, in particular, at the surface boundary  . Instead, one obtains volume averaged concentrations within discrete volume elements. Despite the additional computations and approximation errors arising from approximating the surface concentration, these methods have been successfully applied to battery simulations, with variable diffusion coefficients.
To address the shortcomings of the FEM and FVM, Zeng et al.  proposed the control volume method (CVM). The CVM is a class of finite volume discretization, which computes concentrations at node points. Therefore, surface concentrations are obtained directly in the CVM. Compared to the FVM, the CVM has a higher accuracy for a given number of mesh points and is more suited for battery modeling.  While these authors focused on the Crank-Nicolson time domain discretization, which sometimes produces oscillatory solutions, we herein present a backward Euler control volume method (BECV) to resolve the spherical diffusion problem with a variable diffusion coefficient. This method incorporates all the advantages of the CVM, with the added advantage of being stable and easier to implement. Because obtaining a fully-implicit solution involves a series of iterative steps, a hybrid backward Euler control volume method (HBECV) is herein introduced for the first time. The HBECV method is based on the linearization of the functional form of the diffusion coefficient and obtains the implicit solution in a single iteration. Using the HBECV, computationally efficient, accurate and unconditionally stable results are obtained for the surface concentration. While this work focuses on the single particle diffusion problem, the solution extension to a full, physics-based battery model is trivial.
The challenge with all grid based methods is that, the number of states in a system of coupled differential equations dramatically increases, when the number of spatially distributed grid points increases  . In order to reduce the number of grid points, while maintaining a high accuracy, it is recommended to implement a non-regular grid spacing, which allocates more points towards the surface boundary, where the concentration gradients will be steep initially. Therefore, we present the CVM for non-uniform grid spacing and further perform a mesh optimization study in which factors affecting optimum mesh spacing are identified. It is shown that the diffusion length is a primary factor, which determines the optimum grid spacing.
The second order, time-dependent, partial differential equation for species diffusion inside a spherical particle, is governed by Fick’s second law which is expressed in Equation (1). Two Neumann-type boundary conditions are relevant for a battery simulation, at the surface and at the center of the particle. At the surface, due to interfacial electrochemical reactions, the rate of species transport across the surface is expressed as a flux. This boundary condition is written as
where J is the interfacial flux of species [mol·m−2·s−1] and R is the radius of the particle [m].
We define J as positive for species diffusing out of the particle. J can also be expressed in terms of the current density and its magnitude is the same at all points of the surface, i.e. it is uniform. In turn, this implies spherical symmetry.
At the center of the particle, due to the flux symmetry, the flux is zero
To obtain the concentration profile inside the particle, we apply the CVM. For Neumann-type boundary conditions, the CVM performs better compared to the FDM because mass conservation breaks down in the FDM.
Since the diffusion problem of Equations (1), (3)-(4) is spherically symmetric, the magnitude of flux depends only on r. Consider a set of N discretization points on r, such that
where the index i defines node positions of CVM, and N is a non-zero natural number of grid points. Accordingly, and are the particle center and surface, respectively.
Each ith node point in Equation (5) can be assigned a control volume element to it. For a spherical geometry, and for , such a control volume element is a shell whose external faces (boundaries) are located halfway between adjacent nodes.
Let and define the ith inner control volume boundary and outer control volume boundary, respectively, according to
where is the spacing between two adjacent node points. In this way, the ith inner control volume element is a shell imbedding node point i.
At the boundaries, exceptions arise. Both and are not located between node points but right at node points and , respectively. This implies, and . On the other hand, and are located between adjacent node points and can be expressed as
Figure 1 illustrates the CVM discretization. Black dots and solid black lines represent node points while white dots and dotted black lines represent control volume boundaries. A magnified view of the discretized particle illustrates the 3D nature of spherical shells arising from inner control volume discretization. Several important features of the control volume discretization should be noted:
1) Concentrations are calculated at the node points only. No concentrations are calculated at the boundaries between control volume elements.
2) The concentration profile between nodes is assumed to be linear.
3) Concentration gradients are calculated at spherical shell boundaries using concentration values from adjacent nodes.
4) Interior boundaries of the control volume shells are located halfway between adjacent nodes.
Let denote the control volume element at node point i. Assume , the amount of electrochemically active species [mol] inside at arbitrary time t, can be expressed as a product of the concentration at node point i and volume of corresponding spherical shell. This means
Figure 1. Diffusion in a spherical particle illustrating the control volume discretization along the particle radius. The solid black lines and solid black dots represent grid point i, while the dotted black line and white dots represent control volume boundaries. In the magnified view, i is surrounded by an imaginary control volume between the outer boundary and inner boundary . The flux is defined positive for species diffusing out of the particle.
where is the total volume of [m3].
Mass conservation law in the absence of source term(s) dictates that any change in corresponds to the net-flux via control of the volume inner and outer boundaries, i.e.
where represents mass flux though control volume boundaries [mol·m−2·s−1], is the time step [s] and the symbol denotes a change of a variable in time. is the surface area of the ith control volume boundary [m2] which is defined as
at the surface boundary as
and at the center boundary as
Note that, the absence of source term(s) in Equation (11) is due to the lack of internal species production or consumption within the active particles.
Now, according to remarks ii and iii, the fluxes at the control volume boundaries can be derived as follows
where is the concentration-dependent diffusion coefficient at the control volume boundary [m2·s−1]. A half-sum is applied because of remarks ii and iv. Substituting Equation (12) and (15) into Equation (11), gives
In order to eliminate the factor 4π from subsequent derivations, let a normalized volume be defined as
at the center ( ) and at the surface boundary ( ), and are defined as
To further economize notations, let variable [m3] be introduced
Therefore, taking Equations (17) and (20) into account, Equation (16) can be expressed in terms of and as
Rearranging Equation (21) we finally obtain
Equation (22) is defined at interior node points. It is possible, starting with the general mass balance expression of Equation (11) and following the steps shown in Equations (15)-(22), to obtain expressions for the two remaining boundary cases, and .
At the center (at ), there is zero flux through according to Equation (4). Furthermore, the surface area at is zero according to Equation (14). Applying the general mass balance on gives
Finally, Equation (23) expressed in terms of the variable , becomes
At the surface (at ), there is a uniform interfacial flux J. Applying the boundary condition of Equation (3) and the general mass balance on , we obtain
Finally, introducing the variable into Equation (25) gives
Up to this point, the temporal discretization is intentionally omitted because the system of equations, Equations (22), (24) and (26) can be solved either by the forward Euler or the backward Euler method.
Let the superscript j represent the current time step and represent the previous time step. Therefore, . The system of equations, Equations (22), (24) and (26) is thus expressed in the backward Euler scheme as
at the center
and at the surface
Equations (27)-(29) represent a coupled system of equations since all values at time step j are unknown while values at time step are unknown.
2.1. Solving the Coupled System of Equations
As a first step to finding the solution, the coupled system of Equations (27)-(29) is expressed in matrix form. This is expressed as
where is a column vector containing concentrations at all node points at time index j, i.e. , is an N-by-N matrix
is expressed as
and is a (column) vector, , whose only non-zero entry is at the Nth point, corresponding to the surface.
is a tridiagonal matrix. If , a condition which is trivially satisfied by the construction of sequence r as shown in Equation (5), is strictly (row) diagonally dominant. By the Levy-Desplanques theorem, is non-singular and therefore invertible . The tridiagonal matrix algorithm (TDMA) can thus be applied to solve Equation (30) as a stable and fast solution method . The TDMA, also known as the Thomas algorithm, is a variant of Gaussian elimination, which is applicable to a diagonally dominant tridiagonal system of N unknowns. Compared to the standard Gaussian elimination or matrix inversion, which require operations to solve, the TDMA only requires operations .
For a constant diffusion coefficient, Equation (30) is linear. The solution is rapidly obtained in a single run of the TDMA. However, for the problem posed above, the diffusion coefficient at time step j is not known a priori since D is an implicit function of . Equation (23) therefore takes form
and represents a non-linear system of equations. Equation (31) can be iteratively solved by various fixed point methods such as Newton’s method, Jacobi, line-by-line and Gauss-Seidel. These iterative methods can be used in combination with the TDMA to obtain convergent solutions  . The Newton’s method in particular, attains quadratic convergence if the initial guess is sufficiently close to the solution  . Nevertheless, great care must be taken to correctly construct and solve the Newton equation and a poor initial guess may even result in a lack of convergence . In this work, the following iterative scheme (Jacobi) is used
where subscript k denotes the iteration number in a total of iterations. is therefore the implicit solution obtained after k iterations. The initial value needed for the first iteration, is defined as
For , the fully-implicit, BECV solution is obtained. It shall be demonstrated that, due to the initial condition Equation (33), the first iteration of Equation (32) achieves a stable and approximately accurate solution, which is acceptable in many cases. This solution is herein referred to as the HBECV. The HBECV is therefore a linearization of the concentration-dependent , in order to obtain implicit solutions in a single iteration.
2.2. Grid Spacing
In order to accurately determine concentration profiles, many grid points are required. However, more grid points come at considerable computational costs. The accuracy of the CVM, for an economical number of grid points, depends on the spatial distribution of the same. The choice of grid spacing, however, depends on the nature of the problem and boundary conditions. More points are required at the regions where the concentration profile has steep gradients and this holds true at the particle surface boundary.
While the scheme of equations presented in this work, allows for variable spacing of grid points, the literature around grid/mesh optimization is very sparse, this in turn makes it difficult to comprehend the principle factors affecting the optimum grid spacing. In order to evaluate the different grid-point locations, the following geometric spacing equation is applied
where Y is the common factor of the geometric series. In this study, Y varies between 2 and 20. If , the logarithmic spacing is obtained, a notable choice in the preceding publication . To evaluate the error in each value of Y, as a function of D and R, a solution obtained from a linear spaced grid of 501 points and s is used as reference solution.
3. Results and Discussion
To investigate the accuracy of HBECV, the set of parameters from Zeng et al.  is used. Table 1 shows the parameters for Li(Ni1/3Mn1/3Co1/3)O2 particles used in the referenced work and also in this work.
The concentration-dependent diffusion coefficient for Li(Ni1/3Mn1/3Co1/3)O2 used by Wu et al. (see ref. ) is
where is defined as the reference diffusion coefficient of 2 × 10−16 m2·s−1, is the theoretical capacity of the electrode material (277.84 mAh·g−1) and is the practical capacity of the electrode material of 160 mAh·g−1.
Figure 2 illustrates the agreement between our results and literature. After a discharge time t = 400 s, the surface concentration nearly reaches cmax and thus the end of discharge. For the parameters in Table 1, a dense mesh of 501 grid points is needed to eliminate errors due to spatial discretization. These results validate the BECV method whose solutions are obtained after iterations of the Jacobi method.
It is interesting to evaluate the effect of reducing ktot because the computation speed increases with less iteration. Figure 3 shows that the relative error in surface concentration progressively increases when ktot decreases. Furthermore, approximately 10 iterations of the Jacobi method are necessary to obtain a fully-implicit BECV solution. With regards to fast simulations, the HBECV solution obtained when is interesting. From the results, the relative error on the surface concentration of the HBECV method is approximately 0.1%, which is good enough for practical purposes and moreover the results are stable. This validates the HBECV and justifies its use for fast, stable and practically accurate results.
Table 1. Parameters for modeling diffusion in spherical particle with variable diffusion coefficient.
Figure 2. Comparison of the results of the simulated concentration gradients obtained in this work, using the BECV method and results from Zeng et al.  Results are obtained using 501 uniformly spaced grid points, using the parameters of Table 1 and the concentration-dependent diffusion coefficient expression, Equation (35).
Figure 3. Relative error in surface concentration over 400 s simulation as a function of the number of iterations. The relative error of the HBECV method is compared to the iterative implicit BECV method. 501 uniformly spaced grid points and parameters in Table 1 are used to calculate the surface concentration. As ktot, the total number of iterations per time-step increases, the solution converges to the reference solution of 20 iterations.
A uniform grid of 501 points is nevertheless impractical for use in battery simulations where the number of grid points is limited. The first step in reducing the number of grid points is to determine optimal grid spacing. This is herein determined by changing the value of Y in a model with 301 grid points. The optimization of Y is performed using the uniform grid of 501 points as the reference solution, while the cost function is the normalized root of squared deviations between these solutions.
Figure 4 illustrates the dependence of optimum Y ( ) on the dimensionless parameter . This parameter represents a scaled diffusion length since the mass diffusion length is known to be equal to . Two regions can be easily identified in Figure 4.
1) high diffusion length region where and ,
2) low diffusion length region where and .
For a high diffusion length, which is more than 10% of R, an evenly spaced grid defined by low Y values should be used. On the other hand, for a low diffusion length, which is less than 10% of R, a logarithmic grid spacing, defined by high Y values, is more appropriate. The immediate conclusion is that more points are needed close to the surface only when the diffusion length is low. This highlights the importance of carefully selecting the grid spacing for a given and R values and not rely on an intuitive feeling of the grid spacing.
For the parameters listed in Table 1, and the number of grid points distributed by is defined as . It is important to further reduce , to a practical number, relevant to full-cell battery modeling. Figure 5 shows the relative error on surface concentration at and , as a function of . As expected, the error relative to the fine grid mesh increases as decreases. However, the BECV and the HBECV remarkably converge to the same error when decreases. This implies is that, the spatial discretization error exceeds the linearization error of the HBECV when the number of optimally spaced grid points is below 21. Therefore, based on the results shown in Figure 5, the HBECV should be used in battery simulations, instead of the more computationally expensive BECV.
Figure 4. Grid optimization, effect of the geometric factor Y and the dimensionless factor . The red squares show the optimum geometric factor, for selected and R values. The bars represent variance within 1% of . Inset showing the distribution of 6 grid points for , and .
Figure 5. Relative error on surface concentration at 400 s of the BECV and the HBECV as a function of , the number of optimized grid points. The optimum geometric factor, and time step, are used. The reference solution is obtained from 501 uniform grid points and .
In this paper, the backward Euler control volume (BECV) and the hybrid backward Euler control volume (HBECV) methods are presented as efficient numerical methods to resolve the solid-state spherical diffusion problem for a variable diffusion coefficient. The implicit scheme of nonlinear equations is herein shown to be strictly diagonally dominant and efficiently solved by the tridiagonal matrix algorithm (TDMA).
The fully-implicit BECV is shown to require more computations, approximately 10 iterations of the TDMA, in order to reach a convergent solution; however, the HBECV only requires one iteration. The HBECV achieves this by linearization of the implicit scheme of equations. Although, in comparison to the BECV method, the error in surface concentration in the HBECV method is around 0.1%, for a fine grid of 501 points, the error difference decreases when the number of grid points decreases. For a course grid of 21 optimally spaced grid points, the error in surface concentrations converges to the same order of magnitude, which demonstrates that the error due to spatial discretization outweighs the error due to the linearization, as introduced by the HBECV method.
This work further explores the parameters governing optimal grid spacing. The diffusion length emerged as a guiding parameter for selecting optimum grid spacing. It is found that low diffusion length problems require more points distributed near the surface, compared to high diffusion length problems wherein an evenly spaced grid more appropriate.
As demonstrated in this work, the HBECV is accurate, stable and easy to implement. In practical battery simulations, where the number of grid points is minimized, the HBECV performs as well as the BECV method. Therefore, given the aforementioned advantages of the HBECV, this method is a justified choice for modeling the second order partial differential equation of solid-state diffusion with a concentration-dependent diffusion coefficient.
 Chayambuka, K., Mulder, G., Danilov, D.L. and Notten, P.H.L. (2019) A Modified Pseudo-Steady-State Analytical Expression for Battery Modeling. Solid State Communications, 296, 49-53.
 Ramadesigan, V., Boovaragavan, V., Pirkle, J.C. and Subramanian, V.R. (2010) Efficient Reformulation of Solid-Phase Diffusion in Physics-Based Lithium-Ion Battery Models. Journal of The Electrochemical Society, 157, A854-A860.
 Subramanian, V.R., Diwakar, V.D. and Tapriyal, D. (2005) Efficient Macro-Micro Scale Coupled Modeling of Batteries. Journal of The Electrochemical Society, 152, A2002-A2008.
 Subramanian, V.R., Ritter, J.A. and White, R.E. (2001) Approximate Solutions for Galvanostatic Discharge of Spherical Particles I. Constant Diffusion Coefficient. Journal of The Electrochemical Society, 148, E444-E449.
 Zhang, Q. and White, R.E. (2007) Comparison of Approximate Solution Methods for the Solid Phase Diffusion Equation in a Porous Electrode Model. Journal of Power Sources, 165, 880-886.
 Mao, J., Tiedemann, W. and Newman, J. (2014) Simulation of Temperature Rise in Li-Ion Cells at Very High Currents. Journal of Power Sources, 271, 444-454.
 Kazemi, N., Danilov, D.L., Haverkate, L., Dudney, N.J., Unnikrishnan, S. and Notten, P.H.L. (2019) Modeling of All-Solid-State Thin-Film Li-Ion Batteries: Accuracy Improvement. Solid State Ionics, 334, 111-116.
 Raijmakers, L.H.J., Danilov, D.L., Eichel, R.-A. and Notten, P.H.L. (2020) An Advanced All-Solid-State Li-Ion Battery Model. Electrochimica Acta, 330, 135147.
 Christensen, J. and Newman, J. (2006) Stress Generation and Fracture in Lithium Insertion Materials. Journal of Solid State Electrochemistry, 10, 293-319.
 Motupally, S., Streinz, C.C. and Weidner, J.W. (1995) Proton Diffusion in Nickel Hydroxide Films Measurement of the Diffusion Coefficient as a Function of State of Charge. Journal of the Electrochemical Society, 142, 1401-1408.
 Motupally, S., Streinz, C.C. and Weidner, J.W. (1998) Proton Diffusion in Nickel Hydroxide Prediction of Active Material Utilization. Journal of The Electrochemical Society, 145, 29-34.
 Shakoor, R.A., Seo, D.-H., Kim, H., Park, Y.-U., Kim, J., Kim, S.-W., Gwon, H., Lee, S. and Kang, K. (2012) A Combined First Principles and Experimental Study on Na3V2(PO4)2F3 for Rechargeable Na Batteries. Journal of Materials Chemistry, 22, 20535-20541.
 Liu, Z., Hu, Y.-Y., Dunstan, M.T., Huo, H., Hao, X., Zou, H., Zhong, G., Yang, Y. and Grey, C.P. (2014) Local Structure and Dynamics in the Na Ion Battery Positive Electrode Material Na3V2(PO4)2F3. Chemistry of Materials, 26, 2513-2521.
 Ford Versypt, A.N. and Braatz, R.D. (2014) Analysis of Finite Difference Discretization schemes for DIFFUSION in Spheres with Variable Diffusivity. Computers & Chemical Engineering, 71, 241-252.
 Urisanga, P.C., Rife, D., De, S. and Subramanian, V.R. (2015) Efficient Conservative Reformulation Schemes for Lithium Intercalation. Journal of The Electrochemical Society, 162, A852-A857.
 Zeng, Y., Albertus, P., Klein, R., Chaturvedi, N., Kojic, A., Bazant, M.Z. and Christensen, J. (2013) Efficient Conservative Numerical Schemes for 1D Nonlinear Spherical Diffusion Equations with Applications in Battery Modeling. Journal of The Electrochemical Society, 160, A1565-A1571.
 Higham, N.J. (1986) Efficient Algorithms for Computing the Condition Number of a Tridiagonal Matrix. SIAM Journal on Scientific and Statistical Computing, 7, 150-165.
 Wu, S.-L., Zhang, W., Song, X., Shukla, A.K., Liu, G., Battaglia, V. and Srinivasan, V. (2012) High Rate Capability of Li(Ni1/3Mn1/3Co1/3)O2 Electrode for Li-Ion Batteries. Journal of the Electrochemical Society, 159, A438-A444.