## Abstract

We present the extension of the complete flux scheme to advection-diffusion-reaction systems. For stationary problems, the flux approximation is derived from a local system boundary value problem for the entire system, including the source term vector. Therefore, the numerical flux vector consists of a homogeneous and an inhomogeneous component, corresponding to the advection-diffusion operator and the source term, respectively. For time-dependent systems, the numerical flux is determined from a quasi-stationary boundary value problem containing the time-derivative in the source term. Consequently, the complete flux scheme results in an implicit semidiscretization. The complete flux scheme is validated for several test problems.

## Introduction

Conservation laws are ubiquitous in continuum physics, they occur in disciplines like fluid mechanics, combustion theory, plasma physics, semiconductor physics etc. These conservation laws are often of advection-diffusion-reaction type, describing the interplay between different processes such as advection or drift, diffusion or conduction and (chemical) reaction or recombination/generation. Examples are the conservation equations for reacting flow [14] or plasmas [15].

Diffusion in mixtures containing many species is often very complex. In particular, when there is no dominant species Fick’s law, stating that the diffusion velocity of a species is proportional to its mass fraction gradient, is often not adequate. Instead, the diffusion velocities of all species are coupled through the Stefan-Maxwell equations, which relate the mole fraction gradient of a species to the diffusion velocities of *all* species; see e.g. [2] for a detailed description of multi-species diffusion. This means that the continuity equations for multi-component mixtures are coupled with the Stefan-Maxwell equations [7]. Peerenboom et al. [13] derive from the continuity equations and the Stefan-Maxwell equations a system of conservation laws of advection-diffusion-reaction type, coupled through the diffusion term. The advection/drift velocities of the species in a mixture are often not the same, due to, e.g., different mobilities [15]. Therefore, we study in this paper as model problem a coupled advection-diffusion-reaction system, defined through a diagonal advection matrix and a (full) diffusion matrix.

The numerical solution of such a system requires at least an adequate space discretization. There are many classes of methods available, such as finite element, finite difference, finite volume or spectral methods. We restrict ourselves to finite volume methods; for a detailed account see, e.g., [6, 11, 23]. Finite volume methods are based on the integral formulation of the conservation law, i.e., the equation (system) is integrated over a disjunct set of control volumes covering the domain. The resulting (semi)discrete system involves fluxes at the interfaces of the control volumes, which need to be approximated. Our objective in this paper is to extend the complete flux scheme presented in [18, 19] to advection-diffusion-reaction systems, thereby including the coupling between the constituent equations in the discretization.

For stationary problems, the complete flux approximation, either scalar or vectorial, is derived from a local boundary value problem (BVP) for the *entire* equation/system, including the source term (vector). As a consequence, the numerical flux is the superposition of a homogeneous and an inhomogeneous flux, corresponding to the advection-diffusion operator and the source term, respectively. The numerical flux vector closely resembles its scalar counterpart and is formulated in terms of matrix functions of the Peclet matrix ** P**, generalizing the well-known (grid) Peclet number

*P*. The inclusion of the inhomogeneous flux is important for dominant advection, since it ensures second order accuracy. For dominant diffusion the inhomogeneous flux is of little importance. The combined finite volume-complete flux scheme has a three-point coupling, resulting in a block-tridiagonal algebraic system which can be solved very efficiently, and virtually never generates spurious oscillations.

For time-dependent conservation laws, the numerical flux (vector) has to be computed from a local, quasi-stationary BVP, containing the time derivative in the right hand side. Consequently, the numerical flux also depends on the time derivative, leading to an implicit block-tridiagonal ODE system. Analogous to the stationary case, for dominant advection second order accurate solutions can only be obtained if the time derivative is included in the inhomogeneous flux.

Coupled discretization schemes are very common for hyperbolic initial value problems, think of the Godunov scheme and all high resolution schemes based on it, which are derived from the (approximate) solution of a local initial value problem (IVP); see, e.g., [20]. To our knowledge, there are very few coupled discretization schemes for advection-diffusion-reaction boundary value systems. Doolan et al. [4] discuss finite difference methods for second order ODE systems, where the coefficient of the second derivative is just a scalar. Another exception is the exponential fitting scheme in [17] for avalanche generation in semiconductors. In that publication, the coupling in the discretization comes from the avalanche generation source term.

In this paper we systematically derive the complete flux scheme for systems of conservation laws, where we assume that the coefficient matrices and the source term vector are given. So, we are *not* concerned with, e.g., the computation of the flow or the electric field. We have organized our paper as follows. The finite volume method is briefly summarized in Sect. 2. In Sect. 3 we outline the scalar version of the complete flux scheme, which is subsequently generalized to stationary systems in Sect. 4. Next, in Sect. 5 we give the scheme for time-dependent problems. To test the scheme, we apply it in Sect. 6 to several test problems. Finally, we end with a summary and conclusions in Sect. 7.

## Finite Volume Discretization

In this section we outline the finite volume method (FVM) for a generic system of conservation laws of advection-diffusion-reaction type, restricting ourselves to one-dimensional problems. So, consider the following system

where ** U**=diag(

*u*

_{1},

*u*

_{2},…,

*u*

_{ m }) is the advection matrix, \(\boldsymbol {\mathcal {E}} = ( \varepsilon_{ij} )\) the diffusion matrix and

**the source term vector. This system is a model problem that can be derived from the continuity equations for a mixture combined with the Stefan-Maxwell equations for multi-species diffusion; see [13]. The vector of unknowns**

*s***contains, e.g., the species mass fractions of a reacting flow or a plasma. The matrix**

*φ***then represents the advection/drift velocities of the individual species and \(\boldsymbol {\mathcal {E}} \) relates the mass diffusion flux to the gradients of the mass fractions. In [3] it is proven that \(\boldsymbol {\mathcal {E}} \) has**

*U**m*positive eigenvalues and a complete set of eigenvectors, and therefore \(\boldsymbol {\mathcal {E}} \) is regular. Note that the constituent equations of (2.1) are coupled through the diffusion matrix \(\boldsymbol {\mathcal {E}} \). The parameters \(\boldsymbol {\mathcal {E}} \) and

**are usually (complicated) functions of the unknown**

*s***, and**

*φ***has to be computed from (flow) equations accompanying (2.1), however, for the sake of discretization, we consider these as given functions of**

*U**x*and

*t*.

Associated with system (2.1) we introduce the flux vector ** f**, defined by

System (2.1) then reduces to *∂*
** φ**/

*∂t*+

*∂*

**/**

*f**∂x*=

**. Integrating this system over an arbitrary interval [**

*s**α*,

*β*] we obtain the integral form of the conservation law, i.e.,

In the FVM we cover the domain with a finite number of disjunct intervals (control volumes) *I*
_{
j
} of size Δ*x*. In this paper we choose the vertex-centered approach [23], i.e., we first choose the grid points *x*
_{
j
} where the variable ** φ** has to be approximated and subsequently define

*I*

_{ j }:=[

*x*

_{ j−1/2},

*x*

_{ j+1/2}] with \(x_{j \pm1/2} := \tfrac{1}{2} ( x_{j} + x_{j \pm1} )\). Imposing the integral form (2.3) on each of the intervals

*I*

_{ j }and approximating the integrals by the midpoint rule, we obtain the semi-discrete conservation law

where \(\dot{ \boldsymbol {\varphi } }_{j}(t)\) is the numerical approximation of *∂*
** φ**(

*x*

_{ j },

*t*)/

*∂t*,

*F*_{ j+1/2}(

*t*) the numerical flux (vector) approximating

**at**

*f**x*=

*x*

_{ j+1/2}and

*s*_{ j }(

*t*):=

**(**

*s**x*

_{ j },

*t*). In the following we omit the dependence on

*t*. The FVM has to be completed with expressions for the numerical flux. The basic idea of the complete flux scheme is to compute the numerical flux from a local solution of (2.1). This implies that for the stationary case, we require that the numerical flux

*F*_{ j+1/2}linearly depends on

**and**

*φ***in the neighboring grid points**

*s**x*

_{ j }and

*x*

_{ j+1}, i.e., we are looking for an expression of the form

where the coefficient matrices ** α** etc. are piecewise constant and only depend on

**and \(\boldsymbol {\mathcal {E}} \). For time-dependent problems, the time derivative \(\dot{ \boldsymbol {\varphi } }\) can be included as well.**

*U*In this paper we restrict ourselves to uniform grids, which is not a real restriction. The derivation of the complete flux scheme in the next sections can be easily extended to nonuniform grids. In fact, we have already employed the homogeneous flux scheme on nonuniform grids to simulate multi-species diffusion [13].

The procedure to compute *F*_{
j+1/2} is detailed in the next sections. First, in Sect. 3, we outline the flux approximation for a scalar conservation law, and subsequently in Sect. 4 and Sect. 5, we extend the derivation to stationary and time-dependent systems, respectively.

## Numerical Approximation of the Scalar Flux

In this section we present the (stationary) complete flux scheme for the scalar flux, which is based on the integral representation of the flux. The derivation is a summary of the theory in [18, 22].

The scalar conservation law can be written as d*f*/d*x*=*s* with *f*=*uφ*−*ε* d*φ*/d*x* (*ε*>0). The integral representation of the flux *f*
_{
j+1/2}=*f*(*x*
_{
j+1/2}) at the cell edge *x*
_{
j+1/2} located between the grid points *x*
_{
j
} and *x*
_{
j+1} is based on the following model boundary value problem for the variable *φ*

In accordance with (2.5), we derive an expression for the flux *f*
_{
j+1/2} corresponding to the solution of the *inhomogeneous* BVP (3.1a)–(3.1b), implying that *f*
_{
j+1/2} not only depends on *u* and *ε*, but also on the source term *s*. It is convenient to introduce the variables *a*, *P*, *A* and *S* for *x*∈(*x*
_{
j
},*x*
_{
j+1}) by

Here, *P* and *A* are the Peclet function and Peclet integral, respectively, generalizing the well-known (numerical) Peclet number. Integrating the differential equation d*f*/d*x*=*s* from *x*
_{
j+1/2} to *x*∈(*x*
_{
j
},*x*
_{
j+1}) we get the integral balance *f*(*x*)−*f*
_{
j+1/2}=*S*(*x*). Using the definition of *A* in (3.2), it is clear that the flux can be rewritten as *f*=−*ε* e^{A} d(e^{−A}
*φ*)/d*x*. Substituting this into the integral balance and integrating from *x*
_{
j
} to *x*
_{
j+1} we obtain the following expressions for the flux

where \(f^{\mathrm{h}}_{j+1/2}\) and \(f^{\mathrm{i}}_{j+1/2}\) are the homogeneous and inhomogeneous part, corresponding to the homogeneous and particular solution of (3.1a)–(3.1b), respectively, and *A*
_{
j
}=*A*(*x*
_{
j
}).

In the following we assume that *u* and *ε* are constant, extension to variable coefficients is discussed in [18, 22]. In this case we can determine all integrals involved. Moreover, substituting the expression for *S*(*x*) in (3.3c) and changing the order of integration, we can derive an alternative expression for the inhomogeneous flux. This way we obtain

Here *B*(*z*)=*z*/(e^{z}−1) is the generating function of the Bernoulli numbers, in short Bernoulli function, see Fig. 1, and *G*(*σ*;*P*) the Green’s function for the flux, given by

see Fig. 2. Note that the homogeneous flux (3.4a) is the well-known exponential flux [12].

Next, we give the numerical flux *F*
_{
j+1/2}. For the homogeneous component \(F_{j+1/2}^{\mathrm{h}}\) we obviously take (3.4a), i.e., \(F_{j+1/2}^{\mathrm{h}} =f_{j+1/2}^{\mathrm{h}}\). The approximation of the inhomogeneous component \(f^{\mathrm{i}}_{j+1/2}\) depends on *P*. For dominant diffusion (|*P*|≪1) the average value of *G*(*σ*;*P*) is small, which implies that the inhomogeneous flux is of little importance. On the contrary, for dominant advection (|*P*|≫1), the average value of *G*(*σ*;*P*) on the half interval upwind of \(\sigma= \tfrac{1}{2} \), i.e., the interval \([0,\tfrac{1}{2} ]\) for *u*>0 and \([\tfrac{1}{2} ,1]\) for *u*<0, is much larger than the average value on the downwind half. This means that for dominant advection the upwind value of *s* is the relevant one, and therefore we replace *s*(*x*(*σ*)) in (3.4b) by its upwind value *s*
_{u,j+1/2}, i.e., *s*
_{u,j+1/2}=*s*
_{
j
} if *u*≥0 and *s*
_{u,j+1/2}=*s*
_{
j+1} if *u*<0, and evaluate the resulting integral exactly. This way we obtain

where *W*(*z*)=(e^{z}−1−*z*)/(*z*(e^{z}−1)); see Fig. 1. From this expression it is once more clear that the inhomogeneous component is only of importance for dominant advection. We refer to (3.6) as the complete flux (CF) scheme, as opposed to the homogeneous flux (HF) scheme for which we omit the inhomogeneous component.

## Numerical Approximation of the Flux Vector

We extend the derivation in the previous section to systems of conservation laws, including the coupling between the constituent equations in the discretization. The representation of the flux vector turns out to be similar to its scalar counterpart.

Analogous to the scalar case, the integral representation of the flux vector *f*_{
j+1/2} at the interface *x*=*x*
_{
j+1/2} is determined from the system BVP

where we assume that the matrices ** U** and \(\boldsymbol {\mathcal {E}} \) are constant. Recall that \(\boldsymbol {\mathcal {E}} \) is regular, whereas

**might be singular. In the derivation that follows, we need the following variables**

*U* cf. (3.2). We refer to ** P** as the Peclet matrix, generalizing the Peclet number. We have to determine several matrix functions

*g*(

**) and the matrix sign function sgn(**

*P***), which depend on the eigenvalues and eigenvectors of**

*A***. We assume that**

*A***has**

*A**m*real eigenvalues

*λ*

_{ i }and

*m*corresponding, linearly independent eigenvectors

*v*_{ i }, satisfying the generalized eigenvalue problem

Although this assumption is not always correct, it does hold for some important cases. First, when ** U**=

*u*

**this assumption is trivially satisfied. Second, the assumption is also correct when \(\boldsymbol {\mathcal {E}} \) is symmetric positive definite. Then, \(\boldsymbol {\mathcal {E}} \) has the Cholesky-decomposition \(\boldsymbol {\mathcal {E}} = \boldsymbol {L} \boldsymbol {L} ^{\mathrm{T}}\), and the eigenvalue problem (4.3) can be rewritten as**

*I* where ** w**=

*L*^{T}

**. Since**

*v*

*L*^{−1}

*UL*^{−T}is symmetric it has an orthogonal set of eigenvectors

*w*_{ i }, and consequently, the corresponding eigenvectors

*v*_{ i }are linearly independent.

Since ** A** has a complete set of eigenvectors, its (spectral) decomposition is given by

Note that the matrices **Λ** and ** V** are constant. Based on this decomposition, we can determine any matrix function

*g*(

**) that is defined on the spectrum of**

*P***and the matrix sign function sgn(**

*A***) as follows [9, 10]**

*A*where we define sgn(0)=1. Moreover, we need the following properties of matrix exponentials

for arbitrary square matrices *A*_{1} and *A*_{2}. An alternative representation of *g*(** P**) in case

**is not diagonalizable is based on the Jordan canonical form, however, this will not be elaborated further.**

*A*We can essentially repeat the derivation in Sect. 3. First, integrating the system d** f**/d

*x*=

**from**

*s**x*

_{ j+1/2}to

*x*∈(

*x*

_{ j },

*x*

_{ j+1}) we get the integral balance

with *f*_{
j+1/2}=** f**(

*x*

_{ j+1/2}). Using the definition of

**in (4.2) and the first property in (4.7), it is clear that the flux vector can be rewritten as**

*A* Next, substituting this expression in (4.8), isolating the derivative d(e^{−xA}
** φ**)/d

*x*, integrating from

*x*

_{ j }to

*x*

_{ j+1}and using the first three properties in (4.7) we obtain the following relation for the flux

Consider the computation of the integral in the left hand side of (4.10). The difficulty is that ** A** might be singular, in case

**is singular. Using the spectral decomposition (4.5) we can compute the integral as follows**

*U* When ** A** is singular, at least one of its eigenvalues

*λ*

_{ i }=0. Taking this into consideration the integrals in the right hand side of (4.11b) have to be formulated as

where the function sinhc is defined as sinhc(*z*)=sinh*z*/*z* for *z*≠0 and sinhc(0)=1, and therefore (4.12) is correct for both *λ*
_{
i
}≠0 and *λ*
_{
i
}=0. Substituting (4.12) in (4.11a)–(4.11b) and using the definition of matrix functions in (4.6) the integral of e^{−xA} can be evaluated as

Inserting this relation in the left hand side of (4.10), we can derive the following expression for the flux

thus also in the system case the flux is a superposition of a homogeneous and an inhomogeneous component, as anticipated. Note that \(\mathrm{sinhc} ( \tfrac{1}{2} \boldsymbol {P} )\) is regular, even if ** P** is singular.

Consider first the homogeneous flux, which follows from (4.14) if we set ** S**(

*x*)=

**0**. Using the last property in (4.7) we can rewrite the expression for the homogeneous flux as

analogous to the scalar flux; cf. (3.4a). For the numerical flux we simply take \(\boldsymbol {F}_{j+1/2}^{\mathrm{h}} = \boldsymbol {f} _{j+1/2}^{\mathrm{h}}\). Rearranging terms in (4.15) and using the relation *B*(−*z*)−*B*(*z*)=*z*, we can derive the alternative representation

reminiscent of the central difference approximation of (2.2), albeit with a modified diffusion matrix \(\tfrac{1}{2} \boldsymbol {\mathcal {E}} ( B( \boldsymbol {P} ) +B(- \boldsymbol {P} ) )\).

The derivation of the inhomogeneous flux is more involved. Substituting the expression for ** S**(

*x*) in the integral in (4.14) and changing the order of integration, we obtain

where *x*
_{p}(*x*)=*x*
_{
j
} for *x*
_{
j
}≤*x*≤*x*
_{
j+1/2} and *x*
_{p}(*x*)=*x*
_{
j+1} for *x*
_{
j+1/2}<*x*≤*x*
_{
j+1}, i.e., the *x*-coordinate of the grid point closest to *x*. Introducing the scaled coordinate *σ*(*x*)=(*x*−*x*
_{
j
})/Δ*x*, we can derive the following alternative expression for the inhomogeneous flux

cf. (3.4b). The matrix ** G** in (4.18), relating the flux vector to the source term vector, is referred to as the Green’s matrix for the flux and is given by

Note that the matrices *B*(−*σ*
** P**) and

*B*((1−

*σ*)

**) are always regular. When the Peclet matrix**

*P***is nonsingular, this expression reduces to**

*P* cf. (3.5). In the derivation of (4.19b) we used that ** P** commutes with

*g*(

**) for arbitrary**

*P**g*. The matrix

**satisfies the relation \(\boldsymbol {G} ( \tfrac{1}{2} -; \boldsymbol {P} )- \boldsymbol {G} (\tfrac{1}{2} +; \boldsymbol {P} ) = \boldsymbol {I} \), implying that the diagonal entries are discontinuous at \(\sigma=\tfrac{1}{2} \) with jump 1, whereas the off-diagonal entries are continuous. By analogy with the scalar case, we replace in the integral representation (4.18) the source term**

*G***(**

*s**x*(

*σ*)) by its upwind value

*s*_{u,j+1/2}, to be specified shortly, and evaluate the resulting integral exactly, to obtain the inhomogeneous numerical flux

with *W*(** P**) defined in (4.6) with

*g*(

*z*)=

*W*(

*z*).

The upwind value of ** s** is not trivial since different advection velocities are intertwined. Therefore, we first decouple system (4.1a) as follows

where ** ψ**=

*V*^{−1}

**, or written componentwise**

*φ* From these scalar advection-diffusion-reaction equations for *ψ*
_{
i
} we conclude that the upwind values for \(\tilde{s}_{i}\) are \(\tilde{s}_{i, \mathrm {u} ,j+1/2} =\tilde{s}_{i,j}\) if *λ*
_{
i
}≥0 and \(\tilde{s}_{i, \mathrm {u} ,j+1/2} = \tilde{s}_{i,j+1}\) if *λ*
_{
i
}<0, or alternatively,

Combining these relations in vector form, using the definition of sgn(**Λ**) in (4.6), we have

The upwind value of ** s** is then given by \(\boldsymbol {s}_{\mathrm{u},j+1/2} = \boldsymbol {\mathcal {E}} \boldsymbol {V} \tilde{s}_{\mathrm{u},j+1/2}\), which can be expressed in terms of

*s*_{ j }and

*s*_{ j+1}as follows

with the matrix sign function sgn(** A**) defined in (4.6).

To summarize, the numerical flux *F*_{
j+1/2} is the superposition

with the homogeneous component \(\boldsymbol {F}_{j+1/2}^{\mathrm{h}} = \boldsymbol {f} _{j+1/2}^{\mathrm{h}}\) defined in (4.15), and the inhomogeneous component \(\boldsymbol {F}_{j+1/2}^{\mathrm{i}}\) defined in (4.20) and (4.24). This flux approximation is referred to as the complete flux (CF) scheme for systems, as opposed to the homogeneous flux (HF) scheme (4.15).

## Extension to Time-Dependent Conservation Laws

In this section we present the extension of the complete flux scheme to time-dependent conservation laws. We follow the same approach as in [19] where the time-dependent scalar flux is introduced.

For the numerical flux *F*_{
j+1/2} in (2.4) we have two options. First, we can simply take the stationary flux, henceforth referred to as the stationary complete flux (SCF) scheme. Alternatively, we can take into account *∂*
** φ**/

*∂t*if we determine the numerical flux from the following quasi-stationary BVP

Thus we have included the time derivative in the modified source term \(\hat{\boldsymbol{s} } := \boldsymbol{s} - \partial \boldsymbol {\varphi } /\partial t\). Repeating the derivation in the previous section, replacing ** s** with \(\hat {\boldsymbol{s} }\), we obtain

where \(\dot{ \boldsymbol {\varphi } }_{\mathrm{u},j+1/2}\) is the upwind value of *∂*
** φ**(

*x*

_{ j+1/2},

*t*)/

*∂t*, defined analogously to (4.24). This flux contains the upwind value of the time derivative and is referred to as the transient complete flux (TCF) scheme. Analogous to the stationary case, we conclude that inclusion of the time derivative is only of importance for dominant advection.

Combining the expression in (5.2) with the semi-discrete conservation law (2.4) we find

where the coefficient matrices ** α**,

**etc. are defined by**

*β*The equations in (5.3a)–(5.3b) define a block-tridiagonal implicit ODE system. Finally, we have to apply a suitable time integration method, for which we take the trapezoidal rule.

To conclude, we note that the computational cost of computing matrix functions *g*(** P**) is rather modest. More specifically, the computation of these matrix functions requires \(\mathcal {O} ( m^{3} )\) flops, usually for small integers

*m*, which is negligible compared to the \(\mathcal {O} ( N m^{3} )\) flops required to solve a block-tridiagonal system of size

*Nm*with block size

*m*.

## Numerical Examples

In this section we apply the flux approximation schemes from the previous sections to four model problems. The first two serve to verify the order of convergence of the discretization and the latter two relate to mixtures.

### Example 1

(Stationary system with interior layer)

We solve the BVP

where the advection and the diffusion matrices ** U** and \(\boldsymbol {\mathcal {E}} \) and the source term

**are given by**

*s* respectively. We take *u*
_{1}<0 and *u*
_{2}>0 in agreement with the boundary conditions in (6.1b), i.e., *x*=1 is the inflow and *x*=0 the outflow boundary for *φ*
_{1}, corresponding to the Dirichlet and Neumann boundary condition, respectively, and vice versa for *φ*
_{2}. The source term has a sharp peak at \(x = \tfrac{1}{2}\), causing a steep interior layer, provided 0<*ε*≪1. Typical solutions of (6.1a)–(6.1b) are shown in Fig. 3.

In order to handle the combination of Dirichlet and Neumann boundary conditions, say at *x*=0, we require the difference scheme to hold at the first grid point *x*
_{1}=0, thus introducing the unknown *φ*_{0} in the virtual grid point *x*
_{0}=−Δ*x*. We have to eliminate *φ*_{0} using the boundary conditions at *x*=0. Applying the standard central difference approximation to d*φ*
_{1}(0)/d*x*=0 and linear extrapolation to *φ*
_{2}, we obtain the second order approximations *φ*
_{1,0}=*φ*
_{1,2} and *φ*
_{2,0}=2*φ*
_{2,L}−*φ*
_{2,2}, or written in matrix-vector form,

The boundary conditions at *x*=1 are treated in a similar way.

We consider the CF and HF numerical solutions for *u*
_{1}=−1, *u*
_{2}=0.1 and *ε*=10^{−8}, i.e., advection dominated flow. In this case it is meaningful to compare the numerical solutions with the reduced solution *φ*_{r} of (6.1a)–(6.1b), i.e., the solution with \(\boldsymbol {\mathcal {E}} =\boldsymbol{O}\) and the Neumann outflow boundary conditions omitted. Let *h*=Δ*x* be the grid size. To determine the accuracy of a numerical solution we compute the average discretization errors *e*
_{
i
}(*h*):=*h*||*φ*
_{
i
}−*φ*
_{r,i
}||_{1} (*i*=1,2), where *φ*
_{r,i
} denotes the *i*th component of the reduced solution restricted to the grid. Figure 4 shows *e*
_{
i
}(*h*) as a function of *h* for *α*=0.05 (strong coupling) and *α*=0.75 (weak coupling). From this figure it is clear that initially, on rather coarse grids, the discretization errors of both flux approximations are approximately the same, whereas for decreasing *h* the CF scheme is clearly more accurate. In fact, the CF numerical approximations show second order convergence behavior, whereas the HF solutions are only first order accurate.

### Example 2

(Traveling waves)

We solve an initial boundary value problem (IBVP) for the advection-diffusion-reaction system (2.1) on the domain 0<*x*<1, *t*>0, where ** U** and \(\boldsymbol {\mathcal {E}} \) are defined in (6.2) with −

*u*

_{1}=

*u*

_{2}=

*u*(

*u*>0) and where

**is chosen such that the exact solution is given by**

*s* Initial and boundary conditions are chosen accordingly. Parameter values for the exact solution are: *a*
_{1}=8*π*, *b*
_{1}=4*π*, *a*
_{2}=2*a*
_{1} and *b*
_{2}=5*b*
_{1}.

As an illustration, we compare the SCF and TCF numerical solutions in Fig. 5. Clearly, the SCF numerical solution is very dissipative, whereas the TCF solution is virtually not damped. This behavior is in agreement with [19], where it is shown that for dominant advection the scalar SCF scheme generally has a much larger dissipation error than the corresponding scalar TCF scheme.

To determine the order of convergence of the SCF and TCF schemes we take Δ*x*=Δ*t*=:*h* and compute the average discretization errors \(e_{i}(h) := h || \varphi_{i} - \varphi_{i}^{\ast} ||_{1}\) (*i*=1,2) at *t*=1, where \(\varphi_{i}^{\ast}\) denotes the *i*th component of the exact solution, restricted to the grid. Figure 6 shows the errors *e*
_{1}(*h*) for *ε*=10^{−8} and *α*=0.1 (dominant advection and strong coupling) and for *ε*=10^{−2} and *α*=0.75 (dominant diffusion and weak coupling). In the former case, the TCF numerical solution displays second order convergence for *h*→0, whereas the SCF solution is very inaccurate due to excessive damping. In the latter case, both solutions show second order convergence behavior, although the TCF solution is the more accurate one.

### Example 3

(Dissociation of H_{2})

In this example we consider a model problem for multi-component diffusion in a gas mixture. The governing equations for the mass fractions *y*
_{
i
} of the constituent species can be written as [13]

where *ρ* is the density and ** v** the velocity of the mixture,

*ε*

_{ ij }are the elements of the diffusion matrix \(\boldsymbol {\mathcal {E}} \)

^{Footnote 1}and

*s*

_{ i }are the source terms for the species. These equations describe the mass balance for each species and are coupled through the diffusion and the reaction terms.

The diffusion matrix relates the diffusive mass fluxes to the mass fraction gradients. Its derivation proceeds in the following steps; see [7, 13] for a detailed account. First, the Stefan-Maxwell equations have to be inverted to express the diffusion velocities in terms of the species mole fraction gradients. Second, the mole fraction gradients have to be converted to mass fraction gradients. Both steps require a regularization procedure; see e.g. [5, 7, 8]. As a result \(\boldsymbol {\mathcal {E}} = \boldsymbol {R} \widetilde{\boldsymbol {F}}^{-1} \widetilde{ \boldsymbol {M} }\) with ** R**=diag(

*ρy*

_{ i }), \(\widetilde{\boldsymbol {F}}\) the regularization of the friction matrix

**, which relates the diffusion velocities to the mole fraction gradients, and \(\widetilde{ \boldsymbol {M} }\) the regularization of the matrix relating the mole fraction gradients to the mass fraction gradients. The regularized friction matrix is defined as \(\widetilde{\boldsymbol {F}} = \boldsymbol {F}+ \alpha \boldsymbol {y} \boldsymbol {y} ^{\mathrm{ T}}\) with**

*F**α*>0 a free parameter and

**the vector containing all species mass fractions. The diffusion matrix is generally not symmetric.**

*y*Since the diffusion matrix and also the source term depend in a nonlinear way on the mass fractions we employ the following iteration scheme. We choose a constant initial guess for all species. From this we compute the diffusion matrix and the source term, determine the CF or HF-discretization scheme, solve the corresponding linear system and obtain a new approximation of the mass fractions. We repeat this procedure until convergence.

As a special case we consider the dissociation of H_{2} in a binary mixture of H (species 1) and H_{2} (species 2) governed by the reaction

For this reaction, the source terms are given by

with *m*
_{
i
} (*i*=1,2) the mass of species *i* and *K* the reaction rate coefficient. The dependence of *K* on the temperature *T* is given by the Arrhenius expression

with parameters *C*=6×10^{−16} m^{3}s^{−1}, *β*=0.073, *T*
_{ref}=1K and *T*
_{a}=5.3381×10^{4} K. The density follows from the ideal gas equation of state which reads

with *p* the pressure and *K*
_{b} Boltzmann’s constant.

We have computed the steady solution on a one-dimensional domain [0,*L*] (*L*=2×10^{−3} m), subject to the boundary conditions

In this case the mass flux *ρv*=Const and a given parameter. In our numerical simulations we took the somewhat artificial temperature profile

in order to create strong reaction terms in the center of the domain. In Fig. 7 we present the numerical solutions computed with the CF and HF schemes. We can distinguish an inflow region, a reaction zone and a boundary layer near *x*=*L*. The fine grid solutions differ very little, however for the coarse grid, the CF numerical solution is more accurate in the reaction zone than the HF solution, due to the inclusion of the inhomogeneous flux.

### Example 4

(System with stiff source term)

We solve the IBVP

with ** U** and \(\boldsymbol {\mathcal {E}} \) defined in (6.2). The reaction term can be interpreted as a model for the reaction

with *φ*
_{
i
} the mass fraction of species \(\mathcal{S}_{i}\) and with *k*
_{1}=1 and *k*>1 the reaction rates of the first and second reaction, respectively. For *k*≫1 the second reaction proceeds much faster than the first one, and thus the system is stiff. As an illustration we show in Fig. 8 some numerical solutions of (6.4a)–(6.4c) computed with the TCF scheme. For *k*=1 the contribution of the source term is relatively small, and the solution is determined by the advection-diffusion balance defined by (6.4a). A boundary layer near *x*=1 starts to develop. On the other hand, for *k*=10^{3}, the source term is dominant, evidenced by the thin layer near *x*=0.

## Summary, Conclusions and Future Research

We have extended the complete flux scheme to advection-diffusion-reaction systems, including the coupling between the constituent equations in the (space) discretization. To derive the stationary scheme, we first determine an integral representation for the flux vector from a local system BVP for the *entire* system, including the source term vector. As a result, the flux vector consists of two parts, i.e., a homogeneous and an inhomogeneous flux, corresponding to the advection-diffusion operator and the source term vector, respectively. An alternative expression of the inhomogeneous flux in terms of the so-called Green’s matrix is given. Next, replacing the source term vector by its upwind value, we could derive the numerical flux, which obviously is also a superposition of a homogeneous and inhomogeneous part. The numerical flux is almost identical to its scalar counterpart, the major difference is that the Peclet number *P* should be replaced by the Peclet matrix ** P** and the functions operating on

*P*should be replaced by their matrix versions.

For time dependent problems, the flux should be computed from a quasi-stationary BVP containing the time derivative in the right hand side. As a consequence, the inhomogeneous flux also depends on the time derivative and the resulting semidiscretization is an implicit ODE system. The inclusion of source term and time derivative in the inhomogeneous flux turns out to be important for advection dominated problems.

Extensions of the scheme we have in mind are the following. First, for nonsmooth, time-dependent problems the complete flux scheme might generate spurious oscillations due to large dispersion errors [19]. This is a shortcoming that should be remedied by applying some form of damping, or possibly, applying (W)ENO reconstruction [16]. Second, extension to two and three-dimensional problems is required; see [18] where the two-dimensional scalar scheme is discussed. Third, we can combine the integral representation of the flux with Gauss quadrature rules to derive higher order schemes; see [1] for the scalar flux. Finally, we will apply the scheme to more problems from continuum physics, like the simulation of plasmas or laminar flames governed by multi-species diffusion. A first effort in this direction is presented in [13, 21] where the homogeneous flux approximation is applied to the numerical simulation of plasmas.

## Notes

- 1.
In [13] this matrix is referred to as the flux diffusion matrix

**Γ**.

## References

- 1.
Anthonissen, M.J.H., ten Thije Boonkkamp, J.H.M.: A compact high order finite volume scheme for advection-diffusion-reaction equations. In: Numerical Analysis and Applied Mathematics: International Conference on Numerical Analysis and Applied Mathematics. AIP Conference Proceedings, vol. 1168, pp. 410–414 (2009)

- 2.
Chapman, S., Cowling, T.: The Mathematical Theory of Non-Uniform Gases, 3rd edn. Cambridge Mathematical Library. Cambridge University Press, Cambridge (2010)

- 3.
Cullinan, H.T. Jr.: Analysis of the flux equations of multicomponent diffusion. Ind. Eng. Chem. Fundam.

**4**(2), 133–139 (1965) - 4.
Doolan, E.P., Miller, J.J.H., Schilders, W.H.A.: Uniform Numerical Methods for Problems with Initial and Boundary Layers. Boole Press, Dublin (1980)

- 5.
Ern, A., Giovangigli, V.: Multicomponent Transport Algorithms. Springer, Heidelberg (1994)

- 6.
Eymard, R., Gallouët, T., Herbin, R.: Finite Volume Methods. In: Ciarlet, P.G., Lions, J.L. (eds.), Handbook of Numerical Analysis, vol. VII, pp. 713–1020. North-Holland, Amsterdam (2000)

- 7.
Giovangigli, V.: Mass conservation and singular multicomponent diffusion algorithms. Impact Comput. Sci. Eng.

**2**, 73–97 (1990) - 8.
Giovangigli, V.: Convergent iterative methods for multicomponent diffusion. Impact Comput. Sci. Eng.

**3**, 244–267 (1991) - 9.
Golub, G.H., Van Loan, C.F.: Matrix Computations. North Oxford Academic, Oxford (1983)

- 10.
Higham, N.J.: Functions of Matrices, Theory and Computation. SIAM, Philadelphia (2008)

- 11.
Morton, K.W.: Numerical Solution of Convection-Diffusion Problems. Applied Mathematics and Mathematical Computation, vol. 12. Chapman & Hall, London (1996)

- 12.
Patankar, S.V.: Numerical Heat Transfer and Fluid Flow. Series in Computational Methods in Mechanics and Thermal Sciences. Hemishere Publishing Corporation, New York (1980)

- 13.
Peerenboom, K.S.C., Van Dijk, J., Ten Thije Boonkkamp, J.H.M., Liu, L., Goedheer, W.J., Van der Mullen, J.J.A.M.: Mass conservative finite volume discretization of the continuity equations in multi-component mixtures. J. Comput. Phys.

**230**, 3525–3537 (2011) - 14.
Poinsot, T., Veynante, D.: Theoretical and Numerical Combustion, 2nd edn. Edwards, Philadelphia (2005)

- 15.
Raizer, Yu.P.: Gas Discharge Physics. Springer, Berlin (1991)

- 16.
Shu, C.-W.: High order weighted essentially nonoscillatory schemes for convection dominated problems. SIAM Rev.

**51**, 82–126 (2009) - 17.
Ten Thije Boonkkamp, J.H.M., Schilders, W.H.A.: An exponential fitting scheme for the electrothermal device equations specifically for the simulation of avalanche generation. Compel

**12**, 95–11 (1993) - 18.
Ten Thije Boonkkamp, J.H.M., Anthonissen, M.J.H.: The finite volume-complete flux scheme for advection-diffusion-reaction equations. J. Sci. Comput.

**46**, 47–70 (2011) - 19.
Ten Thije Boonkkamp, J.H.M., Anthonissen, M.J.H.: Extension of the complete flux scheme to time-dependent conservation laws. In: Kreiss, G. et al. (eds.), Numerical Mathematics and Advanced Applications 2009, Proceedings ENUMATH 2009, pp. 863–871. Springer, Berlin (2010)

- 20.
Toro, E.F.: Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction. Springer, Berlin (1997)

- 21.
Van Dijk, J., Peerenboom, K.S.C., Liu, L., Van der Mullen, J.J.A.M., Ten Thije Boonkkamp, J.H.M.: Modelling of transport in non-equilibrium atmospheric plasmas. In: Proceedings of the XX European Conference on the Atomic and Molecular Physics of Ionized Gases, Novi Sad, Serbia, 13–17 July 2010

- 22.
Van’t Hof, B., Ten Thije Boonkkamp, J.H.M., Mattheij, R.M.M.: Discretization of the stationary convection-diffusion-reaction equation. Numer. Methods Partial Differ. Equ.

**14**, 607–625 (1998) - 23.
Wesseling, P.: Principles of Computational Fluid Dynamics. Springer Series in Computational Mathematics, vol. 29. Springer, Berlin (2000)

### Open Access

This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.

## Author information

### Affiliations

### Corresponding author

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

ten Thije Boonkkamp, J.H.M., van Dijk, J., Liu, L. *et al.* Extension of the Complete Flux Scheme to Systems of Conservation Laws.
*J Sci Comput* **53, **552–568 (2012). https://doi.org/10.1007/s10915-012-9588-5

Received:

Revised:

Accepted:

Published:

Issue Date:

### Keywords

- Advection-diffusion-reaction systems
- Flux (vector)
- Finite volume method
- Integral representation of the flux
- Green’s matrix
- Numerical flux
- Matrix functions
- Peclet matrix