• No results found

3.3 DG for electro catalytic model

3.3.4 Numerical experiments on EC’ model

We have shown in Section 3.2.4 that DGImpl, compared to the pdepe, is the best numerical solver of the ETO model. Since the EC’ model can be reduced to the ETO model, for Kr = 0, then we realise here some numerical experiments to compare the performance of DGImpl and pdepe on the EC’ model. By default, we set the parameters K0, D+, D, D, KA, Kr and ˜CA0total as follow

K0 = 20, D+= 1, Kr = 10000, D= KA= D = 5 and ˜CA0total = 1. (3.95)

Numerical simulation of the concentration profile of species

In order to validate our space discretization, we simulate the concentration profile of A, B, Q, Q+ and Q + Q+, using the DG method combined with the Implicit Euler method. If the species Q and Q+ have the same diffusion coefficient, then according to (3.79), (3.80) and the boundary conditions from (3.19) to (3.21), the sum ˜S of the dimensionless concentration of the species Q and Q+ is governed by (3.58), as for ETO model. We use DGImpl to solve (3.85) (obtained with the DG discretization) subject to (3.87) for

K0 = 20, D+ = 1, Kr = 10000, D = KA = D = 5 and ˜CA0total = 1.

For all z and ˜t, we respectively plot the dimensionless concentrations ˜CQ, ˜CQ+, C˜B, ˜CA and ˜S in Fig 3.19(a), Fig 3.19(b), Fig 3.19(c), Fig 3.19(d) and Fig 3.19(e).

Note that in Fig 3.19(e), we have ˜S = 1, ∀x, ˜t as expected. Fig 3.5(a), Fig 3.5(b), Fig 3.19(a) and Fig 3.19(b) show that the diffusion layer of the species Q and Q+ is larger in ETO mechanism compared to EC’ mechanism. This is expected since the specie Q is quickly refurbished by the catalytic reaction in the EC’ mechanism.

(a)

(b)

(c)

(d)

(e) Dimensionless concentration profile ˜CQ+ ˜CQ+

Figure 3.19: Dimensionless concentration profile of the species A, B, Q and Q+ for K0 = 20, D+ = 1, Kr = 10000, D = KA = D = 5 and ˜CA0total = 1. For all z and ˜t, we respectively plot the dimensionless concentrations ˜CQ, ˜CQ+, ˜CB, C˜A and ˜S in (a), (b), (c), (d). We also plot in (e) the dimensionless concentration S = ˜˜ CQ+ ˜CQ+. Note that in (e), we have ˜S = 1, ∀x, ˜t as expected.

We compare the convergence and the efficiency of the solvers pdepe and DGImpl

with respect to the time and space discretization, while computing the concentration profile of the species A, B, Q and Q+ at the final time ˜t2.

Firstly, we examine the convergence and the efficiency with respect to the time discretization. To do so, we compute the dimensionless concentration profile of the species A, B, Q and Q+ at the final time, using pedpe and DGImpl, for the each time step ∆ti = 2i∆t0, for i = 0, · · · , 4. By considering the concentration profile associated to the finest time step ∆t0as exact concentration, we compute the relative error associated to the time step ∆ti, i ∈ {1, · · · , 4} by the relative error Ei1,r decrease with the time step and the curves associated to the both solvers are parallel. We can conclude that the solvers pedpe, DGImpl converge in time and have the same order of convergence with respect to the time step. Note that in Fig 3.8(b), for a given relative E0, we have

Tpdepe0 > TDG0

Impl, (3.97)

where Tr0 is the CPU time spends by the solver r = pdepe, DGImplfor the computa-tion of ˜CA, ˜CB, ˜CQ and ˜CQ+ at the time ˜t = ˜t2 such that Ei1,r

0 = E0 . Thus DGImpl is the most efficient solver with respect to the time discretization.

(a) (b)

Figure 3.20: Convergence and the efficiency with respect to the time dis-cretization while computing ˜CA, ˜CB, ˜CQ and ˜CQ+ with the solvers pdepe and DGImpl. The convergence and the efficienciness in this case are respectively il-lustrated by plotting Ei1,r vs ∆ti in (a) and Ei1,r vs CPU time in (b) for i = 1, · · · , 4.

(a) shows that the solvers pedpe and DGImpl have the same order of convergence with respect to the time step, but DGImpl is more accurate. (b) shows that DGImpl is more efficient, with respect to the time step, to compute the concentration of the species Q and Q+ at the final time ˜t2.

Finally, we examine the convergence and efficiency with respect to the mean of the space step by computing the concentration profile of the species A, B, Q and Q+ at the final time, using pedpe and DGImpl, for the each partition Ωi, for i = 1, · · · , 5. The partitions Ωi , for i = 2, · · · , 5 are obtained by splitting each element of Ω1 into i equidistant elements, for a given partition Ω1. By considering the concentration profile associated to the finest space step H5 of the partition Ω5 as exact concentration, we compute the relative error associated to the mean of the space step, Hi of the partition Ωi, i ∈ {1, · · · , 4}, as follow the relative error Ei2,r decrease with the mean of the space step Hi for all r = pdepe, DGImpl. It also shows that Ei2,pdepe > Ei2,DGImpl for a given time step ∆t.

Therefore the solver DGImpl is more accurate than pdepe with respect to the space discretization. Fig 3.21(b) shows that for a given relative E0, we have Tpdepe0 >

TDG0 Impl, where Tr0 is the CPU time spends by the both solvers for the computation of the dimensionless concentration ˜CA, ˜CB, ˜CQ and ˜CQ+ such that Ei8,r

0 = E0 at the time ˜t = ˜t2. Thus DGImpl is the most efficient solver with respect to the space discretization.

(a) (b)

Figure 3.21: Convergence and the efficiency with respect to the space dis-cretization while computing ˜CA, ˜CB, ˜CQ and ˜CQ+ with the solvers pdepe and DGImpl. The convergence and the efficiency are respectively illustrated by plotting Ei1,r vs Hi in (a) and Ei1,r vs CPU time (b). (a) shows that the solvers pedpe and DGImpl have the same order of convergence with respect to the space step. (b) shows that DGImpl is more efficient, with respect to the space step, to compute the concentration of the species A, B, Q and Q+ at the final time ˜t2.

Numerical simulation of the dimensionless voltammogram

We compare the voltammograms obtained using DGImpland Matlab’s solver pdepe.

This comparison is illustrated in Fig 3.22. We plot in Fig 3.22(a) both simulated voltammograms and the zoom of a portion of their curve. Note that in Fig 3.22(a), the voltammogram obtained with pdepe present some oscillations. We plot in Fig 3.22(b), the absolute value of the difference between both voltammograms. It shows that despite the oscillation of the voltammogram obtained with pdepe, both voltammograms are almost the same since we have

Gpdepe(tn) − GDGImpl(tn)

< 0.12,

where Gpdepe and GDGImpl respectively represent the current obtained with pdepe and DGImpl.

(a) (b)

Figure 3.22: Comparison of the dimensionless voltammograms obtained by DGImpl and Matlab’s solver pdepe for the EC’ model with K0 = 20, D+ = 1, D = D = KA = 5, Kr = 10000 and ˜CA0total = 1. We plot in (a) both voltam-mograms and a the highlight of their portion. See in (a) that the voltammogram obtained with pdepe present some oscillations but the one obtained with DGImpl doesn’t. We plot in (b) the absolute value of the difference between both voltam-mograms. it shows that despite the oscillation of the voltammogram obtained with pdepe, both voltammograms are almost everywhere the same.

We now examine the convergence and the efficiency of the solvers pedpe and DGImpl with respect to the time and space discretization, while computing the dimensionless current. To do so, we firstly simulate the dimensionless voltammogram using the solvers pedpe and DGImplfor all time step ∆ti = 2i∆t0, for i ∈ {0, · · · , 4}.

By considering the dimensionless current associated to the finest time step ∆t0 as the exact dimensionless current, we compute the relative error associated to the time step ∆ti = 2i∆t0, for i ∈ {1, · · · , 4} using (3.69). For ∆t0 = 0.0269, we plot Ei4,r vs

∆ti in Fig 3.23(a) and Ei4,r vs CPU time in Fig 3.23(b) for i ∈ {1, · · · , 4}. Note that in Fig 3.23(a), the relative error Ei4,r tend to zeros with the time step for all r = pdepe, DGImpl. therefore both solvers converge with respect to the time step while simulating the voltammogram. Fig 3.23(b) shows that for a given value E0, DGImpl compared to pdepe will spend less time to simulate the dimensionless voltammogram with a relative error equal E0. Thus DGImpl is more efficient, with respect to the time discretization, than pdepe to simulate the dimensionless voltammogram.

(a) (b)

Figure 3.23: Convergence and the efficiency of pdepe and DGImpl with respect to the time discretization while simulating the dimensionless voltammogram. We plot Ei4,r vs ∆ti in (a) and Ei4,r vs CPU time in (b) for i ∈ {1, · · · , 4}. Note that in (a), the relative error Ei4,r tend to zeros with the time step for both solvers, meaning that the solvers converge with respect to the time step while simulating the voltammogram. (b) shows that for a given value E0, DGImpl compared to pdepe will spend less time to simulate the dimensionless voltammo-gram with a relative error equal E0. Thus DGImpl is more efficient with respect to the time discretization while simulating the dimensionless voltammogram.

Finally, we examine the convergence and the efficiency of pdepe and DGImpl with respect to the mean of the space steps while simulating the dimensionless voltammogram We simulate the dimensionless voltammogram using the solvers pedpe and DGImpl for all partition Ωi, i = 1, · · · , 5. The partitions Ωi , for i = 2, · · · , 5 are obtained by splitting each element of Ω1 into i equidistant ele-ments, for a given partition Ω1. By considering the dimensionless voltammogram associated to the finest mean space step H5 of the partition Ω5 as exact dimen-sionless voltammogram, we compute the relative error Ei5,r associated to the mean space step Hi of the partition Ωi, i ∈ {1, · · · , 4} using (3.70). For H5 = 0.0582, we plot Ei5,r vs Hi in Fig 3.24(a) and Ei5,r vs CPU time in Fig 3.24(b) for i = 1, · · · , 4.

Note that in Fig 3.24(a), the relative error Ei5,r tend to zeros with the mean space step for the solvers pdepe and DGImpl. Then the both solvers converge with re-spect to the mean space step while simulating the dimensionless voltammogram.

Fig 3.14(b) shows that for a given value E0, DGImpl compared to pdepe will spend less time to simulate the dimensionless voltammogram with a relative error equal E0. Thus DGImpl is more efficient than pdepe while simulating the dimensionless

voltammogram.

(a) (b)

Figure 3.24: Convergence and the efficiency of pdepe and DGImpl with respect to the mean of the space steps while simulating the dimensionless voltammogram. We plot Ei5,r vs Hi in (a) and Ei5,r vs CPU time in (b) for i = 1, · · · , 4. Note that in (a), the relative error Ei5,r tend to zeros with the mean space step for pdepe and DGImpl. Then both solvers converge with respect to the mean space step while simulating the dimensionless voltammogram. (b) shows that for a given value E0, DGImpl compared to pdepe will spend less time to simulate the dimensionless voltammogram with a relative error equal E0. Thus DGImpl is more efficient with respect to the space discretization while simulating the dimensionless voltammogram.

3.4 Summary

In this chapter, we have developed step by step a novel numerical method, based on the DG space discretization, to solve the governing equations of the cyclic voltam-metry models and simulate its signal response. The finite DG space is constructed with the orthonormal shifted Legendre polynomials, which reduced the mass matrix to the identity matrix.

To that end, we initially investigate in Section 3.2, the DG method for the ETO models, since it has an analytical results from Aoki et al.[9], that can be used to validate the numerical solution. We introduced the dimensionless parameters to transform the linear governing equations into the dimensionless one, which is a time dependent PDEs. Using the DG space discretization, we transformed the dimensionless governing equations into an ODEs. The obtained ODEs is then solved with implicit Euler or Exponential time differencing method. We performed various

numerical experiments in Section 3.2.4, to validate and compare our solver with Matlab’s solver pdepe. Contrary to expectations, while combine with the DG spatial discretization, the standard implicit time integrator out performs the methods such as the ETD method and adaptive time stepping method ode15s. We also see that the DG method performs better than the standard FE method.

We finally investigate in Section 3.3, the DG method for the EC’ models, which is described by a non linear equations. The same process as for ETO model is used to solve the dimensionless equations of the EC’ model. Once again, various numer-ical experiments performed in Section 3.3.4, have shown that our novel numernumer-ical method, constructed by the combination of DG space discretization and Euler time discretization, is much more efficient to investigate EC’ model.

Now that an efficient solver is proposed to simulate the signal response of the cyclic voltammetry for some given parameters, we will derive in the next chapter the adjoint equation of the inverse model. The adjoint equation will allow us the compute efficiently the gradient necessary to invert the forward model, while using the gradient descent algorithm.

One dimension Inversion of Cyclic Voltammetry models

Contents

4.1 Introduction to the inverse problem . . . 90 4.2 Adjoint method for ODE-constrained optimization . . . 92 4.3 Numerical inversion of the ETO model . . . 96 4.4 Numerical inversion of the EC’ model . . . 109 4.5 Summary . . . 122 Central to this chapter is the construction of the numerical process to find all the parameters of the cyclic voltammetry models ETO and EC’ (investigated in the previous chapter) from the results of the measurement of the current. This approach seeks the quantitative agreement of the modelling of the cyclic voltammetry with results of the experimental measurement of the current. To achieve this goal, the following steps are taken: we give in Section 4.1 an overview of inverse theory and specifically define the inversion problem of cyclic voltammetry models. Then we show how the adjoint method is used to solve our inversion problem. Finally we combine the DG method, Implicit Euler method and the adjoint method to respectively invert ETO and EC’ model in Section 4.3 and Section 4.4. The results of these numerical inversions are then compared to the results obtained using the MATLAB code pdepe with the finite difference method (FD) used to compute the

gradient.

The novel contribution here is the inversion of the cyclic voltammetry models with the combination of the DG discretization, Impl time integrator and the adjoint method. The performance of our numerical inversion method is tested against a commercial MATLAB code for the inversion of synthetic data.

4.1 Introduction to the inverse problem

Generally, the purpose of collecting data is to gain meaningful information about a physical system or phenomenon of interest. However, in many situations the quan-tities that we wish to determine, which we call model parameters, are different from the quantities we are able to measure, which we call data. If the data depends, in some way, on the model parameters, then the data at least contains some informa-tion about the model parameters.

The forward problem is defined as mapping of model parameters in a functional space P, typically a Banach or Hilbert space, to the space of data G, typically another Banach or Hilbert space. It can be mathematically described as follow

G = F(p), for p ∈ P, G ∈ G, (4.1)

where F is a known function, p represent the model parameters and G is the mea-sured data [144, 21].

Starting with knowledge of the measured data G in G, the problem of trying to reconstruct the model parameters p in P is called an inverse problem such that (4.1) holds or an approximatively holds due to the error in the measurement. However, the resolution of an inverse problem is capable of doing more than estimating model parameters. It can also be used to bound the range of acceptance of model pa-rameters, estimate the uncertainties in the model papa-rameters, to do the sensitivity analysis of the data or to find what kind of data are best suited to determine the set of model parameters, see for example [210, 119, 7, 222, 209] for more details. If the inverse problem does not have a unique solution p in P, it is called an ill-posed

inverse problem [162].

Inverse problems are frequently used in a large variety of problems in sciences:

curve fitting, Acoustic Tomography, X-ray Imaging, factor analysis [165], Gravita-tional waves [155], satellite navigation [112, 121], earthquake response signals [183].