A scalable DG solver for the electroneutral Nernst-Planck equations
간접 관련 수소연료전지 · (7) MEA(막전극접합체) (5) 연료전지용 수분제어장치(가습기)(6) PEM(고분자전해질막)
기본 정보
- 저자
- DOI
- 10.1016/j.jcp.2022.111859
- 저널
- Journal of Computational Physics
- 발행년도
- 2022
- 발행기관
- Elsevier BV
- 피인용수
- 7
- 라이선스
- publisher-specific-oa
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1016/j.jcp.2022.111859
- 토픽
- Fuel Cells and Related Materials
- OpenAlex ID
- W4312077318
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 수소연료전지 · (7) MEA(막전극접합체)
- 부 분야
- (5) 연료전지용 수분제어장치(가습기), (6) PEM(고분자전해질막)
- R&D 측면
- 분석·모델링
- 확신도
- 0.80
- 근거 용어
- Nernst-Planck equations, electrochemical systems, porous electrode, flow-plate reactor, ion transport
- 판단 근거
- 이 논문은 전기화학 시스템(electrochemical systems) 내 이온 이동을 설명하는 Nernst-Planck 방정식을 수치적으로 해결하기 위한 고차 Discontinuous Galerkin 기법을 다룹니다. 이는 코오롱인더스트리의 수소연료전지(PEMFC) 핵심 요소인 MEA 및 다공성 전극(porous electrode) 내의 물질 전달 및 전기화학적 거동을 시뮬레이션하는 데 활용될 수 있는 수치 해석 방법론입니다.
- R&D 활용 포인트
- PEMFC의 MEA(막전극접합체) 및 가스확산층(GDL) 내 이온/가스 농도 분포 및 전위 분포를 예측하는 고정밀 시뮬레이션 모델 개발에 활용 가능합니다.
- 평가 입력
- 섹션 본문 69,634자 중 30,032자 발췌
초록
초록이 없습니다.
본문 73,323자
본문 펼치기
섹션 본문 225문단 · 68,278자
(제목 없음)
1The robust, scalable simulation of flowing electrochemical systems is increasingly important due to the synergy between intermittent renewable energy and electrochemical technologies such as energy storage and chemical manufacturing. The high Péclet regime of many such applications prevents the use of off-the-shelf discretization methods. In this work, we present a high-order Discontinuous Galerkin scheme for the electroneutral Nernst-Planck equations. The chosen charge conservation formulation allows for the specific treatment of the different physics: upwinding for advection and migration, and interior penalty for diffusion of ionic species as well the electric potential. Similarly, the formulation enables different treatments in the preconditioner: AMG for the potential blocks and ILU-based methods for the advection-dominated concentration blocks. We evaluate the convergence rate of the discretization scheme through numerical tests. Strong scaling results for two preconditioning approaches are shown for a large 3D flow-plate reactor example.
Introduction
2With the steady transition to renewable energy comes a surge of intermittent electricity [1,2]. Fortunately, various electrochemical technologies such as energy storage and electrochemical manufacturing can capitalize on this otherwise wasted energy [3,4]. To handle the rise of renewable energy, the development and scaling-up of these technologies is crucial. Naturally, this brings a need for simulation to aid design of electrochemical devices at the industrial scale.
3Such simulations require the solution of highly coupled systems of partial differential equations (PDEs). An important model in the presence of fluid flow is the Nernst-Planck (NP) equation, which describes the transport of an ionic species by advection, diffusion and electromigration [5]. For multi-ion transport, the system consisting of an NP equation for each species can be closed by a Poisson equation for the electric potential. However, the Poisson equation operates on a much smaller lengthscale and is thus challenging to solve computationally [6]. Due to the scale separation, it is commonly replaced by the electroneutrality condition: an algebraic equation for the ionic concentrations. For the electroneutral system, arriving at a steady-state solution is a challenging numerical task and therefore the discretization scheme has to be chosen with care. In particular, specific treatment is required for the typically advection-dominated nature of the flow. The considered physical equations have been successfully discretized with several methods in the past. The authors in [7] use a multi-dimensional upwinding method similar to a finite volume approach. A continuous Galerkin finite element method has to employ a stabilization scheme because of the advection-dominated system, which was shown in [8] using a Variational Multiscale Method. There have been attempts at onedimensional problems using the Discontinuous Galerkin (DG) Method [9,10], which showed promising results and motivated this research. To the best of the authors' knowledge, none of the previously mentioned references looked into the benefits of high-order DG spatial discretizations, which are frequently used in advection-dominated transport and compressible flow applications [11].
4After discretization and linearization, large, sparse linearized systems must be solved. Iterative methods using appropriate preconditioning techniques [12] are key to obtaining a scalable solver. Designing preconditioners for problems with several, simultaneous, coupled physical phenomena is especially challenging since different parts of the problem may require different treatments. In the case of electroneutral ion transport, the equations are elliptic with respect to the electrical potential but hyperbolic with respect to the concentration variables. Scalable solvers for this problem are not available in commercial tools, where directs solver are used. This is especially restrictive when aiming for industrial scale 3D simulations, as well as the simulation of porous electrodes at the resolved pore-scale.
5In this paper, we present a high-order DG spatial discretization and scalable preconditioning approaches for the electroneutral Nernst-Planck equations. The electroneutral system is arranged in a charge-conservation formulation that is necessary for the proper penalization of the potential terms in the DG scheme. Additionally, this formulation also allows for block preconditioning with specific treatment of the potential block and concentration blocks.
6In section 2, the equations for the relevant electrochemical physics in an electroneutral setting are described. We explain how to reorder the equations and exploit the electroneutrality condition to eliminate a species variable and construct the charge conservation equation. Next, in section 3, we detail the spatial discretization process using the DG finite element method including necessary treatment for the hyperbolic and elliptic parts of the resulting system. Then, in section 4, we outline our approach to numerically precondition and solve the resulting discrete nonlinear problem. Finally, in section 5, we perform a convergence test for our discrete scheme and show scaling results for a large three-dimensional, industry-relevant problem.
Governing Equations
7We consider the equations for electroneutral multi-ion transport. First, we describe the standard Electroneutral-Nernst-Planck model, as well as appropriate boundary conditions for a flow-plate reactor. Then, we discuss alternative formulations including the Charge-Conservation-Nernst-Planck model, which will be used for our Discontinuous Galerkin scheme in section 3. A nondimensionalization of that model is also given.
Electroneutral Nernst-Planck equation
8We consider the flow of a dilute electrolyte solution containing m ≥ 2 chemical species in a domain Ω ∈ R d , d = 1, 2, or 3. In the presence of an electric field, the mass transport is described by the Nernst-Planck equation [5]. For simplicity, we do not consider the transient case, although our approach would still be applicable.
9At steady state, the conservation of mass of each species k = 1, . . . , m is given by
10where c k is the molar concentration of species k, D k is the molecular diffusion coefficient, u is the velocity of the electrolyte, z k is the valence (charge number), µ k is the mobility constant, F is the Faraday constant, Φ is the electric potential in the electrolyte, and R k is a reaction term. The first term in (1) describes molecular diffusion, the second, advection, and the third, electromigration. The mobility constant is given by the Nernst-Einstein relation [5]
11where R is the universal gas constant, and T is the thermodynamic temperature.
12The system currently consists of m equations (1), and m + 1 unknowns: the m concentrations c k and the potential Φ. An additional equation is required to complete the system. A commonly-used relation is the electroneutrality approximation
13which states that there is no charge separation and that neutrality is maintained everywhere. This approximation is obtained from the Poisson equation and is appropriate when considering length scales greater than nanometers [6].
14In [8], the system consisting of (1) and (3) is called the Electroneutrality-Nernst-Planck (ENP) model.
15For convenience, we denote the advection-migration transport as q k = u − z k µ k F ∇Φ so that (1) can be written as
16We now provide boundary conditions that are appropriate for a flow plate reactor. The boundary ∂Ω is partitioned with respect to the direction of the velocity at the boundary into the inlet boundary Γ in , the outlet boundary Γ out , the wall boundary Γ wall and the electrode boundary Γ elec . We have
17where n is the outward normal, so that ∂Ω = Γ in ∪ Γ out ∪ Γ wall ∪ Γ elec . Each boundary is such that Γ i ∩ Γ j = ∅. The location of the wall and electrode boundaries are determined beforehand. The boundary conditions are given by
18where g k represents electrochemical reactions at the electrode surface. In our numerical experiments, we will consider the specific case of a simple n-electron transfer redox reaction Ox + ne − → Red, where the current density J n at the electrodes is given by the Butler-Volmer equation
19where J 0 is the exchange current density, c o and c r are the concentrations of the oxidant Ox and reductant Red, respectively, c * o and c * r are reference concentrations, α 1 and α 2 are the anodic and cathodic charge transfer coefficients, respectively, n is the number of electrons in the reaction, and Φ app is the applied potential. The reaction rate in (7) is given by g k = Jn nF if k is the oxidant, g k = − Jn nF if it is the reductant, and g k = 0 otherwise.
Alternative formulations
20Alternative formulations of the ENP system (1) and (3) have different advantages with respect to the numerical solution [8].
21In our case, we are interested in the Discontinuous Galerkin (DG) finite element method [13]. In particular, we will consider upwinding techniques for the advection and migration terms. The current formulation, ENP, is problematic with respect to the stabilization and penalization of the potential Φ. Indeed, the mass conservation equations (1) will be treated as transport problems for the concentrations, using an upwinding scheme, leaving Φ untreated. In this electroneutral Nernst-Planck system, the electroneutrality approximation replaces the Poisson equation, where stabilization and penalization appropriate for an elliptic problem could have been used. We need an equation that plays this role for Φ.
22We formulate a charge conservation equation by summing over all conservation of mass equations (1) weighting each by z k F . The advection terms cancel due to electroneutrality (3), and we obtain
23(10) However, we note that the system consisting of (1) and (10) is linearly dependent. To circumvent this, one of the concentration unknowns can be eliminated using the electroneutrality condition. Without loss of generality, we eliminate the concentration c m using the substitution
24assuming that z m = 0. Combining (10) and (11), we obtain
25This conservation of charge equation replaces the conservation of mass of species m in the system. The system now consists of m equations: conservation of mass equations (1) for k = 1, . . . , m − 1, and a conservation of charge equation (12), and m unknowns: concentration unknowns c k for k = 1, . . . , m − 1, and the electric potential Φ. As in [8], we call this formulation the Charge-conservation-Nernst-Planck (CNP) model. In terms of the DG scheme, stabilization and penalization of c m is no longer needed since it is no longer an unknown of the system. We can instead treat (12) as an elliptic equation for Φ in terms of the DG stabilization and penalization.
Nondimensionalization
26Here we perform a nondimensionalization of the CNP model consisting of (1) and (10) and boundary conditions (5) to (8). Note that this scaling process generally helps numerical algorithms. Indeed, for the considered test cases, this greatly accelerates the convergence of the iterative methods.
27Let the following nondimensional variables:
28and the differential operator with respectx
29Substituting (13) and (14) into (1), we obtain
30so thatĉ m is eliminated usinĝ
31In order to nondimensionalize the charge conservation equation (10), we introduce the reference concentration c ref to obtain
32The boundary conditions (5) to (8) become
33In the specific case of the Butler-Volmer equation (9), if k is an oxidant, (21) becomes
Discontinuous Galerkin method
34In this section, we introduce a Discontinuous Galerkin (DG) scheme for the CNP model (4) and (12). After reviewing preliminary DG concepts, we provide DG schemes for a hyperbolic and an elliptic equation. The resulting numerical fluxes are then used for the full system (4) and (12). For generality, we provide the scheme for the dimensional equations instead of the nondimensionalized version from section 2.3.
Preliminaries
35We begin by introducing the appropriate functional notation. Let T h be a subdivision of Ω with element K ∈ T h . The broken Sobolev spaces are defined as
36Let Γ = ∪ K∈T h ∂K denote the set of element boundaries. The restrictions of functions in H 1 (T h ) to Γ are called traces and belong to the function space
37Denote the space of polynomials of degree p on each element κ with Q p . A proper finite element space is defined as
38Next we introduce some trace operators needed for the numerical fluxes. For u ∈ T (Γ), we define the average {u} and jump [[u]] on interior faces as
39and for q ∈ [T (Γ)] d ,
40Jumps on exterior faces are defined as
Applied to the CNP model
41Following a combination of [14,15,16], we derive a Discontinuous Galerkin formulation for the CNP model. In this section, we only consider zero-Dirichlet boundary conditions for simplicity. The full scheme with boundary conditions (5) to (8) is given in section 3.3.
42Analyzing (4) we can see that it consists of a diffusion, advection-migration, and reaction term. Each term has to be treated carefully in order to achieve a convergent DG discretization.
43We multiply (4) by a test function v and integrate over the domain Ω.
44The diffusion term can be treated exactly like in [16] with the appropriate flux choiceŝ
45where δ p is a penalty parameter that depends on the polynomial order p of the finite elements. In [11], it is given by
46where C IP > 0 needs to be large enough for stability, and h is the cell diameter.
47The diffusion term results in
48The advection-migration term combines the advection effect from the transport velocity v and the migration effect from the potential gradient ∇Φ, which can be treated with the combined variable q k . This combined term is treated as in [15] with the upwind flux, resulting in
49Since the reaction term is cell-local, and it is assumed not to contain derivatives of the primary solution variables, no further treatment is needed. Note that the gradient potential term ∇Φ in the mass conservation equations (4) is only treated like a velocity in an advective term for the concentrations.
50A penalty term is required for the stability of the DG scheme and that is why we are using the CNP model. Indeed, the gradient potential term in the charge conservation equation (12) will be treated like an elliptic term, with appropriate penalization. Conversely, since we have already penalized the concentration gradients ∇c k in our treatment of (4), it is not required to do so for (12).
51We introduce the following short-hand notation for (12)
52which results in
53The fluxes for the concentration term are chosen aŝ
54Without loss of generality, the case with only two species in the system (k = 2) results in
55where a 1 = a 12 . For the potential term, we choose fluxes with interior penaltŷ
56This results in
57with the standard symmetric interior penalty flux. Note that in this example we assume the same test function space for all concentrations c k and the potential Φ. Therefore, we use the same penalty parameter δ p . If the polynomial spaces have different orders, the penalty parameters for both terms should be chosen accordingly. In our numerical experiments, we use (31) with C IP = 10.
Scheme
58Let the short-hand notation for the current at the electrode boundary
59where g k are the reaction rates from (7). The DG scheme for the problem eqs. (4) to (8) and (12) is given by: Find
60for all v m ∈ V p h . Recall that the eliminated concentration c m can be recovered from the substitution (11). Note that in (43b), the inlet boundary conditions cancel due to electroneutrality.
Numerical details and preconditioning
61A crucial aspect in the practical usability of this specific discretization is the ability to solve it efficiently when applied to real world problems. Domains for such applications are usually three-dimensional and nonlinear couplings appear through species reactions. Consequently, the numerical solution approach has to be scalable on a desired hardware architecture to provide feasible turnaround times for experiments. As a first performance measure, we are focusing on hexahedral mesh elements, which allow for a tensor product element approach [17], a fact that we exploit in our implementation (note that we are not exploiting Gauss-Legendre-Lobatto nodes, because we tend to use higher-order quadrature rules compared to the polynomial degree).
62After discretization, the nonlinear system arising from (43) has to be linearized and solved frequently. To solve the nonlinear system, we employ a Newton method along with backtracking linesearch [18]. To ensure a scalable linear solving procedure we have to employ appropriate preconditioning techniques [12].
63We can rewrite (43) as a block residual equation
64where R Φ is the residual of the discretized charge conservation equation (43b), and R ci , i = 1, . . . , m − 1, correspond to the residuals of the mass conservation equations (43a). Linearization of the residual R results in the block matrix
65This block system is used in the following sections to determine preconditioning strategies.
Preconditioning for p = 1
66We first describe the preconditioning strategy for a piecewise linear discretization.
67When dealing with block systems resulting from the discretizations of systems of PDEs with different underlying physics, it is usually not sufficient and never optimal to use the same preconditioner for each block. Analyzing the linearized block system (44), we immediately notice that the A ΦΦ block only consists of terms that resemble a Poisson equation, for which preconditioners like Algebraic Multigrid (AMG) [19] combined with Conjugate Gradient (CG) iterations work well.
68Continuing with the diagonal, the A c k c k blocks are not as simple and involve a diffusive term as well as a (usually dominant) advective term with anisotropic coefficients. In this case, classical AMG will not work well since its heuristics require elliptic-like properties. Instead, we apply preconditioned GMRES iterations [20] to the A c k c k blocks, considering two different preconditioners. The first preconditioning approach is an additive Schwarz method (ASM) [21] where an incomplete LU factorization with 0 fill (ILU0) [22] is applied to each subdomain. The subdomains are given by the parallel decomposition of the mesh. The second approach is a Geometric Multigrid (GMG) [23] preconditioner where that same ASM-ILU0 method is used as a smoother. The coarsest grid can be solved directly with a full LU factorization. Although, naively solving the coarse grid this way does not scale to a large number processors when parallel performance is desired. Because the coarse grid and therefore the coarse discretization is usually small, even on computations with hundreds of processors, the communication between the processors is the bottleneck for performance. A solution is to redistribute and duplicate the coarse grid matrix to predefined subsets of processors. This technique performs redundant work but improves the overall solve time as shown in [24].
69We choose a block-triangular preconditioner of the form
70Inverting a block-triangular matrix requires the inversion of the diagonal blocks, which are approximated by
71in the first approach, and
72in the second.
Preconditioning for high order
73AMG is more memory intensive for higher-order discretizations. In this case, p-multigrid has been successful in the past [25,26]. For the A ΦΦ block, we consider a p-multigrid strategy where AMG is applied to a lower-order pcoarsened problem. This coarsened problem uses the same DG discretization for p = 1, where the penalization terms are appropriately updated for the lower order. We include element-wise Jacobi as a relaxation scheme, where interelement contributions are ignored to maintain locality.
74For the concentration blocks, we consider the same additive Schwarz method described for p = 1. We do not consider the use of GMG for the high-order case.
75The block preconditioner (45) with the described p-multigrid method for the potential block exhibits convergence issues for some numerical experiments of section 5 for p = 3. It is unclear to the authors why this is the case. Instead, a different ordering of the preconditioning steps works better: solving the concentration blocks first, then the potential blocks. We theorize that the couplings are important in the low-order coarse problem but have only heuristic evidence. We thus use the following preconditioner:
76Inverting this matrix only requires the inversion of the diagonal blocks, which are approximated by
Implementation
77The implementation is part of the EchemFEM package [27]. It is realized using firedrake [28] as a finite element discretization tool, which allows for automated code generation and optimization. We leverage the capability to generate kernels of tensor product finite elements [17] on quadrilateral [29] and extruded hexahedral meshes [30]. Note that the algorithms and discretization techniques presented here can also be applied to triangular and tetrahedral elements. Furthermore, firedrake provides the necessary infrastructure to realize the presented GMG preconditioner [31]. The nonlinear and linear solves are handed off to the PETSc [32] linear algebra backend, and BoomerAMG [33] from the hypre library [34] is used for the AMG implementation. For higher-order simulations, we use firedrake's matrix-free capabilities [35]. In appendix Appendix A we provide all solver options, along with relative tolerances of each inner Krylov method, the outer FGMRES [36], and the outer Newton solver.
78To help the convergence of Newton's method, we start with a constant initial guess for the concentrations using the inlet values c in k . For the potential, we obtain an initial guess by first solving the charge conservation equation with constant concentrations (a Poisson equation). For this initial potential solution, we use the solver for the potential block defined in appendix Appendix A, with a conjugate gradient tolerance of 10 −2 .
Numerical results
79In this section, we investigate the numerical performance of the DG scheme and preconditioning strategies. We perform a convergence test for polynomial orders p = 1, 2, 3 and strong scaling tests for a large parallel plate flow channel example for p = 1 and p = 3. All tests are performed in three-dimensional domains.
Convergence tests
80In section 3, we established a discretization scheme based on well-known DG methods. As a first step, we have to make sure that the presented method provides the expected accuracy. Optimally, we would be able to prove an error estimate and therefore a theoretical convergence rate through analysis of (43).
81Another, although less thorough, way of determining the convergence rate is by solving a manufactured problem and comparing the solution against the known analytical solution. The way the scheme was set up, we expect the convergence rate to be similar to the minimum rate of each individual treated equation. Therefore, the convergence rate of the concentration variables should be close to that of an advection-diffusion-reaction equation, i.e. p + 1 2 in the advection-dominated regime [37], and the convergence rate of the potential variable should be close to that of a diffusion equation, i.e. p + 1 [16].
82We use the nondimensional version of a two-ion system with inverse Péclet numbersD 1 = 5 × 10 −6 andD 2 = 10 −5 , and charge numbers z 1 = 2 and z 2 = −2. The analytical manufactured solution is chosen as
83on the domain Ω ∈ (0, 1) 3 . All boundary conditions on ∂Ω are prescribed using the exact solutions. Additionally, a parabolic velocity profile is defined with u = (6y(1 − y), 0, 0) in the whole domain. We choose an initial mesh size using 64 hexahedral elements with a polynomial order of p = 1 and compute the L 2 error norms of each variable
84Then, we subsequently halve the element size h e using uniform refinement. The process is repeated for polynomial orders p = 2 and p = 3. Figure 1 shows the results for this test and one can observe a convergence rate of approximately p + 1 for Φ. For c 1 , the rate appears to be p + 1 for the coarser meshes, until the later refinements reveals the asymptotic rate of p + 1 2 . This asymptotic rate is not reached for p = 3.
85Looking at these results, one has to keep in mind that we determined the convergence rates on a Cartesian grid, and they might deteriorate on unstructured or curved grids [38,39].
86We now briefly investigate how the accuracy of the method relates to computational cost. For the manufactured solution problem described above, we calculate the total computational time and total L 2 error as we vary the size of the problem. The total error is the sum of the concentration and potential errors. On an Intel 18-core Xeon E5-2695 v4 architecture with 2.1 GHz clock speed, we use two nodes and a total of 64 processors. For p = 1, we use the preconditioner described in section 4.1 with the additive Schwarz method for the concentration blocks, and for p = 3 we use the preconditioner for high order described in section 4.2. In table 1, we provide computational timings and total L 2 errors for p = 1 and p = 3 as we vary the problem size. We note that the computational resources are fixed so there is insufficient memory for the largest high-order case. Additionally, the first row of results is around a thousand degrees of freedom per processor, which is not typically cost-efficient. Even so, the smallest p = 3 problem is twice as accurate and seven times faster than the largest p = 1 problem. It is evident that increasing polynomial order is preferable to mesh refinement when seeking high accuracy results.
Parallel plate flow channel
87We consider a 3D extension of the parallel plate reactor from [7]. A schematic of the reactor is given in figure 2. The distance between the two electrodes is h = 0.01 m, and their length is L = 0.02 m. The inlet and outlet regions included in the domain are of length L a = L b = 0.05 m, and the channel has a width w = 0.06 m.
88The velocity field u = (u x , u y , u z ) in the reactor is given by the parabolic profile Choosing zero-Neumann boundary conditions on xy-faces means that the channel is periodic in the z-direction. For this test case, we choose u avg = 0.03 m s −1 .
89We consider the three-ion system from [7] with an electrolyte solution con- At the electrodes, the electrochemical reaction is given by the Butler-Volmer equation (9) for the reacting ion, Cu 2+ , and no reaction for the other ions. The parameters for the Butler-Volmer equation are γ = 1, α 1 = α 2 = 0.5, T = 298.15 K, n = 2, and c * Cu 2+ is given by the inlet concentration of Cu 2+ in table 2. The applied potential Φ app is zero at the anode and 0.03 V at the cathode. For this redox reaction, Cu 2+ is the oxidant, and the solid copper of the electrode is the reductant (with constant concentration). To introduce variations in the z direction, we consider the following parabolic profile for the exchange current density:
90which has an average ofJ 0 = 30 A m −2 over the width of the channel. We first use a structured hexahedral mesh such that, in the xy-plane, elements are concentrated in the electrode region as illustrated in figure 3, and elements are equally spaced in the z-plane. The coarse mesh of 64 × 16 × 8 elements is uniformly refined three times, resulting in a mesh with 4,194,304 elements. Note that this mesh has elements with large aspect ratios.
91We also consider a mesh where the xy-plane is an unstructured mesh as illustrated in figure 4. Similarly to the structured mesh, the coarse 2D mesh is We now investigate the strong scaling of the preconditioners for the parallel flow plane channel. The experiments are performed on an Intel 18-core Xeon E5-2695 v4 architecture with 2.1 GHz clock speed. Using elements of p = 1 polynomial order results in 100,663,296 degrees of freedom for the structured mesh, and 99,680,256 degrees of freedom for the unstructured mesh.
92We begin with 256 processors (on 8 nodes) and successively double the number of processors and nodes. In figure 5, we illustrate the strong scaling results for both preconditioning approaches described in section 4on the structured mesh described above, and in figure 6 on the unstructured mesh. ASM refers to using the additive Schwarz method with ILU0 on the subdomains as a preconditioner for the concentration blocks, while GMG refers to using a geometric multigrid method with that same ASM as a smoother. For both ASM and GMG, we present solution times and the total number of outer FGMRES iterations. In each case, four Newton iterations are required to reach the prescribed tolerance.
93First, we discuss the scaling results for the unstructured mesh in figure 5. We observe that, overall, ASM is the more expensive method. Further investigation of the iteration counts of the inner GMRES used for the concentration blocks reveals that GMG only takes a few iterations, while ASM often takes around 50-100 iterations (sub-iterations not shown here). Now, in terms of scaling, ASM scales almost linearly until 2,048 processors. However, it is expected that ASM becomes a weaker preconditioner as the number of subdomains increases. For GMG, the scaling is close to being linear form 256 to 1,024 processors. Naturally, the direct solver used for the coarse problem of GMG does not scale linearly and eventually dominates the computational cost at 2,048 processors. Note that there is a decrease in iterations at 512 and 1,024 processors, which may be due to how the mesh is partitioned, thus increasing the performance of the smoother and the apparent quality of the scaling. Recall that we do not have control over the domain decomposition, which in general will not be ideal. In particular, the criticality of the electrode regions should be considered in a more controlled mesh partition. Now we compare the scaling results for the unstructured mesh in figure 6. We observe that both methods have similar almost-linear scaling, with a bump in cost at 2,048 processors. Differently from the structured mesh case, ASM is the least expensive method. In fact, the GMRES iteration count for the concentration blocks for ASM are lower in this case, typically less than 30 (subiterations not shown here). The structured mesh has some elements with very large aspect ratio. This could affect the conditioning of the mesh, resulting in larger number of iterations. We note that the outer GMRES iterations is also lower for the unstructured case.
94Finally, we look at the scaling results for p = 3 and the preconditioning strategy described in section 4.2. We note that the p-multigrid method used for the potential block performs poorly on meshes with high element aspect ratios such as the ones used above. The scaling tests are therefore performed on a mesh with moderate aspect ratios. The width of the channel is changed to w = 0.01 m. We consider an unstructured coarse mesh similar to the one illustrated in figure 4 but with slightly larger elements and extrude it in the zdirection with 6 elements. For p = 3, we uniformly refine the mesh 2 times for a total of 254,208 elements. One more refinement gives 2,033,664 elements, which is used for p = 1. Both problems consist of 48,807,936 degrees of freedom. We display the high-order scaling results in figure 7. We observe that the scaling for p = 3 is about order 0.5, i.e. the cost is halved after quadrupling the number of processors. The computational timings for the smallest case is more than four times higher for p = 3 than p = 1. Nevertheless, this figure does not take into account the numerical accuracy of the results. Indeed, we recall from table 1 that higher accuracy can be obtained for higher-order problems of much smaller sizes. Strong scaling for p = 1 as at best linear, but increasing the polynomial order results in an exponential increase in accuracy.
Conclusion
95In this work, we propose a high-order Discontinuous Galerkin (DG) scheme and block preconditioners for the electroneutral Nernst-Planck equations. We choose a model formulation where the electroneutrality condition is substituted to obtain a charge conservation equation. In the DG scheme, this equation is treated as an elliptic equation for the electrical potential, whereas in the mass conservation equations, an upwind scheme is used for the combined advectionmigration term. In numerical convergence tests, the scheme exhibits a p + 1 order of convergence for the potential and a p + 1 2 order of convergence for the concentrations.
96For p = 1, both proposed block preconditioners use Algebraic Multigrid for the potential block whereas an Additive Schwarz method with ILU is used for the concentration blocks, by itself or as a smoother for a Geometric Multigrid method (GMG). While both methods exhibit decent strong scaling, the GMGbased approach is less expensive on the structured mesh, although its scaling is limited by the direct solver used for the coarse grid solution. For higher order, a p-multigrid method is used for the potential block, where Algebraic Multigrid is applied to the lower-order coarsened problem. The strong scaling is less than linear in the high-order case.
97For future extensions, coupling this solver with fluid dynamics is of particular interest. The Stokes or incompressible Navier-Stokes equations are relevant for flow reactors as well as the pore-scale of porous electrode systems. On the larger length scale, Darcy flow is appropriate for porous electrodes, and its multiphase extension for gas-diffusion electrodes (GDE).
98Further work is needed for preconditioning in the case where electrolyte bulk reactions are present, where reaction rate constants can vary wildly. Porous electrodes are also interesting since cathodic/anodic reactions occur throughout the domain rather than as boundary conditions.
19
99" pc _python_ type " : __name__ + " . " + " Ce llIntegr alPC " , 20
100" a s s e m b l e d _ p c _ t y p e " : " jacobi " , 21 } , 22
101" p m g _ c o a r s e _ m a t _ t y p e " : " aij " , 23
102" pmg_mg_coarse " : { 24 " ksp_type " : " cg " , 25
103" ksp_rtol " : 1e -3 , 26
104" pc_type " : " hypre " , 27 } , 28 } , 29 % For each concentration block k , using the ASM prec ondition er : 30 " fieldsplit_ [k -1] " : { 31
105" ksp_rtol " : 1E -1 , 32
106" ksp_type " : " gmres " , 33
107" pc_type " : " python " , 34
108" pc _python_ type " : " firedrake . AssembledPC " , 35
109" assembled " : { 36 " pc_type " : " asm " , 37
110" pc _asm_ove rlap " : 1 , 38
111" sub_pc_type " : " ilu " 39 } , 40 } ,
112The reduction factor REDFACTOR for the coarse grid redistribution is chosen depending on the number of processors such that the solver sub-communicator always includes exactly 8 nodes. The default overlap for ASM is one element.
113The custom preconditioner CoarsenPenaltyPMGPC is p-multigrid with p = 1 on the coarse level where the proper penalization parameters are used for the DG discretization. The custom preconditioner CellIntegralPC is used to ignore inter-element contributions. These custom solvers are available in the EchemFEM package [27].
Introduction
114With the steady transition to renewable energy comes a surge of intermittent electricity [1,2]. Fortunately, various electrochemical technologies such as energy storage and electrochemical manufacturing can capitalize on this otherwise wasted energy [3,4]. To handle the rise of renewable energy, the development and scaling-up of these technologies is crucial. Naturally, this brings a need for simulation to aid design of electrochemical devices at the industrial scale.
115Such simulations require the solution of highly coupled systems of partial differential equations (PDEs). An important model in the presence of fluid flow is the Nernst-Planck (NP) equation, which describes the transport of an ionic species by advection, diffusion and electromigration [5]. For multi-ion transport, the system consisting of an NP equation for each species can be closed by a Poisson equation for the electric potential. However, the Poisson equation operates on a much smaller lengthscale and is thus challenging to solve computationally [6]. Due to the scale separation, it is commonly replaced by the electroneutrality condition: an algebraic equation for the ionic concentrations. For the electroneutral system, arriving at a steady-state solution is a challenging numerical task and therefore the discretization scheme has to be chosen with care. In particular, specific treatment is required for the typically advection-dominated nature of the flow. The considered physical equations have been successfully discretized with several methods in the past. The authors in [7] use a multi-dimensional upwinding method similar to a finite volume approach. A continuous Galerkin finite element method has to employ a stabilization scheme because of the advection-dominated system, which was shown in [8] using a Variational Multiscale Method. There have been attempts at onedimensional problems using the Discontinuous Galerkin (DG) Method [9,10], which showed promising results and motivated this research. To the best of the authors' knowledge, none of the previously mentioned references looked into the benefits of high-order DG spatial discretizations, which are frequently used in advection-dominated transport and compressible flow applications [11].
116After discretization and linearization, large, sparse linearized systems must be solved. Iterative methods using appropriate preconditioning techniques [12] are key to obtaining a scalable solver. Designing preconditioners for problems with several, simultaneous, coupled physical phenomena is especially challenging since different parts of the problem may require different treatments. In the case of electroneutral ion transport, the equations are elliptic with respect to the electrical potential but hyperbolic with respect to the concentration variables. Scalable solvers for this problem are not available in commercial tools, where directs solver are used. This is especially restrictive when aiming for industrial scale 3D simulations, as well as the simulation of porous electrodes at the resolved pore-scale.
117In this paper, we present a high-order DG spatial discretization and scalable preconditioning approaches for the electroneutral Nernst-Planck equations. The electroneutral system is arranged in a charge-conservation formulation that is necessary for the proper penalization of the potential terms in the DG scheme. Additionally, this formulation also allows for block preconditioning with specific treatment of the potential block and concentration blocks.
118In section 2, the equations for the relevant electrochemical physics in an electroneutral setting are described. We explain how to reorder the equations and exploit the electroneutrality condition to eliminate a species variable and construct the charge conservation equation. Next, in section 3, we detail the spatial discretization process using the DG finite element method including necessary treatment for the hyperbolic and elliptic parts of the resulting system. Then, in section 4, we outline our approach to numerically precondition and solve the resulting discrete nonlinear problem. Finally, in section 5, we perform a convergence test for our discrete scheme and show scaling results for a large three-dimensional, industry-relevant problem.
Governing Equations
119We consider the equations for electroneutral multi-ion transport. First, we describe the standard Electroneutral-Nernst-Planck model, as well as appropriate boundary conditions for a flow-plate reactor. Then, we discuss alternative formulations including the Charge-Conservation-Nernst-Planck model, which will be used for our Discontinuous Galerkin scheme in section 3. A nondimensionalization of that model is also given.
Electroneutral Nernst-Planck equation
120We consider the flow of a dilute electrolyte solution containing m ≥ 2 chemical species in a domain Ω ∈ R d , d = 1, 2, or 3. In the presence of an electric field, the mass transport is described by the Nernst-Planck equation [5]. For simplicity, we do not consider the transient case, although our approach would still be applicable.
121At steady state, the conservation of mass of each species k = 1, . . . , m is given by
122where c k is the molar concentration of species k, D k is the molecular diffusion coefficient, u is the velocity of the electrolyte, z k is the valence (charge number), µ k is the mobility constant, F is the Faraday constant, Φ is the electric potential in the electrolyte, and R k is a reaction term. The first term in (1) describes molecular diffusion, the second, advection, and the third, electromigration. The mobility constant is given by the Nernst-Einstein relation [5]
123where R is the universal gas constant, and T is the thermodynamic temperature.
124The system currently consists of m equations (1), and m + 1 unknowns: the m concentrations c k and the potential Φ. An additional equation is required to complete the system. A commonly-used relation is the electroneutrality approximation
125which states that there is no charge separation and that neutrality is maintained everywhere. This approximation is obtained from the Poisson equation and is appropriate when considering length scales greater than nanometers [6].
126In [8], the system consisting of (1) and (3) is called the Electroneutrality-Nernst-Planck (ENP) model.
127For convenience, we denote the advection-migration transport as q k = u − z k µ k F ∇Φ so that (1) can be written as
128We now provide boundary conditions that are appropriate for a flow plate reactor. The boundary ∂Ω is partitioned with respect to the direction of the velocity at the boundary into the inlet boundary Γ in , the outlet boundary Γ out , the wall boundary Γ wall and the electrode boundary Γ elec . We have
129where n is the outward normal, so that ∂Ω = Γ in ∪ Γ out ∪ Γ wall ∪ Γ elec . Each boundary is such that Γ i ∩ Γ j = ∅. The location of the wall and electrode boundaries are determined beforehand. The boundary conditions are given by
130where g k represents electrochemical reactions at the electrode surface. In our numerical experiments, we will consider the specific case of a simple n-electron transfer redox reaction Ox + ne − → Red, where the current density J n at the electrodes is given by the Butler-Volmer equation
131where J 0 is the exchange current density, c o and c r are the concentrations of the oxidant Ox and reductant Red, respectively, c * o and c * r are reference concentrations, α 1 and α 2 are the anodic and cathodic charge transfer coefficients, respectively, n is the number of electrons in the reaction, and Φ app is the applied potential. The reaction rate in (7) is given by g k = Jn nF if k is the oxidant, g k = − Jn nF if it is the reductant, and g k = 0 otherwise.
Alternative formulations
132Alternative formulations of the ENP system (1) and (3) have different advantages with respect to the numerical solution [8].
133In our case, we are interested in the Discontinuous Galerkin (DG) finite element method [13]. In particular, we will consider upwinding techniques for the advection and migration terms. The current formulation, ENP, is problematic with respect to the stabilization and penalization of the potential Φ. Indeed, the mass conservation equations (1) will be treated as transport problems for the concentrations, using an upwinding scheme, leaving Φ untreated. In this electroneutral Nernst-Planck system, the electroneutrality approximation replaces the Poisson equation, where stabilization and penalization appropriate for an elliptic problem could have been used. We need an equation that plays this role for Φ.
134We formulate a charge conservation equation by summing over all conservation of mass equations (1) weighting each by z k F . The advection terms cancel due to electroneutrality (3), and we obtain
135(10) However, we note that the system consisting of (1) and (10) is linearly dependent. To circumvent this, one of the concentration unknowns can be eliminated using the electroneutrality condition. Without loss of generality, we eliminate the concentration c m using the substitution
136assuming that z m = 0. Combining (10) and (11), we obtain
137This conservation of charge equation replaces the conservation of mass of species m in the system. The system now consists of m equations: conservation of mass equations (1) for k = 1, . . . , m − 1, and a conservation of charge equation (12), and m unknowns: concentration unknowns c k for k = 1, . . . , m − 1, and the electric potential Φ. As in [8], we call this formulation the Charge-conservation-Nernst-Planck (CNP) model. In terms of the DG scheme, stabilization and penalization of c m is no longer needed since it is no longer an unknown of the system. We can instead treat (12) as an elliptic equation for Φ in terms of the DG stabilization and penalization.
Nondimensionalization
138Here we perform a nondimensionalization of the CNP model consisting of (1) and (10) and boundary conditions (5) to (8). Note that this scaling process generally helps numerical algorithms. Indeed, for the considered test cases, this greatly accelerates the convergence of the iterative methods.
139Let the following nondimensional variables:
140and the differential operator with respectx
141Substituting (13) and (14) into (1), we obtain
142so thatĉ m is eliminated usinĝ
143In order to nondimensionalize the charge conservation equation (10), we introduce the reference concentration c ref to obtain
144The boundary conditions (5) to (8) become
145In the specific case of the Butler-Volmer equation (9), if k is an oxidant, (21) becomes
Discontinuous Galerkin method
146In this section, we introduce a Discontinuous Galerkin (DG) scheme for the CNP model (4) and (12). After reviewing preliminary DG concepts, we provide DG schemes for a hyperbolic and an elliptic equation. The resulting numerical fluxes are then used for the full system (4) and (12). For generality, we provide the scheme for the dimensional equations instead of the nondimensionalized version from section 2.3.
Preliminaries
147We begin by introducing the appropriate functional notation. Let T h be a subdivision of Ω with element K ∈ T h . The broken Sobolev spaces are defined as
148Let Γ = ∪ K∈T h ∂K denote the set of element boundaries. The restrictions of functions in H 1 (T h ) to Γ are called traces and belong to the function space
149Denote the space of polynomials of degree p on each element κ with Q p . A proper finite element space is defined as
150Next we introduce some trace operators needed for the numerical fluxes. For u ∈ T (Γ), we define the average {u} and jump [[u]] on interior faces as
151and for q ∈ [T (Γ)] d ,
152Jumps on exterior faces are defined as
Applied to the CNP model
153Following a combination of [14,15,16], we derive a Discontinuous Galerkin formulation for the CNP model. In this section, we only consider zero-Dirichlet boundary conditions for simplicity. The full scheme with boundary conditions (5) to (8) is given in section 3.3.
154Analyzing (4) we can see that it consists of a diffusion, advection-migration, and reaction term. Each term has to be treated carefully in order to achieve a convergent DG discretization.
155We multiply (4) by a test function v and integrate over the domain Ω.
156The diffusion term can be treated exactly like in [16] with the appropriate flux choiceŝ
157where δ p is a penalty parameter that depends on the polynomial order p of the finite elements. In [11], it is given by
158where C IP > 0 needs to be large enough for stability, and h is the cell diameter.
159The diffusion term results in
160The advection-migration term combines the advection effect from the transport velocity v and the migration effect from the potential gradient ∇Φ, which can be treated with the combined variable q k . This combined term is treated as in [15] with the upwind flux, resulting in
161Since the reaction term is cell-local, and it is assumed not to contain derivatives of the primary solution variables, no further treatment is needed. Note that the gradient potential term ∇Φ in the mass conservation equations (4) is only treated like a velocity in an advective term for the concentrations.
162A penalty term is required for the stability of the DG scheme and that is why we are using the CNP model. Indeed, the gradient potential term in the charge conservation equation (12) will be treated like an elliptic term, with appropriate penalization. Conversely, since we have already penalized the concentration gradients ∇c k in our treatment of (4), it is not required to do so for (12).
163We introduce the following short-hand notation for (12)
164which results in
165The fluxes for the concentration term are chosen aŝ
166Without loss of generality, the case with only two species in the system (k = 2) results in
167where a 1 = a 12 . For the potential term, we choose fluxes with interior penaltŷ
168This results in
169with the standard symmetric interior penalty flux. Note that in this example we assume the same test function space for all concentrations c k and the potential Φ. Therefore, we use the same penalty parameter δ p . If the polynomial spaces have different orders, the penalty parameters for both terms should be chosen accordingly. In our numerical experiments, we use (31) with C IP = 10.
Scheme
170Let the short-hand notation for the current at the electrode boundary
171where g k are the reaction rates from (7). The DG scheme for the problem eqs. (4) to (8) and (12) is given by: Find
172for all v m ∈ V p h . Recall that the eliminated concentration c m can be recovered from the substitution (11). Note that in (43b), the inlet boundary conditions cancel due to electroneutrality.
Numerical details and preconditioning
173A crucial aspect in the practical usability of this specific discretization is the ability to solve it efficiently when applied to real world problems. Domains for such applications are usually three-dimensional and nonlinear couplings appear through species reactions. Consequently, the numerical solution approach has to be scalable on a desired hardware architecture to provide feasible turnaround times for experiments. As a first performance measure, we are focusing on hexahedral mesh elements, which allow for a tensor product element approach [17], a fact that we exploit in our implementation (note that we are not exploiting Gauss-Legendre-Lobatto nodes, because we tend to use higher-order quadrature rules compared to the polynomial degree).
174After discretization, the nonlinear system arising from (43) has to be linearized and solved frequently. To solve the nonlinear system, we employ a Newton method along with backtracking linesearch [18]. To ensure a scalable linear solving procedure we have to employ appropriate preconditioning techniques [12].
175We can rewrite (43) as a block residual equation
176where R Φ is the residual of the discretized charge conservation equation (43b), and R ci , i = 1, . . . , m − 1, correspond to the residuals of the mass conservation equations (43a). Linearization of the residual R results in the block matrix
177This block system is used in the following sections to determine preconditioning strategies.
Preconditioning for p = 1
178We first describe the preconditioning strategy for a piecewise linear discretization.
179When dealing with block systems resulting from the discretizations of systems of PDEs with different underlying physics, it is usually not sufficient and never optimal to use the same preconditioner for each block. Analyzing the linearized block system (44), we immediately notice that the A ΦΦ block only consists of terms that resemble a Poisson equation, for which preconditioners like Algebraic Multigrid (AMG) [19] combined with Conjugate Gradient (CG) iterations work well.
180Continuing with the diagonal, the A c k c k blocks are not as simple and involve a diffusive term as well as a (usually dominant) advective term with anisotropic coefficients. In this case, classical AMG will not work well since its heuristics require elliptic-like properties. Instead, we apply preconditioned GMRES iterations [20] to the A c k c k blocks, considering two different preconditioners. The first preconditioning approach is an additive Schwarz method (ASM) [21] where an incomplete LU factorization with 0 fill (ILU0) [22] is applied to each subdomain. The subdomains are given by the parallel decomposition of the mesh. The second approach is a Geometric Multigrid (GMG) [23] preconditioner where that same ASM-ILU0 method is used as a smoother. The coarsest grid can be solved directly with a full LU factorization. Although, naively solving the coarse grid this way does not scale to a large number processors when parallel performance is desired. Because the coarse grid and therefore the coarse discretization is usually small, even on computations with hundreds of processors, the communication between the processors is the bottleneck for performance. A solution is to redistribute and duplicate the coarse grid matrix to predefined subsets of processors. This technique performs redundant work but improves the overall solve time as shown in [24].
181We choose a block-triangular preconditioner of the form
182Inverting a block-triangular matrix requires the inversion of the diagonal blocks, which are approximated by
183in the first approach, and
184in the second.
Preconditioning for high order
185AMG is more memory intensive for higher-order discretizations. In this case, p-multigrid has been successful in the past [25,26]. For the A ΦΦ block, we consider a p-multigrid strategy where AMG is applied to a lower-order pcoarsened problem. This coarsened problem uses the same DG discretization for p = 1, where the penalization terms are appropriately updated for the lower order. We include element-wise Jacobi as a relaxation scheme, where interelement contributions are ignored to maintain locality.
186For the concentration blocks, we consider the same additive Schwarz method described for p = 1. We do not consider the use of GMG for the high-order case.
187The block preconditioner (45) with the described p-multigrid method for the potential block exhibits convergence issues for some numerical experiments of section 5 for p = 3. It is unclear to the authors why this is the case. Instead, a different ordering of the preconditioning steps works better: solving the concentration blocks first, then the potential blocks. We theorize that the couplings are important in the low-order coarse problem but have only heuristic evidence. We thus use the following preconditioner:
188Inverting this matrix only requires the inversion of the diagonal blocks, which are approximated by
Implementation
189The implementation is part of the EchemFEM package [27]. It is realized using firedrake [28] as a finite element discretization tool, which allows for automated code generation and optimization. We leverage the capability to generate kernels of tensor product finite elements [17] on quadrilateral [29] and extruded hexahedral meshes [30]. Note that the algorithms and discretization techniques presented here can also be applied to triangular and tetrahedral elements. Furthermore, firedrake provides the necessary infrastructure to realize the presented GMG preconditioner [31]. The nonlinear and linear solves are handed off to the PETSc [32] linear algebra backend, and BoomerAMG [33] from the hypre library [34] is used for the AMG implementation. For higher-order simulations, we use firedrake's matrix-free capabilities [35]. In appendix Appendix A we provide all solver options, along with relative tolerances of each inner Krylov method, the outer FGMRES [36], and the outer Newton solver.
190To help the convergence of Newton's method, we start with a constant initial guess for the concentrations using the inlet values c in k . For the potential, we obtain an initial guess by first solving the charge conservation equation with constant concentrations (a Poisson equation). For this initial potential solution, we use the solver for the potential block defined in appendix Appendix A, with a conjugate gradient tolerance of 10 −2 .
Numerical results
191In this section, we investigate the numerical performance of the DG scheme and preconditioning strategies. We perform a convergence test for polynomial orders p = 1, 2, 3 and strong scaling tests for a large parallel plate flow channel example for p = 1 and p = 3. All tests are performed in three-dimensional domains.
Convergence tests
192In section 3, we established a discretization scheme based on well-known DG methods. As a first step, we have to make sure that the presented method provides the expected accuracy. Optimally, we would be able to prove an error estimate and therefore a theoretical convergence rate through analysis of (43).
193Another, although less thorough, way of determining the convergence rate is by solving a manufactured problem and comparing the solution against the known analytical solution. The way the scheme was set up, we expect the convergence rate to be similar to the minimum rate of each individual treated equation. Therefore, the convergence rate of the concentration variables should be close to that of an advection-diffusion-reaction equation, i.e. p + 1 2 in the advection-dominated regime [37], and the convergence rate of the potential variable should be close to that of a diffusion equation, i.e. p + 1 [16].
194We use the nondimensional version of a two-ion system with inverse Péclet numbersD 1 = 5 × 10 −6 andD 2 = 10 −5 , and charge numbers z 1 = 2 and z 2 = −2. The analytical manufactured solution is chosen as
195on the domain Ω ∈ (0, 1) 3 . All boundary conditions on ∂Ω are prescribed using the exact solutions. Additionally, a parabolic velocity profile is defined with u = (6y(1 − y), 0, 0) in the whole domain. We choose an initial mesh size using 64 hexahedral elements with a polynomial order of p = 1 and compute the L 2 error norms of each variable
196Then, we subsequently halve the element size h e using uniform refinement. The process is repeated for polynomial orders p = 2 and p = 3. Figure 1 shows the results for this test and one can observe a convergence rate of approximately p + 1 for Φ. For c 1 , the rate appears to be p + 1 for the coarser meshes, until the later refinements reveals the asymptotic rate of p + 1 2 . This asymptotic rate is not reached for p = 3.
197Looking at these results, one has to keep in mind that we determined the convergence rates on a Cartesian grid, and they might deteriorate on unstructured or curved grids [38,39].
198We now briefly investigate how the accuracy of the method relates to computational cost. For the manufactured solution problem described above, we calculate the total computational time and total L 2 error as we vary the size of the problem. The total error is the sum of the concentration and potential errors. On an Intel 18-core Xeon E5-2695 v4 architecture with 2.1 GHz clock speed, we use two nodes and a total of 64 processors. For p = 1, we use the preconditioner described in section 4.1 with the additive Schwarz method for the concentration blocks, and for p = 3 we use the preconditioner for high order described in section 4.2. In table 1, we provide computational timings and total L 2 errors for p = 1 and p = 3 as we vary the problem size. We note that the computational resources are fixed so there is insufficient memory for the largest high-order case. Additionally, the first row of results is around a thousand degrees of freedom per processor, which is not typically cost-efficient. Even so, the smallest p = 3 problem is twice as accurate and seven times faster than the largest p = 1 problem. It is evident that increasing polynomial order is preferable to mesh refinement when seeking high accuracy results.
Parallel plate flow channel
199We consider a 3D extension of the parallel plate reactor from [7]. A schematic of the reactor is given in figure 2. The distance between the two electrodes is h = 0.01 m, and their length is L = 0.02 m. The inlet and outlet regions included in the domain are of length L a = L b = 0.05 m, and the channel has a width w = 0.06 m.
200The velocity field u = (u x , u y , u z ) in the reactor is given by the parabolic profile Choosing zero-Neumann boundary conditions on xy-faces means that the channel is periodic in the z-direction. For this test case, we choose u avg = 0.03 m s −1 .
201We consider the three-ion system from [7] with an electrolyte solution con- At the electrodes, the electrochemical reaction is given by the Butler-Volmer equation (9) for the reacting ion, Cu 2+ , and no reaction for the other ions. The parameters for the Butler-Volmer equation are γ = 1, α 1 = α 2 = 0.5, T = 298.15 K, n = 2, and c * Cu 2+ is given by the inlet concentration of Cu 2+ in table 2. The applied potential Φ app is zero at the anode and 0.03 V at the cathode. For this redox reaction, Cu 2+ is the oxidant, and the solid copper of the electrode is the reductant (with constant concentration). To introduce variations in the z direction, we consider the following parabolic profile for the exchange current density:
202which has an average ofJ 0 = 30 A m −2 over the width of the channel. We first use a structured hexahedral mesh such that, in the xy-plane, elements are concentrated in the electrode region as illustrated in figure 3, and elements are equally spaced in the z-plane. The coarse mesh of 64 × 16 × 8 elements is uniformly refined three times, resulting in a mesh with 4,194,304 elements. Note that this mesh has elements with large aspect ratios.
203We also consider a mesh where the xy-plane is an unstructured mesh as illustrated in figure 4. Similarly to the structured mesh, the coarse 2D mesh is We now investigate the strong scaling of the preconditioners for the parallel flow plane channel. The experiments are performed on an Intel 18-core Xeon E5-2695 v4 architecture with 2.1 GHz clock speed. Using elements of p = 1 polynomial order results in 100,663,296 degrees of freedom for the structured mesh, and 99,680,256 degrees of freedom for the unstructured mesh.
204We begin with 256 processors (on 8 nodes) and successively double the number of processors and nodes. In figure 5, we illustrate the strong scaling results for both preconditioning approaches described in section 4on the structured mesh described above, and in figure 6 on the unstructured mesh. ASM refers to using the additive Schwarz method with ILU0 on the subdomains as a preconditioner for the concentration blocks, while GMG refers to using a geometric multigrid method with that same ASM as a smoother. For both ASM and GMG, we present solution times and the total number of outer FGMRES iterations. In each case, four Newton iterations are required to reach the prescribed tolerance.
205First, we discuss the scaling results for the unstructured mesh in figure 5. We observe that, overall, ASM is the more expensive method. Further investigation of the iteration counts of the inner GMRES used for the concentration blocks reveals that GMG only takes a few iterations, while ASM often takes around 50-100 iterations (sub-iterations not shown here). Now, in terms of scaling, ASM scales almost linearly until 2,048 processors. However, it is expected that ASM becomes a weaker preconditioner as the number of subdomains increases. For GMG, the scaling is close to being linear form 256 to 1,024 processors. Naturally, the direct solver used for the coarse problem of GMG does not scale linearly and eventually dominates the computational cost at 2,048 processors. Note that there is a decrease in iterations at 512 and 1,024 processors, which may be due to how the mesh is partitioned, thus increasing the performance of the smoother and the apparent quality of the scaling. Recall that we do not have control over the domain decomposition, which in general will not be ideal. In particular, the criticality of the electrode regions should be considered in a more controlled mesh partition. Now we compare the scaling results for the unstructured mesh in figure 6. We observe that both methods have similar almost-linear scaling, with a bump in cost at 2,048 processors. Differently from the structured mesh case, ASM is the least expensive method. In fact, the GMRES iteration count for the concentration blocks for ASM are lower in this case, typically less than 30 (subiterations not shown here). The structured mesh has some elements with very large aspect ratio. This could affect the conditioning of the mesh, resulting in larger number of iterations. We note that the outer GMRES iterations is also lower for the unstructured case.
206Finally, we look at the scaling results for p = 3 and the preconditioning strategy described in section 4.2. We note that the p-multigrid method used for the potential block performs poorly on meshes with high element aspect ratios such as the ones used above. The scaling tests are therefore performed on a mesh with moderate aspect ratios. The width of the channel is changed to w = 0.01 m. We consider an unstructured coarse mesh similar to the one illustrated in figure 4 but with slightly larger elements and extrude it in the zdirection with 6 elements. For p = 3, we uniformly refine the mesh 2 times for a total of 254,208 elements. One more refinement gives 2,033,664 elements, which is used for p = 1. Both problems consist of 48,807,936 degrees of freedom. We display the high-order scaling results in figure 7. We observe that the scaling for p = 3 is about order 0.5, i.e. the cost is halved after quadrupling the number of processors. The computational timings for the smallest case is more than four times higher for p = 3 than p = 1. Nevertheless, this figure does not take into account the numerical accuracy of the results. Indeed, we recall from table 1 that higher accuracy can be obtained for higher-order problems of much smaller sizes. Strong scaling for p = 1 as at best linear, but increasing the polynomial order results in an exponential increase in accuracy.
Conclusion
207In this work, we propose a high-order Discontinuous Galerkin (DG) scheme and block preconditioners for the electroneutral Nernst-Planck equations. We choose a model formulation where the electroneutrality condition is substituted to obtain a charge conservation equation. In the DG scheme, this equation is treated as an elliptic equation for the electrical potential, whereas in the mass conservation equations, an upwind scheme is used for the combined advectionmigration term. In numerical convergence tests, the scheme exhibits a p + 1 order of convergence for the potential and a p + 1 2 order of convergence for the concentrations.
208For p = 1, both proposed block preconditioners use Algebraic Multigrid for the potential block whereas an Additive Schwarz method with ILU is used for the concentration blocks, by itself or as a smoother for a Geometric Multigrid method (GMG). While both methods exhibit decent strong scaling, the GMGbased approach is less expensive on the structured mesh, although its scaling is limited by the direct solver used for the coarse grid solution. For higher order, a p-multigrid method is used for the potential block, where Algebraic Multigrid is applied to the lower-order coarsened problem. The strong scaling is less than linear in the high-order case.
209For future extensions, coupling this solver with fluid dynamics is of particular interest. The Stokes or incompressible Navier-Stokes equations are relevant for flow reactors as well as the pore-scale of porous electrode systems. On the larger length scale, Darcy flow is appropriate for porous electrodes, and its multiphase extension for gas-diffusion electrodes (GDE).
210Further work is needed for preconditioning in the case where electrolyte bulk reactions are present, where reaction rate constants can vary wildly. Porous electrodes are also interesting since cathodic/anodic reactions occur throughout the domain rather than as boundary conditions.
19
211" pc _python_ type " : __name__ + " . " + " Ce llIntegr alPC " , 20
212" a s s e m b l e d _ p c _ t y p e " : " jacobi " , 21 } , 22
213" p m g _ c o a r s e _ m a t _ t y p e " : " aij " , 23
214" pmg_mg_coarse " : { 24 " ksp_type " : " cg " , 25
215" ksp_rtol " : 1e -3 , 26
216" pc_type " : " hypre " , 27 } , 28 } , 29 % For each concentration block k , using the ASM prec ondition er : 30 " fieldsplit_ [k -1] " : { 31
217" ksp_rtol " : 1E -1 , 32
218" ksp_type " : " gmres " , 33
219" pc_type " : " python " , 34
220" pc _python_ type " : " firedrake . AssembledPC " , 35
221" assembled " : { 36 " pc_type " : " asm " , 37
222" pc _asm_ove rlap " : 1 , 38
223" sub_pc_type " : " ilu " 39 } , 40 } ,
224The reduction factor REDFACTOR for the coarse grid redistribution is chosen depending on the number of processors such that the solver sub-communicator always includes exactly 8 nodes. The default overlap for ASM is one element.
225The custom preconditioner CoarsenPenaltyPMGPC is p-multigrid with p = 1 on the coarse level where the proper penalization parameters are used for the DG discretization. The custom preconditioner CellIntegralPC is used to ignore inter-element contributions. These custom solvers are available in the EchemFEM package [27].
참고문헌 33건
- An Additive Variant of the Schwarz Alternating Method for the Case of Many Subregions 2018
- Discontinuous Galerkin methods for solving elliptic and parabolic equations : theory and implementation 2008
- Discontinuous Galerkin Methods for Advection-Diffusion-Reaction Problems SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2009 10.1137/080719583
- Optimal Convergence of the Original DG Method for the Transport-Reaction Equation on Special Meshes SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2008 10.1137/060677215
- Opportunities and challenges for a sustainable energy future Nature · Nature Portfolio · 2012 10.1038/nature11475
- BoomerAMG: A parallel algebraic multigrid solver and preconditioner Applied Numerical Mathematics · Elsevier BV · 2002 10.1016/s0168-9274(01)00115-5
- A Flexible Inner-Outer Preconditioned GMRES Algorithm SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 1993 10.1137/0914028
- The electroneutrality approximation in electrochemistry Journal of Solid State Electrochemistry · Springer Science+Business Media · 2011 10.1007/s10008-011-1323-x
- Numerical Methods for Unconstrained Optimization and Nonlinear Equations 1996 10.1137/1.9781611971200
- The multi-dimensional upwinding method as a new simulation tool for the analysis of multi-ion electrolytes controlled by diffusion, convection and migration. Part 1. Steady state analysis of a parallel plane flow channel Journal of Electroanalytical Chemistry · Elsevier BV · 1996 10.1016/0022-0728(95)04371-3
- An optimal-order error estimate for the discontinuous Galerkin method Mathematics of Computation · American Mathematical Society · 1988 10.1090/s0025-5718-1988-0917819-3
- DISCONTINUOUS GALERKIN METHODS FOR FIRST-ORDER HYPERBOLIC PROBLEMS Mathematical Models and Methods in Applied Sciences · World Scientific · 2004 10.1142/s0218202504003866
- Unified Analysis of Discontinuous Galerkin Methods for Elliptic Problems SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2002 10.1137/s0036142901384162
- GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems SIAM Journal on Scientific and Statistical Computing · Society for Industrial and Applied Mathematics · 1986 10.1137/0907058
- Multi-level adaptive solutions to boundary-value problems Mathematics of Computation · American Mathematical Society · 1977 10.1090/s0025-5718-1977-0431719-x
- p-Multigrid solution of high-order discontinuous Galerkin discretizations of the compressible Navier–Stokes equations Journal of Computational Physics · Elsevier BV · 2005 10.1016/j.jcp.2005.01.005
- Firedrake ACM Transactions on Mathematical Software · Association for Computing Machinery · 2016 10.1145/2998441
- High level implementation of geometric multigrid solvers for finite element problems: Applications in atmospheric modelling Journal of Computational Physics · Elsevier BV · 2016 10.1016/j.jcp.2016.09.037
- A structure-exploiting numbering algorithm for finite elements onextruded meshes, and its performance evaluation in Firedrake Geoscientific model development · Copernicus Publications · 2016 10.5194/gmd-9-3803-2016
- A free energy satisfying discontinuous Galerkin method for one-dimensional Poisson–Nernst–Planck systems Journal of Computational Physics · Elsevier BV · 2016 10.1016/j.jcp.2016.10.008
- The path towards sustainable energy Nature Materials · Nature Portfolio · 2016 10.1038/nmat4834
- A discontinuous Galerkin method for nonlinear parabolic equations and gradient flow problems with interaction potentials Journal of Computational Physics · Elsevier BV · 2017 10.1016/j.jcp.2017.09.050
- Solver Composition Across the PDE/Linear Algebra Barrier SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2018 10.1137/17m1133208
- A Coupled Finite Element Approach for Electrochemical Systems 2012
- Chemical storage of renewable energy Science · American Association for the Advancement of Science · 2018 10.1126/science.aat7918
- Automated Generation and Symbolic Manipulation of Tensor Product Finite Elements SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2016 10.1137/15m1021167
- Electrochemical Systems Springer eBooks · Springer Nature · 2012 10.1007/978-94-007-2999-5_11
- Preconditioning Acta Numerica · Cambridge University Press · 2015 10.1017/s0962492915000021
- Review of electrical energy storage technologies, materials and systems: challenges and prospects for large-scale grid storage Energy & Environmental Science · Royal Society of Chemistry · 2018 10.1039/c8ee01419a
- 16th AIAA Computational Fluid Dynamics Conference 17th AIAA Computational Fluid Dynamics Conference · 2003 10.2514/mcfd03
- Modern Software Tools for Scientific Computing Birkhäuser Boston eBooks · Birkhäuser Boston · 1997 10.1007/978-1-4612-1986-6
- An Iterative Solution Method for Linear Systems of Which the Coefficient Matrix is a Symmetric M-Matrix Mathematics of Computation · American Mathematical Society · 1977 10.2307/2005786
- (제목 없음) Journal of Scientific Computing · Springer Science+Business Media · 2001 10.1023/a:1012873910884