1 Introduction

Due to their comparatively high specific energy, applications of Li-ion batteries range from portable electronics to large scale energy storage. Intercalation compounds, which are used as electrodes in Li-ion batteries, have large variations in Li concentration during charging and discharging often accompanied by phase transformations. Phase interface migration is known to decrease the diffusion of Li-ions, so the electrochemical kinetics will be dependent on the phase-transition mechanism. In order to represent these experimentally observed phase interfaces, it is important to be able to describe the diffusion of lithium inside the battery and the way it interacts with the electrodes. Phase separation can be properly represented by the Cahn–Hilliard equation [2].

Furthermore, lithium diffusion induces strains in the electrode particles, resulting in a coupled Cahn–Hilliard/Elasticity problem. Two approaches to deal with this coupled problem have been recently introduced. A standard Galerkin method was proposed by Di Leo et al. [3], where the Chemical potential was considered an unknown. The other approach was the variationally consistent method by Miehe et al. [8], having the same number of unknowns. Properties of the uncoupled Cahn–Hilliard equation and its coupled version require a specific treatment, which can be a matter of choice from an algorithmic perspective. Both the coupled and the uncoupled versions of the Cahn–Hilliard equation are fourth-order PDEs and therefore require either \({{\mathcal {C}}}^{1}\) discretizations or the use of a penalty term to partition the fourth order equation into two second-order equations (in a manner analogous to the case of the Mindlin theory of plate bending, when compared with the original Kirchhoff–Love, see also [6]). Ubachs et al. [12] combined this long-standing idea with Peerlings implicit gradient model (cf. [9]) to obtain an efficient penalized uncoupled implementation with \({\mathcal {C}}^{0}\) elements. A micromorphic interpretation was introduced by Di Leo et al. [3] with a similar resulting discretization. We here follow this general strategy and propose a staggered approach in order to increase algorithmic simplicity. Coupling with elasticity introduces a difficulty: the strain gradient is required and low order elements have a low resolution representation of strains. In particular, four-node tetrahedra have constant strain and therefore this coupling term would be null if a displacement-based strain were to be used. Di Leo et al. make use of an additional degree-of-freedom corresponding to the stress part of the Chemical potential (in their nomenclature \(\mu _{\sigma }\)) with the additional tying equation. Alternatively, Miehe et al. use the total Chemical potential \(\mu \) as an unknown field in their variationally-consistent formulation. We adopt here a more pragmatical approach (avoiding the need of one additional degree-of-freedom), which is to perform a nodal averaging of the Green–Lagrange strain and therefore use these nodal values to estimate \(\mu _{\sigma }\).

Although simplicity of implementation is an advantage, it is well known that staggered algorithms cause drifting of results and also tend to cause loss of convergence due to a reduced iteration radius for the Newton–Raphson solution. We therefore assess the present approach by changing the time step and mesh size while studying both effects of coupling: the effect of the strain gradient in the concentration evolution and the effect of concentration in the Green–Lagrange strain. As will become apparent, results are relatively insensitive and indistinguishable from the aforementioned more sophisticated approaches.

This work is organized as follows: Sect. 2 presents a concise description of the governing equations, weak form, discretization and linearization adopted. Section 3 shows examples of phase-separation in 2D and 3D using the uncoupled Cahn–Hilliard equation. Section 4 repeats the exercise of Sect. 3 but including coupling with elasticity. Section 5 presents a Lithiation exercise of a ellipsoid particle with exterior time-dependent flux. It is shown that swelling due to coupling is represented in a time-step insensitive form. Finally, in Sect. 6 conclusions are drawn considering the results and future work.

2 Governing equations and discretization

2.1 The Cahn–Hilliard equation

The phenomenological [4] Cahn–Hilliard [2] equation formalizes the phase separationFootnote 1 process, in which phases of a binary mixture (often a solid solution in which case is called exsolution, or in a fluid, and is then called symplectite growth) separate and form regions pure in each component. In the Li-ion context only solid solutions are of practical relevance, cf. [13]. The observed phase separation requires uphill diffusion in which material moves against concentration gradients. The classical Fick diffusion equation, which generates uniform concentration profiles, does not produce this observable effect. If we identify c as the normalized species concentration, with \(c=0\) indicating pure phase I and \(c=1\) indicating pure phase II, then the (uncoupled) Cahn–Hilliard equation and problem statement is established as follows:

$$\begin{aligned}&\dot{c} = \nabla \cdot \left\{ M(c)\nabla \left[ \underbrace{\mu (c)-\lambda \nabla ^{2}c}_{h(c)}\right] \right\} \quad {\mathrm {in}}\quad \Omega \,\times \,]0,T[ \end{aligned}$$
(1)
$$\begin{aligned}&c = g\quad {\mathrm {on}}\quad \Gamma _{g}\times ]0,T[ \end{aligned}$$
(2)
$$\begin{aligned}&M(c)\left\{ \nabla \left[ \mu (c)-\lambda \nabla ^{2}c\right] \right\} \cdot \varvec{n} = s\quad {\mathrm {on}}\quad \Gamma _{f}\,\times \,]0,T[ \end{aligned}$$
(3)
$$\begin{aligned}&M(c)\left[ \lambda \left( \nabla c\right) \cdot \varvec{n}\right] = 0\quad {\mathrm {on}}\quad \Gamma \,\times \,]0,T[ \end{aligned}$$
(4)
$$\begin{aligned}&c(\varvec{x},0) = c_{0}(\varvec{x})\quad {\text {in}}\quad {\Omega } \end{aligned}$$
(5)

where M(c) is called a mobility function with \(\text {LT}^{-1}\) units and \(\lambda \) is a non-negative constant with \(\text {L}^{2}\) units. \(\mu (c)\) represents the Chemical potential of a regular solution in the absence of phase interfaces and is non-dimensional. In (1) standard notation is followed: \(\dot{\bullet }\) is the time derivative and \(\nabla ^{2}\) is the (space) Laplacian in n dimensions. The term \(\lambda \nabla ^{2}c\) represents the interface energy and effectively coarsens the phases. Two mechanisms dominate the evolution of a solution to the Cahn–Hilliard equation: separation represented by a non-convex \(\mu (c)\) and coarsening represented by the Laplacian term. There is one essential (see also Fig. 1) boundary condition on boundary \(\Gamma _{g}\) where the value of c is known (\(c=g\)) and two natural boundary conditions: Eq. (3) on boundary \(\Gamma _{f}\) represents a prescribed flux and is called the flux boundary condition and Eq. (4) which inhibits coarsening at the boundary \(\Gamma \). These boundary conditions are complemented by the initial condition for c, which is provided by Eq. (5). Time, t, is present in (15) as a parameter in the open interval: \(t\in ]0,T[\) where T is the total time of analysis. The gradient operator \(\nabla \) represents the derivative with respect to original, or undeformed coordinates \(\varvec{x}\):

$$\begin{aligned} \nabla =\left\{ \frac{\partial }{\partial \varvec{x}}\right\} \end{aligned}$$
(6)

In (1), h(c) is an intermediate function that will be approximated with the goal of reducing the order of (1) by partitioning.

Fig. 1
figure 1

Coupled problem: identification of regions

Using a 1D interpretation, Eq. (1) can be written in that case, omitting the dependence on c, as:

$$\begin{aligned} \dot{c}=M'\left[ \left( c'\right) ^{2}\mu '-\lambda c'c'''\right] +M\left[ (c')^{2}\mu ''+\mu 'c''-\lambda c''''\right] \end{aligned}$$
(7)

where \(\dot{\bullet }={\partial \bullet }/{\partial t}\) and \(\bullet '={\partial \bullet }/{\partial x}\). x and t are the dependent variables in (7). Two typical functions M(c) and \(\mu (c)\) functions are:

$$\begin{aligned} M(c)= & {} Dc(1-c) \end{aligned}$$
(8)
$$\begin{aligned} \mu (c)= & {} \log \left( \frac{c}{1-c}\right) +\chi (1-2c) \end{aligned}$$
(9)

where D is a diffusivity-like constant and \(\chi \), the interaction parameter, sets the equilibrium concentration value in the absence of the interface term. Accordingly, function \(\mu (c)\) has a local maximum at

$$\begin{aligned} c(\mu _{\max })=\frac{1}{\chi +\sqrt{(\chi -2)\chi }} \end{aligned}$$
(10)

and a local minimum at

$$\begin{aligned} c(\mu _{\min })=\frac{1}{\chi -\sqrt{(\chi -2)\chi }} \end{aligned}$$
(11)

noting that \(c_{\max }\ne c(\mu _{\max })\) and \(c_{\min }\ne c(\mu _{\min }).\) Corresponding values \(\mu _{\min }\) and \(\mu _{\max }\) are given as:

$$\begin{aligned} \mu _{\min }= & {} -\sqrt{\chi (\chi -2)}+\log \left[ \chi -1+\sqrt{\chi (\chi -2)}\right] \end{aligned}$$
(12)
$$\begin{aligned} \mu _{\max }= & {} \sqrt{\chi (\chi -2)}+\log \left[ \frac{1}{\chi -1+\sqrt{\chi (\chi -2)}}\right] \end{aligned}$$
(13)

Values of c approaching 0 will result in \(\mu (c)\) approaching \(-\infty \) and values of c approaching 1 will result in \(\mu (c)\) approaching \(+\infty \), therefore effectively restricting c to the interval ]0, 1[.

2.2 Partition in two second-order equations with penalty term

As in the works of Di Leo et al. [3] and Ubachs et al. [12] we partition the fourth-order equation (1) in two second-order equations by introducing an additional field and the screened-Poisson equation for c:

$$\begin{aligned} h^{\star }(c,c^{\star })\cong h(c) \end{aligned}$$
(14)

where the function \(h^{\star }(c,c^{\star })\) is defined using an additional variable \(c^{\star }\):

$$\begin{aligned} h^{\star }(c,c^{\star })=\mu (c)-\beta l^{2}\nabla ^{2}c^{\star } \end{aligned}$$
(15)

and l and \(\beta \) are new properties (which will be defined later). The replacement is accompanied by the following equation (see also [9] for an analogous equation in the fracture context):

$$\begin{aligned} c-c^{\star }=-l^{2}\nabla ^{2}c^{\star } \end{aligned}$$
(16)

from which we conclude that

$$\begin{aligned} h^{\star }(c,c^{\star })=\mu (c)+\beta \left( c-c^{\star }\right) \end{aligned}$$
(17)

where \(\beta (c-c^{\star })\) acts as a penalty term. In essence, \(c-c^{\star }\) should be monitored and \(\beta \) large enough so that the difference is acceptable from a practical perspective. Accuracy in the satisfaction of (14) depends on the accuracy of the following approximation

$$\begin{aligned} \nabla ^{2}c^{\star }\cong \frac{\lambda }{\beta l^{2}}\nabla ^{2}c \end{aligned}$$
(18)

Now the Cahn–Hilliard problem statement becomes:

$$\begin{aligned}&\dot{c} = \nabla \cdot \left\{ M(c)\nabla \left[ \underbrace{\mu (c)+\beta \left( c-c^{\star }\right) }_{h^{\star }(c,c^{\star })}\right] \right\} \quad {\mathrm {in}}\quad \Omega \,\times ]0,T[ \end{aligned}$$
(19)
$$\begin{aligned}&c-c^{\star }+l^{2}\nabla ^{2}c^{\star } = 0\quad {\mathrm {in}}\quad \Omega \,\times ]0,T[ \end{aligned}$$
(20)
$$\begin{aligned}&c = g\quad {\mathrm {on}}\quad \Gamma _{g}\,\times \,]0,T[ \end{aligned}$$
(21)
$$\begin{aligned}&M(c)\left\{ \nabla \left[ h^{\star }(c,c^{\star })\right] \right\} \cdot \varvec{n} = s\quad {\mathrm {on}}\quad \Gamma _{f}\,\times ]0,T[ \end{aligned}$$
(22)
$$\begin{aligned}&M(c)\left[ \lambda \left( \nabla c^{\star }\right) \cdot \varvec{n}\right] = 0\quad {\mathrm {on}}\quad \Gamma \,\times \,]0,T[ \end{aligned}$$
(23)
$$\begin{aligned}&c(\varvec{x},0) = c_{0}(\varvec{x})\quad {\text {in}}\quad {\Omega } \end{aligned}$$
(24)
$$\begin{aligned}&c^{\star }(\varvec{x},0) = c_{0}^{\star }(\varvec{x})\quad {\text {in}}\quad \Omega \end{aligned}$$
(25)

An alternative to this partition in two second-order equations is the use of discontinuous Galerkin method, as performed by Wells et al. [15]. The first equation (19) defined in \(\Omega \,\times ]0,T[\) can be further expanded as:

$$\begin{aligned} \dot{c}= & {} \frac{{{\mathrm {d}}}M}{{{\mathrm {d}}}c}\left( \nabla c\right) \cdot \left( \frac{\partial h^{\star }}{\partial c}\nabla c+\frac{\partial h^{\star }}{\partial c^{\star }}\nabla c^{\star }\right) \nonumber \\&\,+\, M\left[ \frac{\partial ^{2}h^{\star }}{\partial c^{2}}\left( \nabla c\right) \cdot \left( \nabla c\right) +2\frac{\partial ^{2}h^{\star }}{\partial c\partial c^{\star }}\left( \nabla c\right) \cdot \left( \nabla c^{\star }\right) \right. \nonumber \\&\left. +\,\frac{\partial ^{2}h^{\star }}{\partial c^{\star }\partial c^{\star }}\left( \nabla c^{\star }\right) \cdot \left( \nabla c^{\star }\right) \right] \nonumber \\&\,+\,M\left[ \frac{\partial h^{\star }}{\partial c}\left( \nabla ^{2}c\right) +\frac{\partial h^{\star }}{\partial c^{\star }}\left( \nabla ^{2}c^{\star }\right) \right] \end{aligned}$$
(26)

It is worth mentioning that, to ensure compatibility, initial conditions for c and \(c^{\star }\) coincide: \(c_{0}^{\star }(\varvec{x})=c_{0}(\varvec{x})\).

2.3 Coupling with equilibrium at finite strains

Considering the Kirchhoff/Saint-Venant material, which relates the second Piola–Kirchhoff stress with the Green–Lagrange strain, we now introduce two coupling terms to Eq. (19):

  • The swelling term, see [3], to represent the volumetric expansion effect due to phase concentration.

  • The effect of stress in the evolution of c, which was established by Sethuraman et al. [10].

Figure 1 shows the boundaries for the phase separation and the equilibrium problem. The flux natural boundary condition (imposed \(\varvec{j\cdot n}\)) is related to our diffusion property s as depicted in Fig. 1. In addition, we have the Cauchy equilibrium in material form, see also [11].

$$\begin{aligned}&\dot{c} = \nabla \cdot \left\{ M(c)\nabla \left[ \underbrace{\mu (c)+\beta \left( c-c^{\star }\right) +\psi (\mathbf {S}\left( c,\mathbf {E}\right) )}_{h^{\star }(c,c^{\star },\mathbf {E})}\right] \right\} \nonumber \\&\quad {\mathrm {in}}\quad \,\Omega \,\times ]0,T[ \end{aligned}$$
(27)
$$\begin{aligned}&\nabla \cdot (\varvec{F}\varvec{S})^{T} = \varvec{0}\quad {\mathrm {in}}\quad \,\Omega \,\times ]0,T[ \end{aligned}$$
(28)
$$\begin{aligned}&\beta \left( c-c^{\star }\right) +\lambda \nabla ^{2}c^{\star } = 0\quad {\mathrm {in}}\quad \,\Omega \,\times ]0,T[ \end{aligned}$$
(29)
$$\begin{aligned}&\psi (\mathbf {S}(c,\mathbf {E})) = -\frac{\Phi }{3R\theta }\mathbf {I}\cdot \mathbf {S}\left( c,\mathbf {E}\right) \quad {\mathrm {in}}\quad \Omega \times ]0,T[ \end{aligned}$$
(30)
$$\begin{aligned}&c = g\quad {\mathrm {on}}\quad \Gamma _{g}\times ]0,T[ \end{aligned}$$
(31)
$$\begin{aligned}&M(c)\left\{ \nabla \left[ h^{\star }(c,c^{\star },\mathbf {E})\right] \right\} \cdot \varvec{n} = s\quad {\mathrm {on}}\quad \Gamma _{f}\times ]0,T[ \end{aligned}$$
(32)
$$\begin{aligned}&M(c)\left[ \lambda \left( \nabla c^{\star }\right) \cdot \varvec{n}\right] = 0\quad {\mathrm {on}}\quad \,\Gamma \,\times ]0,T[ \end{aligned}$$
(33)
$$\begin{aligned}&u = \overline{u}\quad {\text {on}}\quad \,\Gamma _{u}\,\times ]0,T[ \end{aligned}$$
(34)
$$\begin{aligned}&\mathbf {\varvec{S}}\cdot \varvec{n} = \varvec{t}\quad {\text {on}}\quad \Gamma _{t}\times ]0,T[ \end{aligned}$$
(35)
$$\begin{aligned}&c(\varvec{x},0) = c_{0}(\varvec{x})\quad {\text {in}}\quad {\Omega } \end{aligned}$$
(36)
$$\begin{aligned}&c^{\star }(\varvec{x},0) = c_{0}^{\star }(\varvec{x})\quad {\text {in}}\quad \Omega \end{aligned}$$
(37)

where \(\varvec{S}\) is the second Piola–Kirchhoff stress tensor (with \(\mathbf {S}\) its Voigt form), \(\mathbf {E}\) is the Green–Lagrange strain in Voigt form and \(\varvec{F}\) is the deformation gradient (these are standard quantities in continuum mechanics, cf. [11]). We also use the Voigt form of the identity matrix \(\varvec{I}\) as \(\mathbf {I}\). The term \(\varvec{t}\) in Eq. (35) is the prescribed stress vector at the boundary \(\Gamma _{t}\). Inertia and body forces are considered absent from the examples in this work. Additional data follows:

  • The Kirchhoff/Saint-Venant constitutive law is adopted, with the coupling term:

    $$\begin{aligned} \mathbf {S}= & {} {\mathbb {C}}\left( \mathbf {E}-\frac{c_{\max }\left( c-c_{0}\right) \Phi }{3}\mathbf {I}\right) \end{aligned}$$

    where \(c_{\max }\) is the maximum species concentration and \(\Phi \) is the swelling parameter.

  • Characteristic time-scale: \(\tau =\sqrt{\lambda }/M(c)\).

  • Characteristic length: \(l_{c}=\sqrt{\lambda }\).

  • \(h^{\star }(c,c^{\star },\mathbf {E})\) is the normalized Chemical potential.

  • The relation between the natural boundary function s (cf. Eq. 32) and the classical flux boundary condition (\(\varvec{j}\cdot \varvec{n}\)), cf. [3], is given by:

$$\begin{aligned} s=-M(c)\frac{\varvec{j}\cdot \varvec{n}}{R\theta } \end{aligned}$$
(38)

where R is the ideal gas constant and \(\theta \) is the absolute temperature. Table 1 summarizes the relevant quantities and corresponding units.

Table 1 Constitutive quantities for the combined problem

2.4 Weak form of the coupled equations

With the purpose of implementing the equations using finite elements, we use two weight functions, \(w_{c}(\varvec{x})\) and \(w_{c^{\star }}(\varvec{x})\) plus the virtual Green–Lagrange strain \(\delta \mathbf {E}\) and apply the arguments for the Galerkin method argument to obtain three equations in the integral form. For the coupled case we have (omitting dependence on c, \(c^{\star }\) and \(\mathbf {E}\)):

$$\begin{aligned}&\int _{\Omega }\left( w_{c}\dot{c}+M\nabla w_{c}\cdot \nabla h\right) {{\mathrm {d}}}\Omega +\int _{\Omega }\left[ \beta w_{c^{\star }}\left( c-c^{\star }\right) \right. \nonumber \\&\quad -\left. \lambda \nabla w_{c^{\star }}\cdot \nabla c^{\star }\right] {{\mathrm {d}}}\Omega = \int _{\Gamma _{f}}w_{c}s{{\mathrm {d}}}\Gamma _{f} \end{aligned}$$
(39)

where

$$\begin{aligned} \nabla h= & {} \frac{{{\mathrm {d}}}\mu (c)}{{{\mathrm {d}}}c}\nabla c+\beta \left( \nabla c-\nabla c^{\star }\right) -\frac{\Phi }{3R\theta }\mathbf {I}\nonumber \\&\cdot {\mathbb {C}}\left[ {\mathbb {\nabla \mathbf {E}}}-\frac{c_{\max }\Phi }{3}\mathbf {I}\nabla c\right] \end{aligned}$$
(40)

and the standard weak form of equilibrium:

$$\begin{aligned} \int _{\Omega }\mathbf {S}\cdot \delta \mathbf {E}{{\mathrm {d}}}\Omega =\int _{\Gamma }\varvec{t}\cdot \delta \varvec{u}{{\mathrm {d}}}\Gamma \end{aligned}$$
(41)

where \(c_{\max }\) is the maximum species concentration and \(\mathbf {S}\equiv \mathbf {S}\left( \mathbf {E}-\frac{cc_{\max }\Phi }{3}\mathbf {I}\right) \). Linearization of (39) and (41) is performed by AceGen [5] add-on to Mathematica [16].

2.5 Discretization

For one triangle or one tetrahedron, given \(n_{K}\) shape functions \(N_{K}(\varvec{\xi })\) with \(K=1,\ldots ,n_{K}\) where \(\varvec{\xi }\) are the parent-domain coordinates, we use the following finite element approximation for c, \(c^{\star }\), \(w_{c}\), \(w_{c}^{\star }\), \(\varvec{u}\) and \(\mathbf {E}\) in (30):

$$\begin{aligned}&c = \sum _{K=1}^{n_{K}}N_{K}(\varvec{\xi })c_{K} \end{aligned}$$
(42)
$$\begin{aligned}&c^{\star } = \sum _{K=1}^{n_{K}}N_{K}(\varvec{\xi })c_{K}^{\star } \end{aligned}$$
(43)
$$\begin{aligned}&w_{c} = \sum _{K=1}^{n_{K}}N_{K}(\varvec{\xi })w_{K} \end{aligned}$$
(44)
$$\begin{aligned}&w_{c}^{\star } = \sum _{K=1}^{n_{K}}N_{K}(\varvec{\xi })w_{K}^{\star } \end{aligned}$$
(45)
$$\begin{aligned}&\varvec{u} = \sum _{K=1}^{n_{K}}N_{K}\left( \varvec{\xi }\right) \varvec{u}_{K} \end{aligned}$$
(46)
$$\begin{aligned}&\mathbf {E} = \sum _{K=1}^{n_{K}}N_{K}(\varvec{\xi })\mathbf {E}_{K}\quad {\text {for stress gradient}} \end{aligned}$$
(47)

where \(\mathbf {E}_{K}\) are the strain tensors (in Voigt form) at the nodal points (cf. Fig. 2). We use a weighted average for the nodal Green–Lagrange strains:

$$\begin{aligned} \mathbf {E}_{K}=\frac{\sum _{e\in S_{e}(K)}V_{e}\mathbf {E}_{e}}{\sum _{e\in S_{e}(K)}V_{e}} \end{aligned}$$
(48)

where \(V_{e}\) is the volume of each element e and \(S_{e}(K)\) is the set of elements containing node K. Since low order tetrahedra provide a constant \(\mathbf {E}_{e}\), there is no dependence on parent-domain coordinates in (48). Subsequently, we use these nodal values to calculate the gradient:

$$\begin{aligned} \nabla \psi (\mathbf {S}(c,\mathbf {E})) \end{aligned}$$
(49)

arising from Eq. (30).

Fig. 2
figure 2

Definition of nodal strains \(\mathbf {E}\) from a weighted average

The implementation is performed over Simplas (cf. [1]) with the backward-Euler time-integration algorithm. The linear solver is BiCGStab from Van der Vorst (cf. [14]).

3 Phase separation problems

First examples are verification tests to assess the effect of time-step and mesh size in the phase separation process. Both 2D (a \(800\times 800\) nm rectangle with \(125\times 125\), \(95\times 95\) and \(45\times 45\) triangular elements) and 3D (a \(800\times 800\times 800\) nm cube with \(45\times 45\times 45\) equally spaced tetrahedron elements) discretizations are used. Since in the first stage the problem is restricted to the phase separation (no mechanical coupling) we omit the properties \(c_{\max },\,\Phi ,\,\theta ,\,E\) and \(\nu \). The initial conditions \(c_{0}(x)\) are defined using a uniform probability distribution: \(c_{0}\thicksim {\mathcal {U}}(0.58,0.68)\) with the interval [0.58, 0.68]. Table 2 contains the relevant properties. Natural boundary conditions correspond to \(\varvec{j}\cdot \varvec{n}=0\) in all boundaries. Contour plots of c, \(\mu \) and \(c-c^{\star }\) are shown in Fig. 3 and mesh size effect is shown in Fig. 4a for the integrated Chemical potential. Some slight oscillations can be observed but the results are relatively mesh-insensitive, specially considering that \(c_{0}\) is random. Concerning the effect of step size, we focus on the time interval \([0,2.5]\,{\mathrm {s}}\) and observe that large steps present a premature drift but steps smaller than 0.05 s are sufficient for accuracy in this stage.

Fig. 3
figure 3

Contour plots for c, \(\mu \) and \(c-c^{\star }\)

Fig. 4
figure 4

Uncoupled case: effect of mesh size and time step on the time-evolution of H (see Eq. (50)), a mesh size effect (note that \(c_{0}\) is random and distinct for the three cases), b step size effect (\(\Delta t\in [0.0125,0.1]\)). \(T=2.5\) s

Table 2 Constitutive properties for the combined problem

The effect of time step and mesh size in the integrated \(h^{\star }(c,c^{\star },\mathbf {E})\):

$$\begin{aligned} H=\int _{\Omega }h^{\star }\left( c,c^{\star },\mathbf {E}\right) {{\mathrm {d}}}\Omega \end{aligned}$$
(50)

is monitored for this uncoupled problem. Global mesh size effect and detail of the growth stage for several time steps are shown in Fig. 4. Results are relatively insensitive to both step and mesh sizes. For the 3D case, we present a sequence of contour plots for c and the difference \(c-c^{\star }\) in Fig. 5. It is observed that the value of \(\beta =1000\) is sufficient to ensure that \(c^{\star }\cong c\).

Fig. 5
figure 5

Uncoupled case (3D): contour plots for c and \(c-c^{\star }\), \(t=1,\,5,\,10\) and 50 s

4 Application of the staggered algorithm with Cauchy equilibrium (chemo-mechanical problem)

We now tackle the corresponding combined problem, by considering the properties shown in Table 3. The sequence of deformed contour plots for c as well as the contour plots for \(\mu \) and \(c-c^{\star }\) are shown in Fig. 6 where the deformation due to coupling is clear. In addition, the values of \(\mu \) are two order of magnitude larger due to the presence of function \(\psi \). Concerning the effect of step and mesh sizes (the same meshes of the previous section are used), Fig. 7 presents the results. Despite the oscillations, results are relatively mesh-insensitive. It can be observed that, as in the uncoupled case, for \(\Delta t<0.05\), results become relatively step-size insensitive.

Fig. 6
figure 6

Combined case: contour plots for c, \(\mu \) and \(c-c^{\star }\). Deformation is not magnified

Fig. 7
figure 7

Combined case: effect of mesh size and time step on the time-evolution of H, a mesh size effect, b step size effect

Table 3 Constitutive properties for the combined problem

Concerning the 3D representation of the coupled model, we use a \(800{\mathrm {\,nm}}\)-side cube with a clamped bottom (at \(y=0\)). Three time instances are represented in Fig. 8 with contour plots for c and \(c-c^{\star }\). A sequence of deformed meshes is shown in Fig. 9. The effect of evolution of c in the strain field is observable in this figure.

Fig. 8
figure 8

Coupled case (3D): contour plots for c and \(c-c^{\star }\). The edges have 46 nodes in each direction

Fig. 9
figure 9

Coupled case (3D): sequence of deformed meshes. The edges contain 46 nodes in each direction

We now consider the converse effect where the strain gradient affects the concentration c. With that purpose, we consider a block indentation similar to the one employed by Miehe et al. [8] and two meshes: \(20\times 20\times 20\) divisions (shown in Fig. 10) and a coarser one with half the divisions. Properties (with consistent units) are shown in Table 4. The effect of time-step in the evolution of c and \(c^{\star }\) is shown in Fig. 11a with excellent insensitivity and the same applies to the mesh size effect, shown in Fig. 11b.

Fig. 10
figure 10

Compressed block (3D)

Fig. 11
figure 11

Step size and mesh size effects in the evolution of c and \(c^{\star }\), a step size influence in the evolution of c and \(c^{\star }\)at the monitored node (which is identified in Fig. 10), b mesh size effect in the evolution of c and \(c^{\star }\)at the monitored node (which is identified in Fig. 10)

Table 4 Constitutive properties for the block indentation

5 Lithiation with swelling of a spheroidal particle

As a final example, we now use of the lithiation example shown by Di Leo et al. [3]. We use a full 3D mesh whereas Di-Leo et al. used an axisymmetric mesh. Reported dimensions and problem properties are employed. Figure 12 and Table 5 provide the required data for this simulation. As described by Fig. 12, the flux is applied in two different stages with a switch at \(t=1\) s. Flux is imposed by simple triangular facets (mesh is described in Fig. 12). Two time-steps are used: \(\Delta t=0.025\) s and \(\Delta t=0.050\) s. The definition of state-of-charge (\({\mathrm {SOC}}\)) is given simply by:

$$\begin{aligned} {\mathrm {SOC}}=\frac{\int _{\Omega }c{{\mathrm {d}}}\Omega }{\int _{\Omega }{{\mathrm {d}}}\Omega } \end{aligned}$$
(51)

For these two time steps, we compare the \({\mathrm {SOC}}\) results with the ones reported by Di Leo et al. [3] with reasonable agreement (see Fig. 13a). Swelling is also measured for the two time steps, as Fig. 13b shows. Reasonable step-size independence is observed. Some oscillations in the volume ratio is observed when the smaller time-step is used 13b and this is caused by irregularities in the spatial distribution c during the inward evolution.

Fig. 12
figure 12

Lithiation problem: geometry, elastic properties and flux (natural) boundary conditions. Also shown is the contour plot (for \(t=6\) s) of the concentration c and maximum principal stress \(\sigma _{1}\) which emerges due to coupling with the Cahn–Hilliard equation

Fig. 13
figure 13

Effect of step size on SOC and lithiation. Comparison with the results of Di Leo et al. [3], a effect of step size in the SOC, b effect of step size in the volume ratio during lithiation

Fig. 14
figure 14

Effect of \(\Phi \) in the volume ratio evolution

Table 5 Constitutive properties for the lithiation problem

5.1 Numerical lithiation experiment with increased Swelling parameter

The question of applicability of the present algorithm to the lithiation of silicon. The key difficulty is the volume ratio, which is relatively low in the present case (cf. Fig. 13b), but can reach 3 in the case of silicon, cf. [7]. To assess this specific Algorithm capability, we use the properties in Table 5 but with \(\Phi =6\times 10^{22}~{{{\mathrm {nm^{3}}~\hbox {mol}^{-1}}}}\) to force a larger volume ratio. Figure 14 shows the resulting effect of \(\Phi \) with \(\Delta t=0.01\). We can observe that the present algorithm is perfectly capable of reaching volume ratios of more than 3 and therefore solve the silicon lithiation problem.

6 Conclusions

A staggered algorithm for the coupled Cahn–Hilliard/Equilibrium problem was found to be sufficiently accurate to be used in practice. The screened-Poisson equation allowed the split of the fourth-order Cahn–Hilliard equation in two second-order equations which are solved with low-order finite elements. This is an approximation and depends on the value of the penalty parameter \(\beta \). The two coupling effects: (i) effect of strain gradient in the Chemical potential and (ii) effect of concentration on the stress state, were found to be effectively present and nearly independent of time and step size with our staggered scheme. Both 2D and 3D results were provided and compared with coupled formulations (Di Leo et al. [3] and Miehe et al. [8]) where similar results were obtained. For the lithiation problem, we used a 3D model of the axisymmetric representation in [3] and measured the swelling and SOC with similar results. Promising results will allow the extension to an anisotropic Cahn–Hilliard equation and elastic model, which are required to realistic simulate battery lithiation.