# Mixed Finite Element Methods for Addressing Multi-Species...

date post

25-May-2018Category

## Documents

view

213download

1

Embed Size (px)

### Transcript of Mixed Finite Element Methods for Addressing Multi-Species...

Mixed Finite Element Methods for Addressing

Multi-Species Diffusion Using the Maxwell-Stefan

Equations

Mike McLeod, Yves Bourgault

Department of Mathematics and Statistics, University of Ottawa, 585 King Edward

Avenue, Ottawa, Ontario, Canada. K1N 6N5

Abstract

The Maxwell-Stefan equations are a system of nonlinear partial differentialequations that describe the diffusion of multiple chemical species in a con-tainer. These equations are of particular interest for their applications tobiology and chemical engineering. The nonlinearity and coupled nature ofthe equations involving many variables rule out analytical solutions, so nu-merical methods are often used. In the literature the system is inverted towrite fluxes as functions of the species gradient before any numerical methodis applied. In this paper it is shown that employing a mixed finite elementmethod makes the inversion unnecessary, allowing the numerical solution ofMaxwell-Stefan equations in their primitive form. A mixed variational formu-lation is derived in the general n-ary case. A priori error estimates betweenthe finite element and exact solutions are obtained. The order of convergenceof the method is then verified and compared with standard methods usinga manufactured solution. Finally, the solution is computed for a test casefrom the literature involving the diffusion of three species and compared tosolutions from other methods.

Keywords: Maxwell-Stefan, mixed finite element, multi-species diffusion

Email Address: [email protected] address: [email protected] (Mike McLeod)

Preprint submitted to Computer Methods in Applied Mechanics and Engineering July 4, 2014

1. Introduction

The Maxwell-Stefan equations describe the process of diffusion in a mix-ture of multiple chemical species. This model was independently derived in[1] and [2]. Aside from a firm experimental confirmation [3], this model hasseveral applications to biology and chemical engineering. A detailed discus-sion of the physics behind the Maxwell-Stefan equations can be found in [4]or [5]. These equations form a degenerate system linking the species con-centration and fluxes, where each concentration gradient is expressed as acombination of all the fluxes.

The usual method for finding a numerical solution is to remove the degen-eracy, invert the system and apply a finite element method to compute onlythe species concentrations. For instance, in [6] a model for bone tissue growthusing coupled Navier-Stokes and Maxwell-Stefan equations is described. Theauthors invert the Maxwell-Stefan equations to express the fluxes in terms ofgradients of mass fractions before applying a finite element method using thesoftware Femlab. In [7] a benchmark for diffusion and fluid flow is introduced.The model used relies on an inversion of the Maxwell-Stefan equations be-fore applying a finite element method to find the solution. A model of watertransport in a fuel cell is described in [8] using Maxwell-Stefan equations andconcentrated solution theory. The flux of water at the membrane is deter-mined using concentrated solution theory. The fluxes are expressed in termsof the mass fractions before applying a finite element method, except on theboundary where normal fluxes are used as boundary conditions. The stabil-ity of the finite element method for Maxwell-Stefan equations is consideredin [9]. The system is inverted so that the flux is written explicitly in termsof the mass fractions before any finite element method is applied. A finitevolume approach is applied in [10] where the flux is written in a discretizedform using what the authors refer to as a coupled exponential scheme.

Less often a finite difference scheme is used to solve numerically theMaxwell-Stefan equations. In [11] a finite difference scheme expressed inmole fractions and velocities is used to approximate the gradients of themole fractions. The molar flux is written in terms of the velocities and molefractions and solutions are found using a 4th order Runge-Kutta scheme. A1D problem is considered in [12] to study the phenomena of uphill diffusion.The Maxwell-Stefan equations are solved using a finite difference discretiza-tion. The numerical method is shown to be second order and a condition forL-stability is found. Another 1D problem is studied in [13], where a shoot-

2

ing method is used to solve the boundary value problem and a Runge-Kuttamethod is used to solve the associated ordinary differential equations.

Recently work has been done looking at the mathematical properties ofMaxwell-Stefan equations [12, 14]. In [12], it is shown that if the initialsolutions ini are nonnegative functions in L

() then the Maxwell-Stefanequations admit an unique smooth solution with molar fractions i remainingnonnegative for all time t > 0. It has been shown in [14] that the homoge-neous system is well-posed for a solution that is local in time. Additionallythe same paper has shown that the mole fractions i are non-negative for theinhomogeneous case, under certain conditions on the reaction rates. A mainpiece of the argument in both proofs is that the system is invertible for eachJi as a function of j.

There has been, until now, no work done on the Maxwell-Stefan equa-tions in the context of mixed variational formulations. This is true bothfor the theoretical analysis of the model and its numerical solution. Thisis surprising as these equations naturally state with primal and dual vari-ables as is commonly seen in mixed formulations. The goal of the currentpaper is to propose a mixed variational formulation for Maxwell-Stefan equa-tions and to see how the theory for mixed finite element methods applies tothese equations after an appropriate linearization. As will be seen, two mainadvantages will result from such mixed formulation of the Maxwell-Stefanequations: the system only shows mild (quadratic) nonlinearity, and boththe mole fractions and molar fluxes will be approximated with an equal or-der of accuracy. These two features are simply not true or possible with thestandard methods advocated in the literature and requiring the expressionof Ji as a function of all j.

The paper is organized in the following way. In section 2 the Maxwell-Stefan model is briefly derived with accompanying boundary conditions. Insection 3, standard finite element methods are presented and discussed asthey will be compared to our methods. In section 4 a mixed variationalformulation is derived for n-ary diffusion problems. Section 5 analyzes thewell-posedness of Maxwell-Stefan equations applied to ternary diffusion. InSection 6 the mixed finite element approximation is established as well aserror estimates. In Section 7 the error estimates are verified through numer-ical tests using a test case with a known analytic solution. In this sectionanother test case is conducted and the solution is compared to results fromthe literature.

3

2. The Maxwell-Stefan equations

Physically the system represents a mixture of n ideal gases, where eachspecies i has a mole fraction of i and a flux of Ji, in moles per unit area perunit of time. If the mixture reaches steady state, the divergence of the fluxwill be equal to some reaction rate ri. This leads to the following equationsfor i = 1, 2, ..., n:

Ji = ri. (1)The motion of the gases will cause the particles of each species to be

dragged by the particles of the other species in the mixture. This drag forceis balanced by the partial pressure gradients of the species in the mixture.This leads to the following expression for i = 1, 2, ..., n:

i =1

ctot

n

j=1

jJi iJjDij

, (2)

where Dij is the binary diffusion coefficient between species i and species j,and ctot > 0 is the total concentration of the mixture. The coefficients Dijand Dji are taken to be equal.

Consider a domain Rd, such that the boundary is divided into twocomponents, D and N . These components satisfy: D

N = . On theboundary D, the mole fraction i is equal to fi. On N , the normal fluxof species i, Ji , is taken to be gi. Since the variable i represents molefractions, at any point in the domain the following condition holds:

n

i=1

i = 1. (3)

To close the system we will make use of the following fact [12, 14]:

n

i=1

Ji = 0. (4)

We will use the following notations:

= (1, 2, ..., n),

J = (J1, J2, ..., Jn).

4

The Maxwell-Stefan problem for n-ary diffusion becomes: Find (J, ) suchthat equations (1)-(4) are satisfied in for i = 1, 2, ..., n with the followingboundary conditions:

i = fi on D, (5)

Ji = gi on N . (6)

3. Standard finite element formulation of Maxwell-Stefan equa-

tions

For the sake of completeness, finite element methods commonly used tosolve Maxwell-Stefan equations are presented and discussed here. By takingequation (2) and using equations (3) and (4), the n-species system is reducedto the following system with n 1 species:

i =n1

j=1

AijJj,

for i = 1, 2, . . . , n 1. The matrix A is derived by unpleasant calculations.For instance, for a three-species system this gives:

A =

(

1 21 2

)

,

where the terms in the matrix are defined below by equations (16)-(19).The fluxes can be expressed in terms of the mole fractions and their

gradients by inverting the equation above to give:

Ji = n1

j=1

A1ij j, (7)

for i = 1, 2, . . . , n 1.By taking the divergence on both sides and applying equation (1), we

obtain the following equations for i = 1, 2, . . . , n 1:

(n1

j=1

A1ij j) = ri.

5

The variational formulation is obtained by multiplying the above equationby a test function i and integrating by parts to remove the divergence term.For a Dirichlet problem this yields the following variational formulation: Find (H1())2 with i = fi on such that:

(n1

j=1

A1ij j) i dx =

rii dx, (8)

for all i H10 () and i = 1, 2, . . . , n 1. The finite element approximationis taken as the usual space of continuous piecewise polynomials P k of degreek, for k 1. These finite element methods will be referred to as StandardP k.

The matrix A being dependent on the mole fractions, a fixed point methodis required to solve the nonlinearity, such as Newton-Raphson method. A firstdrawback of Standard P k methods comes from the the fact that the matrixA1 that appears in (8) involves the mole fractions in a non-trivial nonlinearway. This makes the application of Newton-Raphson method tedious andpotentially leads to a lack of convergence of the method. To avoid theseissues, we applied a simple fixed point method (Picard method): Given initialguesses h,i, i = 1, 2, . . . , n 1, the matrix A1 is computed using these h,iand problem (8) is solved for h,i, i = 1, 2, . . . , n 1. A new guess is thendefined using the relaxation formula h,i := h,i + (1 )h,i for ]0, 1]and the loop is repeated until convergence.

A second drawback of Standard P k methods is that fluxes Ji are notreadily available while they are often needed. They can be recovered from using equation (7). This leads to a rational function for each component of Jion any element of the mesh, which rational function can be re-interpolatedby a polynomial in P 2k at the element level. Re-interpolation with P 2k

polynomials yielded the lowest L2 error on the fluxes for the numerical testspresented below, still accuracy on the fluxes is usually one order lower thanon mole fractions for Standard P k methods.

4. Mixed variational formulation of Maxwell-Stefan equations

To define the functional spaces used in this section, we will need thefollowing normal trace operator:

,N (q) = q |N , q C(),

6

where is the outward pointing normal vector. This operator is extendedby density to the weaker space given below.

In this section we use the following spaces:

V = (L2())n1 equipped with the norm || ||V = || ||0;Q = (H(div; ))n1 and

Qg = {q (H(div; ))n1| ,N (qi) = gi on N},both equipped with the norm || ||Q = || ||H(div;).

The space Q0 is the particular case when gi = 0 on N in Qg . To definethe weak formulation we reduce the system to n1 species by using relations(3) and (4). Multiplying the resulting system of equations by test functionsand applying integration by parts yields the following weak formulation: Find(J, ) Qg V such that,

{ Ji qictotDin

+n1

j=1

ijctot

(iJj qi jJi qi)} dx

i qi dx = < qi , fi > |D , (9)

vi Jidx =

rividx, (10)

for i = 1, 2, ..., n 1 and q = (q1, q2, ..., qn1) Q0, v = (v1, v2, ..., vn1) V , where < qi , fi >D is a duality product between H1/2() and H1/2()restricted to functions that are null on N . In all the paper, the coefficientsij are defined as

ij = 1/Din 1/Dij . (11)It is useful to know which conditions ensure that a solution to the varia-

tional formulation is also a solution to the Maxwell-Stefan equations. We willmake use of D(), the space of infinitely differentiable functions with com-pact support on . Now let (J, ) Qg V be a solution to the above mixedvariational formulation. By rearranging (10) we get the following equalityfor all vi L2():

( Ji ri)vi dx = 0.

7

Since Ji H(div; ), we know that Ji is an L2-function. By takingvi D() L2() we recover Ji = ri in the sense of distributions andsince both sides of this equality are in L2(), the equation is true almosteverywhere on .

To recover the rest of the Maxwell-Stefan problem we consider (9). If weassume that i H1() then we can apply integration by parts to the termsi qi and get:

0 =

(

JictotDin

+n1

j=1

ijctot

(iJj jJi) +i)

qi dx

< qi , i >N + < qi , fi i >DThe above equation is true for all qi H(div; ), so take qi (D())d

H(div; ). Since qi vanishes on we recover equation (2) in the sense ofdistributions. To recover the boundary conditions, take qi equal to zero onN . This choice of qi is possible due to the surjectivity of the operator ,N .For this choice of qi we obtain that:

< qi , fi i >D= 0 q H1/2(D),

which implies that fi = i in H1/2(D). Since H

1/2(D) L2(D), we getthat fi = i almost everywhere on D. The boundary condition on thenormal flux of J is satisfied in H1/2(N) since it J Qg.

So a solution to the mixed variational formulation with (H1())n1,will also be a solution to the Maxwell-Stefan problem.

5. Existence and uniqueness for the linearized ternary Maxwell-

Stefan equations

In this section the Maxwell-Stefan problem is analyzed using the theoryof mixed variational formulations, often referred to as abstract saddle pointproblems. This theory will be briefly reviewed here, based on [15, Ch. II].Following this review, the general theory will be applied to the case of ternarydiffusion. To study the well-posedness of the weak formulation we shalllinearize the problem by taking the variable i to be a known non-negativefunction i, whenever it is multiplied by a flux Jj.

Take V and Q to be Hilbert spaces with inner products (, )V and (, )Q,respectively, and their associated norms defined as || ||V and || ||Q. Define

8

two bounded bilinear forms a(, ) : QQ R and b(, ) : QV R. Theabstract saddle point problem is stated as follows: Given f Q and r V find (J, ) Q V such that:

a(J, q) + b(q, ) =< f, q >QQ q in Q, (12)b(J, v) = < r, v >V V , v in V, (13)

where V and Q are taken to be the dual spaces of V and Q with < , >denoting duality products. The saddle point formulation can be given in anequivalent operator form by defining operators A : Q Q, B : Q V ,and B : V Q such that :

< Ap, q >QQ = a(p, q) p, q Q,< Bq, v >V V =< q,B

v >QQ= b(q, v) v V, q Q,

where B is the adjoint of B. This yields the following saddle point problem:

AJ + B = f in Q,

BJ = r in V .

To ensure the existence of a solution to the above saddle point problem,we make use of the following theorem [15, p.42], where in our case q is theprimal variable and v the dual variable:

Theorem 1. Let V and Q be Hilbert spaces and a(, ) and b(, ) be boundedbilinear forms with associated operators A and B, such that the followingconditions hold:

The bilinear form a(, ) satisfies the coercivity condition over Ker(B):

a(p, p) ||p||2Q > 0, p Ker(B). (14)

The bilinear form b(, ) satisfies the inf-sup condition:

infvV \Ker(B)

supqQ

b(q, v)

qQvV > 0 (15)

9

Then for any f V and r Im(B), the saddle point problem (12)-(13)admits a solution (J, ) Q V where J Q is uniquely determined and V is unique up to an element of Ker(B).

For the Maxwell-Stefan equations the case of ternary diffusion will beconsidered. Since there are only three binary diffusion coefficients, it is alwayspossible to ensure that D12 is the largest by relabeling the three species.Define the following quantities:

1 =1

D13 122, (16)

2 = 121, (17)

1 = 212, (18)

2 =1

D23 211, (19)

where 1 and 2 are assumed to be known non-negative mole fractions asrequired for the linearization. The mole fractions 1 and 2 will be taken inL() to ensure the continuity of the bilinear form a(, ).

Define two bilinear forms a(, ) : QQ0 R and b(, ) : QV R:

a(p, q) =

1

ctot(1p1 q1 + 2p2 q1) dx

+

1

ctot

(

1p1 q2 + 2p2 q2)

dx, (20)

b(q, v) =

(v1 q1 + v2 q2) dx. (21)

Using the bilinear forms the problem can be restated as follows: Find (J,) Q0V such that

a(J, q) + b(q, ) = < q , f >D , q Q0, (22)

b(J, v) =

r v dx, v V, (23)

where r = (r1, r2) V and f = (f1, f2) H1/2(D) corresponds to theDirichlet boundary conditions on .

10

Remark 1. In the case where J / Q0 the problem can be reformulated asabove through a continuous lifting. In order to apply Theorem 1, the un-knowns J and must lie in Hilbert spaces. This is a problem since Qg is nota Hilbert Space. Fortunately this can be resolved by letting J =J0 + Jg whereJ0 Q0 and Jg Qg. This lifting is possible since ,N , is surjective onH1/2(). So for any g there will exist a Jg, not necessarily unique, liftingg. This will result in different right hand sides for equations (22) and (23)but the proof remains the same.

Now to obtain the existence of a solution to this linearized problem weneed to prove that the bilinear forms a(, ) and b(, ) satisfy the hypothesisof Theorem 1. To start, consider the following lemma:

Lemma 1. If min( 1D12

, 1D13

, 1D23

) = 1D12

> 0, then we have that 1 2 1D12and 2 1 1D12 .

Proof. We first prove that 1 2 1D12 .

1 2 =1

D13 ( 1

D13 1

D12)1 (

1

D13 1

D12)2

=1 1D13

+1D12

2D13

+2D12

=1 1 2

D13+

1 + 2D12

1 1 2D12

+1 + 2D12

=1

D12

We have used the fact that the is add up to one and that the binarydiffusion coefficient D12 is the largest.

To prove the other inequality, one proceeds in a similar fashion.

We now consider the coercivity of a(, ) with the following proposition:

Proposition 1. If the binary diffusion coefficients satisfy 3D23 > D12,3D13 > D12, and ctot C() then the bilinear form a(, ) is coercive over Q.

11

Proof. We rewrite the bilinear form in the following way:

a(p, q) =

1

ctot

2

i=1

(

qi1, qi2

)

(

1 21 2

)(

pi1pi2

)

dx

Since ctot > 0 in , there exist real numbers cmin and cmax such that0 < cmin ctot cmax everywhere in . So when bounding the bilinear formfrom above or below, we can use cmin or cmax and ignore ctot.

The bilinear form is coercive if and only if the symmetric part of thematrix is positive definite with the smallest eigenvalue uniformly boundedaway from 0 for all i. So to prove the coercivity we will consider

Asym =

(

12+1

22+1

22

)

.

and apply the Gerschgorin circle theorem to find lower bounds on the eigen-values of Asym. For the first row, this gives:

21 (2 + 1) 21 (1 1

D12+ 1)

=1

D13 122 212 +

1

D12

=1

D13(

1

D13 1

D12

)

2 (

1

D23 1

D12

)

2 +1

D12

=1 2D13

+ 22D12

2D23

+1

D12

where the inequality comes from applying Lemma 1.This last line is a linear equation in 2, so for 2 [0, 1] the minimum

value will be achieved at one of the interval end points. Therefore we get:

21 (2 + 1) min{1

D13+

1

D12,

3

D12 1

D23} > 0,

where the positivity comes from the assumption that 3D23 > D12.For the second line of the matrix, Asym, one gets:

22 (2 + 1) min{1

D23+

1

D12,

3

D12 1

D13} > 0,

12

here the positivity comes from the assumption that 3D13 > D12.By the Gershgorin theorem the matrix has positive eigenvalues, so we can

conclude that it is positive definite.

To prove the inf-sup condition for b(, ) we will make use of the followinglemma from [16]:

Lemma 2. For any v L2() there exists a p H(div; ) such that p= -v and that satisfies the following inequality:

||p||H(div;) (

1 + C2

)

||v||L2(),

where C is the constant in the Poincare inequality for the domain .

We can now prove the following proposition:

Proposition 2. The bilinear form b(, ) for the Maxwell-Stefan problem,satisfies the following inf-sup condition:

infvV

suppQ

b(p, v)

||v||V ||p||Q ,

for some > 0.

Proof. Let p1 and p2 be functions inH(div; ) such thatpi = vi, i = 1, 2,as in Lemma 2. Then we have:

b(p, v)

||v||V=

(v1 p1 v2 p2) dx

||[v1, v2]||V

=||v1||2L2() + ||v2||2L2()

||v1||2L2() + ||v2||2L2()

=

||v1||2L2() + ||v2||2L2()

(

||p1||2H(div;) + ||p2||2H(div;)) 1

1 + C2

=1

1 + C2||p||Q,

13

where the inequality comes from Lemma 2. This leads to the following usingthe above pi:

suppQ

b(p, v)

||p||Q

(v1 p1 v2 p2) dx

||p||Q 1

1 + C2||v||V

The above is equivalent to the proposition since 11+C2

> 0.

We now prove the following theorem:

Theorem 2. There exists a unique solution (J, ) Qg V to the mixedformulation of the linearized Maxwell-Stefan equations, when the binary dif-fusion coefficients satisfy 3D23 > D12 and 3D13 > D12 and when ctot C().Proof. The existence of a solution (J, ) Qg V is a direct applicationof Theorem 1, Proposition 1, and Proposition 2. The coercivity over all Qimplies the coercivity over Ker(B).

Uniqueness is addressed in the following way. If J = J0 + Jg (See Remark1 above), then J0 will be defined uniquely for a given Jg. Now consider twosolutions to the Maxwell-Stefan problem, (J1, 1) and (J2, 2). Let J =J1 J2 and = 1 2. We have that J Q0 since J1 = J2 on Nand = 0 on D. So (J , ) Q0 V is a solution to:

a(J , q) + b(q, ) = 0 , q Q0,b(J , v) = 0 , v V.

By taking q = J and v = we can combine the above equations to get:

a(J , J) = 0.

The coerciveness of a(, ) implies that J = 0. The system is thereforeequivalent to:

b(q, ) = 0 , q Q0.For any qi (D())d H(div; ), we have

0 =

i qi dx = < i, qi >D()D() .

14

Therefore we have that i = 0 in D(). Since i belongs to L2()we have that i coincides almost everywhere with a constant function [17,Corollary 2.1, p.9]. Since is a constant function we have that i H1().Now for qi Q0 we get:

0 =

i qi dx

=

i qi dx+ < qi , i >

=< qi , i >D ,

for all q H1/2(D). This implies that i = 0 in H1/2(D), and since iis constant, we obtain that i is zero everywhere on .

Since J and are zero we obtain the uniqueness of solutions to the lin-earized Maxwell-Stefan problem.

6. Finite element methods and error estimates

Let Th be a regular triangularization of , with h the maximum diameterof the elements. The flux space will be approximated with the k-th orderRaviart-Thomas elements RT k, [18] or k+1-th order Brezzi-Douglas-Marinielements BDMk+1[19]. For the analysis of the mixed finite element methodwe will restrict our attention to the Raviart-Thomas elements. The analysisis very similar when using the Brezzi-Douglas-Marini elements [15, Sec III.3].The concentration space will be approximated with k-th order Lagrange ele-ments. The notation P k refers to the space of piecewise polynomial functionswhich are continuous across element boundaries and P kdc refers to the spacewhere functions are not necessarily continuous across element boundaries.So we have the following spaces:

Vh = {vh V |vh,i P kdc},Qh,g = {qh Q|qh,i RT k, ,N (qh,i) = gi on N},

The numerical method proceeds with a fixed point as follows: For aninitial guess h, find (Jh, h) Qh,g Vh such that,

15

{Jh,i qh,ictotDin

+n1

j=1

ijctot

(

h,iJj,h qh,i j,hJh,i qh,i)

} dx

h,i qh,i dx = < qh,i , fi >D , (24)

vh,i Jh,idx =

rivh,idx, (25)

for all vh Vh and qh Qh,0.Now let the new guess be h,i := h,i + (1 )h,i for [0, 1]. Solve

Equations (24) and (25) until ||h h||V is less than some tolerance.With our mixed finite methods, the nonlinearity is only quadratic, simpli-

fying the implementation of Newton-Raphson method compared to StandardP k methods. This is of course done at the expense of solving a larger linearsystem, given the extra unknowns Jh,i, but at the end the fluxes are avail-able with equal accuracy if a stable pair of finite element spaces is chosen.For instance, for the RT 0-P 0dc method this adds one DOF per edge (sharedbetween neighboring elements) for each flux Jh,i on top of the single DOFper element for the mole fraction h,i.

To analyze the stability and convergence of mixed finite element methodswe will make use of the following theorem [15, section 2.2]:

Theorem 3. Let V and Q be Hilbert spaces and let a(, ) : Q Q Rand b(, ) : Q V R be bounded linear forms with associated operatorsA : Q 7 Q and B : Q 7 V .

Moreover let Vh V and Qh Q be finite dimensional subspaces andAh : Qh Qh and Bh : Qh V h the operators associated to the restrictionof a(, ) and b(, ) to their respective finite dimensional subspaces.

Now assume the following are satisfied for two constants h and h :(i) The bilinear form a(, )|VhVh satisfies the following coercivity condi-

tion on Ker(Bh):

a(ph, ph) h||ph||2Q > 0 ph Ker(Bh). (26)

(ii) The bilinear form b(, )|VhQh satisfies the following inf-sup condition:

infvhVh\Ker(B

h)sup

qhQh

b(qh, vh)

qhQvhV h > 0. (27)

16

Then for any f Q and r Im(B) the finite dimensional saddle pointproblem has a solution (Jh, h) Qh Vh, where Jh is uniquely determinedand h is unique up to an element of Ker(B

h).

If the mixed finite element method converges and the constants h = and h = are independent of h, then we have the following a priori errorestimates:

||J Jh||Q (1 +||a||

)(1 +||b||

) infqhQh

||J qh||Q +||b||

infvhVh

|| vh||V ,(28)

|| h||V (1 +||b||

) infvhVh

|| vh||V +||a||

infqhQh

||J qh||Q.(29)

Remark 2. If Ker(Bh) Ker(B), then we have the following error estimate:

||J Jh||Q (1 +||a||

)(1 +||b||

) infqhQh

||J qh||Q. (30)

To apply Theorem 3, suitable finite element space combinations must bechosen such that the coercivity and the inf-sup conditions are satisfied. Forthis, we choose the RT k/P kdc combinations for discretizing J and , respec-tively. This choice of spaces has the property that div(RT k) = P kdc. Thismeans that the operator Bh is just the restriction of B to the subspace RT

k.So the coercivity condition on a(, ) over Ker(Bh) is implied by the coerciv-ity condition over Ker(B). We will apply the following lemma to analyze theinf-sup condition (27):

Lemma 3. Assume there exists a > 0 such that v L2(), q Q,q 6= 0, that satisfies the continuous inf-sup condition (15). There exists anoperator h : Q RT k such that:

(1)

vh,i (qi h(qi)) = 0 i = 1, 2, (31)

(2) h(q)Q C||q||Q, (32)

Proof. See [16, Sec 7.2.2.].

We can now prove the following proposition:

Proposition 3. The inf-sup condition for the discrete problem (27) is sat-isfied for Qh = RT

k and Vh = Pkdc.

17

Proof. By Theorem 2 there exists a such that v V, q Q, q 6= 0that satisfies the continuous inf-sup condition, equation (13). Since qi H(div; ), by Lemma 3 there exists an operator h : H(div; ) RT k thatsatisfies Equations (31) and (32). Now we can apply the Fortin lemma [15,Prop. 2.8, p. 58] and conclude that the inf-sup condition for the discreteproblem is satisfied for a constant independent of h.

There exists an interpolation operator onto the space P kdc with the follow-ing property [16, p.90]:

Proposition 4. The interpolation operator h : V P kdc satisfies the fol-lowing error estimate for k 0:

v hv2V chk+1|v|k+1, v (Hk+1())2, (33)where |v|k+1, is the Hk+1() semi-norm.

We will also use the following interpolation error estimate from [16, Sec.7.2.2]

Proposition 5. Let v P kdc. There exists an interpolator h : (H(div; ))2 RT k satisfying the following error estimate for q (Hk+1())2 :

h(q) qQ Chk+1(|q|k+1, +2

i=1

|div(qi)|k+1,) (34)

Theorem 4. For ternary diffusion if the binary diffusion coefficients satisfy3D23 > D12 and 3D13 > D12. The mixed finite element method for thelinearized Maxwell-Stefan problem defined by Equations (24) and (25) has asolution (Jh, h) (RT k)2 (P kdc)2, where Jh and h are unique. Additionallyif the solution (, J) (Hk+1())2 (Hk+1()2)2, then the following errorestimates are satisfied:

|| h||V Chk+1(||k+1, + |J |k+1, + |div(J)|k+1,), (35)||J Jh||V Chk+1(|J |k+1, + |div(J)|k+1,), (36)

where | |k+1, denotes the Hk+1 semi-norm over .

Proof. By proposition 3 the discrete inf-sup condition is satisfied, and thecoercivity of the bilinear form a(, ) over RT k is established by the coercivity

18

over (H(div; ))2. Therefore, by Theorem 2, we have the existence of asolution (Jh, h) (RT k)2 (P kdc)2.

Since Ker(Bh) Ker(B) we have the following error estimates from [15]:|| h||V c1 inf

vhPkdc

|| vh||V + c2 infqhRT k

||J qh||Q,

||J Jh||V c3 infqhRT k

||J qh||Q,

where c1 = (1 +||b||), c2 =

||a||, and c3 = (1 +

||a||)(1 + ||b||

).

We use the interpolation error estimate, to get an error estimate for interms of semi-norms:

infvhP

kdc

|| vh||V || h||V

chk+1||k+1, (Hk+1())2,with a constant c independent from h and .

We proceed in the same way using the above interpolator to get an errorestimate for J in terms of the Hk+1 semi-norm:

infqhRT k

||J qh||Q ||J hJ ||Q

Chk+1(|J |k+1, + |div(J)|k+1,),where this holds for all J (Hk+1())2)2. We can now substitute the esti-mates for the infimums of the norms into the error estimates above to getequations (35) and (36).

7. Numerical results

The finite element methods were implemented using the open source soft-ware FreeFem++[20]. The software was used to construct the meshes, tobuild the finite element functions, and for plotting the solutions.

The function i were initially taken to be zero everywhere in the domain,then the linearized Stefan Maxwell problem was solved numerically usingthe direct solver, UMFPACK. The solution h was compared to the previousguess h by computing ||h h||V . If this norm was greater than 1010,the functions h,i were updated as described above, otherwise the fixed pointiterations were stopped. We used only this simple fixed point method as itproved to be very efficient except for one test case where more iterations wererequired.

19

7.1. Analytic test case

A test case was constructed on a domain with boundary conditionsand reaction rates such that the solution to the Maxwell-Stefan problem wasknown exactly. The L2-error between the exact solution and the numericalapproximation was then computed for varying mesh sizes. This was then usedto determine the order of convergence of the mixed finite element methods.

We consider the domain = [0, 1] [0, 1] and proceed with the method ofmanufactured solution where an analytical solution is provided and the data(right-hand side and boundary condition) are adjusted so the Maxwell-Stefanproblem is satisfied. Define two functions f1 and f2 as follows:

f1 =

sinh(2)sin(x

2)

2x [0, 1], y = 1

sinh(y2)

2x = 1 , y [0, 1]

0 Otherwise

f2 =

cosh(2)cos(x

2)

2x [0, 1] y = 1

cos(x2)

2x [0, 1] y = 0

cosh(y2)

2x = 0 y [0, 1]

0 Otherwise

For this test case Dirichlet boundary conditions are used on all , i.e.D = . The reaction rates are defined by two functions r1 and r2 in thedomain as follows:

r1 =

(

21

212D122

+212D232

)

(

sin(x/2) + sinh(y/2)

42

)

(37)

r2 =

(

12

121D232

+121D132

)

(

sin(x/2) + sinh(y/2)

42

)

, (38)

where the in the above equations is defined as follows:

=1

D13D23 121

D23 212

D13. (39)

The exact solution of the Maxwell-Stefan equations for these data is givenby:

20

1 =sin(x/2)sinh(y/2)

2, (40)

2 =cos(x/2)cosh(y/2)

2, (41)

J1 =2

1 +22, (42)

J2 =11

12. (43)

The problem was solved using the finite element methods described inthe previous section with a uniform triangular mesh. The binary diffusioncoefficients were taken to be as follows: D12 = 15, D13 = 10, and D23 = 5.The concentration was assumed to be uniform everywhere, ctot = 1. TheL2-errors on the mole fractions (E) and the fluxes (EJ) were computedwith varying mesh sizes using different mixed and standard finite elementmethods. Using = 1 the fixed point method usually converges in about 6iterations for this test case.

The mixed finite element spaces considered areRT 0/P 0dc , RT1/P 1, RT 1/P 1dc

and BDM1/P 0dc, where the first element refers to the space Qh for fluxes andthe second refers to the space Vh for mole fractions. Note that the spaceRT 1/P 1 does not fall under the hypothesis of Theorem 3, hence it is notclear what should be the expected convergence rate in this case. The prob-lem was also solved using standard finite element methods with finite elementspaces P 1 and P 2.

A comparison of the exact functions with some of the mixed finite elementapproximations can be seen in Figures 1 and 2. In all cases, the finite elementsolutions for the concentrations look very similar to the exact solutions. TheRT 0/P 0dc solution shows small wiggles in the mole fraction isolines due tothe piecewise constant approximation of this variable. On Fig. 2, the fluxcomputed by the RT 1/P 1dc mixed finite element method looks similar to theexact flux. We only show the flux J1 for one method but the trend is thesame for J2 and the other finite element methods.

The L2 errors and order of convergence for all these methods are summa-rized in Figure 3 and Table 1. For RT 0/P 0dc and BDM

1/P 0dc it can be seenthat both the mole fractions and the fluxes have a first order convergencerate. Similarly RT 1/P 1dc has a second order convergence rate in both vari-ables. The standard P k methods have the same k + 1 order convergence in

21

the concentration variable that the RT k/P kdc method has. However, when weattempt to recover the flux from the standard finite element solution we losean order of accuracy.

Table 1: The slopes of the least squares best fit to the -ln(E) vs. -ln(h) data for each ofthe finite element methods

Finite Element Method Slope for Slope for JStandard P 2 3.0001 2.0059Standard P 1 1.9999 0.9999RT 1/P 1dc 1.9997 1.9997RT 0/P 0dc 0.9988 0.9988RT 1/P 1 2.0073 1.0038BDM1/P 0dc 1.0000 1.0038

For the molar flux we find that the RT k/P kdc methods have a higher or-der and better absolute error than the standard P k methods and the sameorder and similar absolute error as the standard P k+1 methods. The fluxin the BDM1/P 0dc method was much more accurate than the flux calculatedusing RT 0/P 0dc but less accurate than higher order RT

1/P 1dc method. Ex-trapolating from this would suggest that numerical solutions found using theBDM2/P 1 method would be as accurate as the RT 1/P 1dc and P

1 methodsin concentration but much more accurate than any of the tested methods inthe flux variables.

7.2. Mazumder test case

In this test case we consider a box of 10cm by 10cm with three openings,one opening on the bottom, one on the top and one to the left, as seen inFigure 4. No flux boundary conditions are used away from the openings (N),and Dirichlet boundary conditions at the openings (D), assuming only onegas is flowing into the box at each opening. There are two variants of thistest case. The first is the one originally proposed in [9] where all the binarydiffusion coefficients are equal and the second proposed in [7] where all threebinary diffusion coefficients are different. For this test case we take our gasesto be N2,H2O and H2.

For these test cases, mixed finite element methods were applied to themass formulation of the Maxwell-Stefan equations as in [7]. This way themass fractions, Yi, and mass fluxes, ji, could be computed directly. A simple

22

IsoValue00.030.060.090.120.150.180.210.240.270.3

(a) Exact solution

IsoValue00.030.060.090.120.150.180.210.240.270.3

(b) RT 0/P0

IsoValue00.030.060.090.120.150.180.210.240.270.3

Species 1

(c) RT 1/P 1

IsoValue00.030.060.090.120.150.180.210.240.270.3

Species 1

(d) RT 1/P 1dc

Figure 1: Comparison of the exact and numerical solutions for 1. Results are shown forthe mesh with 3200 elements.

23

Vec Value00.2179820.4359640.6539450.8719271.089911.307891.525871.743851.961842.179822.39782.615782.833763.051753.269733.487713.705693.923674.14165

(a) Exact Solution

Vec Value00.2254350.450870.6763050.901741.127181.352611.578051.803482.028922.254352.479792.705222.930663.156093.381533.606963.83244.057834.28327

(b) RT 1/P1dc

Figure 2: Plots of the flux J1 for the exact and numerical solutions. Here the colour ofthe arrow represents the magnitude of the flux.

conversion of the variables could have worked but we give their formulationin terms of masses for completeness.

The mass formulation is found using the following identities:

i =MYimi

and Ji =jimi

, (44)

where mi is the mass of species i and M is the mass of the mixture. Theconcentration ctot was also replaced with /M , where is the density of themixture. The mass formulation of the Maxwell-Stefan equations is:

24

(a) Plot for -ln(E) vs. -ln(h)

(b) Plot for -ln(EJ ) vs. -ln(h))

Figure 3: Plots comparing the errors of the different finite element methods with respectto the number of elements in the mesh. A comparison of the errors on mole fractions isshown in (a) and a comparison of the error on molar fluxes is shown in (b)

25

Figure 4: Diagram showing the geometry for test cases 2 and 3. The arrows show whichgas is flowing through the opening.

MYimi

=M2

n

j=1

Yjji YijjmimjDij

, (45)

jimi

= ri, (46)

n

i=1

Yi = 1, (47)

n

i=1

ji = 0. (48)

The mass formulation of Maxwell-Stefan equations rewrites into a mixedvariational formulation as for the equations written in molar form. When thisis done we arrive at the following bilinear form a(, ) for ternary diffusion:

a(j, q) =

M2

((

1

m1m3D13 Y2

)

j1 + Y1j2

)

q1 dx (49)

+

M2

(

Y2j1 +

(

1

m2m3D23 Y1

)

j2

)

q2 dx, (50)

26

where = 1m1m3D13

1m1m2D12

and = 1m2m3D23

1m1m2D12

. For the totalmass and density we have the following:

= Y1m1 + Y2m2 + Y3m3, (51)

M =1

Y1m1

+ Y2m2

+ Y3m3

. (52)

The other parts of the mixed formulation are found just by substituting(44). With this formulation we can now proceed with the next two test cases.

For the Mazumder test case all the binary diffusion coefficients are takento be equal to 10 cm2/s. The value of the coefficient will not change thesolution for the mass fractions [7], it will however change the flux. A non-uniform mesh was created using FreeFEM++s buildmesh function.

The computation was performed using the mesh shown on Figure 5 andthe mixed finite element method RT 1/P 1dc. The simulation took 631 nonlineariterations for = 0.03. The heavy under relaxation was necessary to achieveconvergence of the fixed point. The calculation required a CPU time of 22minutes. Newton-Raphson method would easily improve the convergenceof the fixed point iterations. Computations were also performed using theRT0/P0 method and were visually similar to the RT1/P1dc method. Themain difference was that the isolines for the variable Yi were jagged in theRT0/P0 solution. This is due to the numerical solutions being constant oneach element. The plots for the RT1/P1dc method can be seen in Figures6 and 7. The mass fractions in [7] were calculated on an 80x80 grid usingLagrange elements (P 2). Graphically there is no difference between the tworesults. Fluxes are not given in [7] to be compared to our solutions.

The third test case was presented in [7]. It uses the same domain andboundary conditions as the previous test case, the difference comes from thefact that the binary diffusion coefficients are no longer taken to be equal. Thecoefficients were taken to be DN2H2O = 1, DN2H2 = 10, and DH2H2O =100. The fixed point converged in 631 iterations ( = 0.03) and required aCPU time of 22 minutes. Since the constants and are not zero in eithertest case 2 or 3 the fixed point iteration converges in the same number ofiterations. The mass fractions shown in [7] were computed using P 2 elementson a mesh with 80x80 grid (6400 grid points). Graphically the mass fractionplots in [7] look the same as our solution computed using the RT 1/P 1dc methodon a grid with 1135 points (See Figure 8). Plots for the mass fluxes are

27

Figure 5: Mesh containing 2,148 triangles, 1135 nodes, and 30 elements on each boundaryedge. This mesh was used to compute solutions for test cases 2 and 3.

shown in Figure 9. Here we can see that there is a lower nitrogen mass flowbetween the nitrogen inlet and the water inlet and a larger mass flow betweenthe nitrogen inlet and the hydrogen inlet than for the case of equal binarydiffusion coefficients. Similar remarks can be made for the other two species.As in the previous test case, there is no flux data to compare our solution to.

8. Conclusion

A main advantage of mixed finite element methods is that it allows oneto solve the Maxwell-Stefan equations for the species fluxes and concentra-tions to the same order. These methods do not require the inversion of theMaxwell-Stefan equations. This compares favorably to standard finite ele-ment methods used so far, which require the inversion of the Maxwell-Stefanequations and give at best a convergence one order lower on the fluxes thanon the concentrations. This comes from the fact that the fluxes must berecovered from the gradients of the numerical concentrations. These effectswere replicated explicitly in our first numerical test case. It was also seen thatmixed finite element methods gave similar absolute errors for the concentra-tions as standard finite element methods but achieved optimal convergenceorder on the fluxes as well.

28

IsoValue00.10.20.30.40.50.60.70.80.91

(a) Mass fraction of N2

IsoValue00.10.20.30.40.50.60.70.80.91

(b) Mass fraction of H2O

IsoValue00.10.20.30.40.50.60.70.80.91

(c) Mass fraction of H2

Figure 6: Plots of the mass fractions for the Mazumder steady state test where all binarydiffusion coefficients are taken to be 10 cm2/s

The well-posedness of the mixed variational formulation and the conver-gence of the mixed finite element methods were proved using constraints onthe bilinear diffusion coefficients. The mixed finite element method also con-verged for our third test case even though the binary diffusion coefficientswere well outside of the range used in Theorem 2, suggesting that less restric-tive versions of Theorem 2 and 4 could be proven. It should be noted thatthere are more general versions of Theorems 1 and 3, where the coercivitycondition on a(, ) is replaced by a pair of inf-sup conditions. It is possi-ble that the theoretical results for the mixed finite element methods applied

29

Vec Value06.0074912.01518.022524.029930.037436.044942.052448.059954.067460.074966.082372.089878.097384.104890.112396.1198102.127108.135114.142

(a) Mass flux of N2

Vec Value05.291310.582615.873921.165226.456531.747837.039142.330447.621752.91358.204363.495668.786974.078279.369584.660889.952195.2434100.535

(b) Mass flux of H2O

Vec Value04.820459.6409114.461419.281824.102328.922733.743238.563643.384148.204553.02557.845462.665967.486372.306877.127381.947786.768291.5886

(c) Mass flux of H2

Figure 7: Plots of the mass fluxes for the Mazumder steady state test where all binarydiffusion coefficients are taken to be 10 cm2/s

to Maxwell-Stefan equations could be improved upon by applying the moregeneral theory for abstract saddle point problems.

From a practical standpoint, our mixed finite element approach for theMaxwell-Stefan equations could easily be improved by using a better fixedpoint method. For the highly nonlinear third test case the mixed finiteelement method converged in 631 iterations. We used a heavily under-relaxedfixed point method. The number of iterations could certainly be reduced byapplying a Newton-Raphson method. The solution of the larger linear systemassociated with the mixed methods could also be improved.

30

IsoValue00.10.20.30.40.50.60.70.80.91

(a) Mass fraction of N2

IsoValue00.10.20.30.40.50.60.70.80.91

(b) Mass fraction of H2O

IsoValue00.10.20.30.40.50.60.70.80.91

(c) Mass fraction of H2

Figure 8: Plots of the mass fractions for the steady state test where the binary diffusioncoefficients are taken as DN2H2O = 1cm

2/s, DN2H2 = 10cm2/s, and DH2H2O =

100cm2/s

31

Vec Value015.968431.936947.905363.873779.842295.8106111.779127.747143.716159.684175.653191.621207.59223.558239.526255.495271.463287.432303.4

(a) Mass flux of N2

Vec Value03.471716.9434310.415113.886917.358620.830324.30227.773731.245434.717138.188941.660645.132348.60452.075755.547459.019162.490865.9626

(b) Mass flux of H2O

Vec Value017.472834.945552.418369.891187.3639104.837122.309139.782157.255174.728192.2209.673227.146244.619262.092279.564297.037314.51331.983

(c) Mass flux of H2

Figure 9: Plots of the mass fluxes for the steady state test where the binary diffusioncoefficients are taken as DN2H2O = 1cm

2/s, DN2H2 = 10cm2/s, and DH2H2O =

100cm2/s

32

9. Acknowledgements

This work was supported by a NSERC Discovery Grant. The authorswant to thank the developers of FreeFEM++.

References

[1] J. Maxwell, On the dynamic theory of gases, Phil. Trans. Roy. Soc. 157(1866) 4988.

[2] J. Stefan, Uber das Gleichgewicht und Bewegung, insbesondere dieDiffusion von Gemischen, Sitzungsber. Akad. Wiss. Wien 63 (1871)63124.

[3] J. Duncan, H. Toor, An Experimental Study of Three Component GasDiffusion, AIChEJ 8 (1962) 3841.

[4] R. Krishna, J. Wesselingh, The Maxwell-Stefan approach to mass trans-fer, Chemical Engineering Science 52 (1997) 861911.

[5] R. Taylor, R. Krishna, Multicomponent Mass Transfer, Wiley Series inChemical Engineering, Wiley, 1993.

[6] N. Abdullah, D. Das, Modelling nutrient transport in hollow fibre mem-brane bioreactor for growing bone tissue with consideration of multi-component interactions, Chemical Engineering Science 62 (2007) 58215839.

[7] K. Bottcher, Numerical solution of a multi-component species transportproblem combining diffusion and fluid flow as engineering benchmark,International Journal of Heat and Mass Transfer 53 (2010) 231240.

[8] I.-M. Hsing, P. Futerko, Two-dimensional simulation of water transportin polymer electrolyte fuel cells, Chemical Engineering Science 55 (2000)42094218.

[9] S. Mazumder, Critical assessment of the stability and convergence ofthe equations of multi-component diffusion, Journal of ComputationalPhysics 212 (2006) 383392.

33

[10] K. Peerenboom, J. van Dijk, J. t. T. Boonkkamp, L. Liu, W. Goed-heer, J. van der Mullen, Mass conservative finite volume discretizationof the continuity equations in multi-component mixtures, Journal ofComputational Physics 230 (2011) 35253537.

[11] Y. P. de Diego, F. Wubbolts, P. Jansens, Modelling mass transfer inthe PCA process using the Maxwell-Stefan approach, The Journal ofSupercritical Fluids 37 (2006) 5362.

[12] B. L. Boudin, F. Salvarani, A Mathematical and Numerical Analysisof the Maxwell-Stefan Diffusion Equations, Discrete Contin. Dyn. SystSer. B 17(5) (2012) 14271440.

[13] G. Psofogiannakis, Y. Bourgault, B. Conway, M. Ternan, Mathematicalmodel for a direct propane phosphoric acid fuel cell, Journal of AppliedElectrochemistry 36 (2006) 115130.

[14] D. Bothe, On the Maxwell-Stefan Approach to Multicomponent Dif-fusion, in: J. Escher, P. Guidotti, M. Hieber, P. Mucha, J. W.Pruss, Y. Shibata, G. Simonett, C. Walker, W. Zajaczkowski (Eds.),Parabolic Problems, volume 80 of Progress in Nonlinear DifferentialEquations and Their Applications, Springer Basel, 2011, pp. 8193.URL: http://dx.doi.org/10.1007/978-3-0348-0075-4_5. doi:10.1007/978-3-0348-0075-4_5.

[15] F. Brezzi, M. Fortin, Mixed and hybrid finite elements methods,Springer series in computational mathematics, Springer-Verlag, 1991.

[16] A. Quarteroni, A. Valli, Numerical Approximation of Partial DifferentialEquations, Springer Series in Computational Mathematics, Springer,2008. URL: http://books.google.ca/books?id=j7WmQ1yFjkAC.

[17] A. Bressan, Lecture Notes on Sobolev Spaces, http://www.math.psu.edu/bressan/PSPDF/sobolev-notes.pdf, 2013.

[18] P. Raviart, J. Thomas, A mixed finite element method for 2-nd or-der elliptic problems, in: I. Galligani, E. Magenes (Eds.), Mathemat-ical Aspects of Finite Element Methods, volume 606 of Lecture Notesin Mathematics, Springer Berlin Heidelberg, 1977, pp. 292315. URL:http://dx.doi.org/10.1007/BFb0064470. doi:10.1007/BFb0064470.

34

[19] F. Brezzi, J. J. Douglas, L. Marini, Two families of mixed finite elementsfor second order elliptic problems, Numerische Mathematik 47 (1985)217235.

[20] F. Hecht, FreeFEM++, http://www.freefem.org/ff++/ftp/freefem++doc.pdf, 2013.

35