^{1}

^{1}

In this paper, we consider two methods, the Second order Central Difference Method (SCDM) and the Finite Element Method (FEM) with P
_{1} triangular elements, for solving two dimensional general linear Elliptic Partial Differential Equations (PDE) with mixed derivatives along with Dirichlet and Neumann boundary conditions. These two methods have almost the same accuracy from theoretical aspect with regular boundaries, but generally Finite Element Method produces better approximations when the boundaries are irregular. In order to investigate which method produces better results from numerical aspect, we apply these methods into specific examples with regular boundaries with constant step-size for both of them. The results which obtained confirm, in most of the cases, the theoretical results.

Finite Difference schemes and Finite Element Methods are widely used for solving partial differential equations [

In this paper, we will describe the Second order Central Difference Scheme and the Finite Element Method for solving general second order elliptic partial differential equations with regular boundary conditions on a rectangular domain. In addition, for both of these methods, we consider the Dirichlet and Neumann Boundary conditions, along the four sides of the rectangular area. Also, we make a brief error analysis for Finite element method. Moreover, for the finite element method, we site two other important numerical methods which are important in order that the algorithm can be performed.

These methods are the bilinear interpolation over a linear Lagrange element, Gauss quadrature and contour Gauss Quadrature on a triangular area. Furthermore, these two schemes lead to a linear system which we have to solve. For the purpose of this paper, we solve the outcome systems with Gauss-Seidel method which is briefly discussed. In the last section, we contacted a numerical study with Matlab R2015a. We apply these methods into specific elliptical problems, in order to test which of these methods produce better approximations when the Dirichlet and Neumann boundary conditions are imposed. Our results show us that the accuracy of these two methods depends on the kind of the elliptical problem and the type of boundary conditions. In Section 2, we study the Second order Central Difference Scheme. In Section 3, we give the Finite Element Method, bilinear interpolation in P_{1}, Gauss Quadrature, Finite Element algorithm and error analysis. In Section 4, we give some numerical results, in Section 5, we give the conclusions and finally in Section 6 we give the relevant references.

The second order general linear elliptic PDE of two variables x and y given as follow:

with u defined on a rectangular domain

Moreover in this paper two types of boundary conditions are considered:

The boundary

We divide the rectangular domain Ω in a uniform Cartesian grid

where N , M are the numbers of grid points in x and y directions and

are the corresponding step sizes along the axes x and y. The discretize domain are shown in

Using now the central difference approximation we can approximate the partial derivatives of the relation (1) as follows:

where

We now approximate the PDE (1) using the relations (2), (3), (4), (5), (6) and we obtain the second order central difference scheme:

With truncation error

The relation (7) can be written as a linear system:

Dirichlet Boundary Conditions

The dimensions of the above linear system depends on the boundary conditions. More specific, if we have the Dirichlet Boundary Conditions:

then the dimensions of the matrix A, u and b are:

for the matrix A. Moreover, the form of matrix A and the vector u are given by:

and

As we can see the matrix A is tri-diagonal block Matrix. These block matrices

are tri-diagonal as well of order

Neumann Boundary Conditions

We approximate the Neumann boundary conditions in every side of the rectangular domain as follows

1^{st} side (North side of the rectangular area)

2^{nd} side (East side of the rectangular area)

3^{rd} side (South side of the rectangular area)

4^{th} side (West side of the rectangular area)

Using the relations (9), (10), (11), (12) the values

Thus the block tri-diagonal matrix A has dimensions

and

where

In order to solve the linear system (8), we use the Gauss-Seidel method (GSM) (see [

Theorem 1

If A is strictly diagonally dominant, then for any choice of

that converge to the unique solution of

The proof of theorem 1 can be found in [

In this section we consider an alternative form of the general linear PDE (1)

where

With boundary conditions

And the boundary

In order to approximate the solution of (13) with FEM algorithm we must transform the PDE into its weak form and solve the following problem.

Find

where

and

are bilinear and linear functionals as well.

It is sufficient now to consider that

when the Neumann boundary Conditions are applied

conditions then the line integral is equal to zero.

The finite element method approximates the solution of the partial differential Equation (13) by minimizing the functional:

where

the weak derivatives of u. The spaces

The uniqueness of the solution of weak form (14) depends on Lax-Milgram theorem along with trace theorem (see [

The first step in order the FEM algorithm to be performed is the discretization of the rectangular domain

We denote with P_{k} the set of all polynomials of degree

Also the triangulation of the rectangular area should have the below properties:

We assume that the triangular elements

The vertices of the triangles all call nodes, we use the letter V for vertices and E for nodes.

We also assume that there are no nodes in the interior sides of triangles.

Let as consider now the triangulation of the rectangular domain _{i} of the domain we interpolate the function u with the below linear polynomial:

with interpolation conditions:

in every vertex

Thus it creates the below linear system with unknown coefficients a, b, c.

Solving the system we find the approximate polynomial of u

where

and

The function

An important step in order to implement the Finite Element algorithm is to compute numerically the double and line integrals which occurs in every triangular element (see [

Gauss Quadrature in Canonical Triangle

As a canonical triangle we consider the triangle with vertices (0, 0), (0, 1) and (1, 0) and we denote

Where n_{g} is the number of Gauss integration points, w_{i} are the weights and

The linear space P_{κ} is the space of all linear polynomial of two variables of order k

The following

Gauss quadrature in general triangular element

Initially we transform the general triangle Τ into a canonical triangle using the linear basis functions:

Quadrature points for degrees 1 to 4 | |||
---|---|---|---|

N | |||

1 | 3 | 1 | |

2 | 6 | 3 | |

3 | 10 | 4 | |

4 | 15 | 5 |

The variables x, y for the random triangle can be written as affine map of basis functions:

Also we have the Jacobian determinant of the transformation

Using the above relations we obtain the Gauss quadrature rule for the general triangular element:

with

is the area of the triangle.

Contour quadrature rule

In the Finite Element Method when the Neumann boundary conditions are imposed it is essential to compute numerically the below Contour integral in general triangular area.

The basic idea is to transform the straight contour P_{i}P_{j} to an interval

Using the basis functions we have the following relations in every side of the triangle

Along side 1 (P_{1}P_{2}) :

Along side 3: (P_{3}P_{1}):

Along side 2: (P_{2}P_{3}):

The error of the bilinear interpolation Gauss quadrature depend on the dimension of the polynomial subspace (see [

The Finite element algorithm has the purpose to find the approximate solution of the problem (15) in a subspace of

The index i represents the number of triangular elements which exist in the rectangular domain. The polynomials must be piecewise because the linear combination of them must form a continuous and integrable function with continuous first and second derivatives.

The existence and uniqueness of the approximate solution is ensured by the Lax-Milgram-Galerkin and Rayleight- Ritz theorems (see [

Firstly as we describe in a previous section, we have to triangulate the domain before the algorithm evaluated.

After that the algorithm seeks approximation of the solution of the form:

where

are satisfied on

Inserting the approximate solution

Consider J as a function of

Differentiating (16) gives

for each

where

for each

The choice of subspace

Let us consider again the problem (14)

Find

The approximation of finite element of the problem (18) is given below:

Find

Cea’s lemma

The finite element approximation

The error analysis of finite element method depend on the Cea’s lemma for elliptic boundary value problems. The proof can be found in [

Now we will present without proof the following statement [

where

The relation (21) gives a bound of the global error

L_{2}-norm

For proving an error estimate in L_{2}-norm the regularity of the solution of (13) plays an essential role. By the Aubin-Nitsche duality argument the error estimate in L_{2} norm between u and its finite element approximation

In this section we contact a numerical study using Matlab R2015a. For the purpose of this paper we cite representative examples of second order general elliptic partial differential equations in order to make comparisons between these two methods with various step-sizes and the mesh size parameters of finite element method. Thus in each example we present results for the absolute and relevant absolute errors in L_{2} norm along with their graphs. Also we make graphical representations of the exact and approximate solution of the specific problem as well.

The problems of the examples can be found in [

Example 1

Find the approximate solution of the partial differential equation

with Dirichlet boundary conditions along the rectangular domain

and exact solution

Results (

In

Example 2

Find the approximate solution of the partial differential equation

with Dirichlet boundary conditions along the rectangular domain

and exact solution

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 1.1 | 0 | 0 | 4.440e−16 | 1.7411e−14 |

0.1 | 1.2 | 0.00029 | 0.01011 | 2.397e−05 | 0.0008257 |

0.2 | 1.3 | 0.00064 | 0.01969 | 0.001966 | 0.0601573 |

0.3 | 1.4 | 0.00104 | 0.02857 | 0.001066 | 0.0292564 |

0.4 | 1.5 | 0.00147 | 0.03664 | 0.000245 | 0.0060951 |

0.5 | 1.6 | 0.00192 | 0.04386 | 0.000144 | 0.0032965 |

0.6 | 1.7 | 0.00238 | 0.05022 | 0.000865 | 0.0182061 |

0.7 | 1.8 | 0.00283 | 0.05574 | 0.001287 | 0.0253187 |

0.8 | 1.9 | 0.00325 | 0.06045 | 0.000344 | 0.0064075 |

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 1.1 | 0 | 0 | 3.996e−15 | 1.567e−13 |

0.1 | 1.2 | 1.6938e−05 | 0.00058345 | 0.0004007 | 0.0138044 |

0.2 | 1.3 | 5.3296e−05 | 0.00163013 | 3.983e−05 | 0.0012183 |

0.3 | 1.4 | 0.0001093 | 0.00300047 | 0.0007643 | 0.0209714 |

0.4 | 1.5 | 0.0001838 | 0.00457142 | 0.0001906 | 0.0047409 |

0.5 | 1.6 | 0.0002743 | 0.00624182 | 0.0002270 | 0.0051663 |

0.6 | 1.7 | 0.0003771 | 0.00793478 | 3.955e−05 | 0.0008322 |

0.7 | 1.8 | 0.0004880 | 0.00959848 | 0.0003905 | 0.0076820 |

0.8 | 1.9 | 0.0006026 | 0.01120612 | 0.0005635 | 0.0104793 |

Approximate solution with h = 0.05 Exact solution with h = 0.05

Results (

In

Example 3

Find the approximate solution of the partial differential equation

with Dirichlet boundary conditions along the rectangular domain

and exact solution

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 0.1 | 0 | 0 | 0 | 0 |

0.1 | 0.2 | 0.0006443 | 0.6748022 | 0.0027122 | 2.8403167 |

0.2 | 0.3 | 0.0018062 | 0.6768951 | 0.0020439 | 0.7659463 |

0.3 | 0.4 | 0.0032278 | 0.6787855 | 0.0047468 | 0.9982314 |

0.4 | 0.5 | 0.0045763 | 0.6805024 | 0.0065150 | 0.9687808 |

0.5 | 0.6 | 0.0055180 | 0.6820655 | 0.0059924 | 0.7407062 |

0.6 | 0.7 | 0.0057918 | 0.6834860 | 0.0026841 | 0.3167555 |

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 0.1 | 0 | 0 | 0 | 0 |

0.1 | 0.2 | 9.4027e−05 | 0.0984664 | 0.0009176 | 0.9609699 |

0.2 | 0.3 | 0.0002686 | 0.1006831 | 0.0032602 | 1.2217428 |

0.3 | 0.4 | 0.0004890 | 0.1028373 | 0.0042003 | 0.8833012 |

0.4 | 0.5 | 0.0007056 | 0.1049364 | 0.0042126 | 0.6264231 |

0.5 | 0.6 | 0.0008655 | 0.1069866 | 0.0036606 | 0.4524755 |

0.6 | 0.7 | 0.0009235 | 0.1089924 | 0.0011581 | 0.1366761 |

Approximate solution with h = 0.05 Exact solution with h = 0.05

Results (

In

Overall, what stands out from these examples is that the finite element method has better approximations for the first problem compared to finite difference method for all the step-sizes that we have. But in the second problem we have a small difference in the results with better accuracy for the finite difference method and in the third problem the finite element method has bigger relevant errors than the difference method. More specifically, in example 1 according to the tables we have better approximations for the finite element method in both of step sizes and the mesh size parameters to specific points but the graphs of the percentage of relevant errors suggest that the second order central finite difference scheme produce better approximations generally. On the other hand, in the other two examples according to the tables and the graphs of errors in the second problem we have a small difference between these methods and in the third problem we have better approximations of the second order central difference scheme almost in all points of the domain. Conclusively, we can notice that in the third example for both of these methods the results which we obtained are almost identical when different step sizes are applied in CFDM and mesh size parameters in FEM.

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 0.1 | 0 | 0 | 0 | 0 |

0.2 | 0.2 | 0.0046708 | 2.3176755 | 0.0134396 | 6.6687403 |

0.4 | 0.3 | 0.0120560 | 4.4238110 | 0.0287555 | 10.551476 |

0.6 | 0.4 | 0.0189313 | 5.1426837 | 0.0383096 | 10.406785 |

0.8 | 0.5 | 0.0193264 | 3.8954666 | 0.0334284 | 6.7378980 |

1 | 0.6 | 0 | 0 | 2.886e−15 | 4.3169e−13 |

x | y | Second order central difference scheme with steps | Finite element method with mesh size | ||
---|---|---|---|---|---|

Absolute error | Relevant error % | Absolute error | Relevant error % | ||

0 | 0.1 | 0 | 0 | 0 | 0 |

0.1 | 0.2 | 9.4027e−05 | 0.0984664 | 0.0009176 | 0.9609699 |

0.2 | 0.3 | 0.0002686 | 0.1006831 | 0.0032602 | 1.2217428 |

0.3 | 0.4 | 0.0004890 | 0.1028373 | 0.0042003 | 0.8833012 |

0.4 | 0.5 | 0.0007056 | 0.1049364 | 0.0042126 | 0.6264231 |

0.5 | 0.6 | 0.0008655 | 0.1069866 | 0.0036606 | 0.4524755 |

0.6 | 0.7 | 0.0009235 | 0.1089924 | 0.0011581 | 0.1366761 |

Finally, we can say that the data which we obtained from these examples show that both of these methods produce quite sufficient approximations for our problems. Also the results prove that the accuracy of them depends on the kind of the elliptical problem and the type of boundary conditions. For further research, the approximations of these methods can be improved. This improvement can be made if in the second order difference scheme we keep more taylor series terms in order to approximate the derivatives and in finite element method if we use higher order elements such as quadratic Lagrange triangular elements or cubic Hermite triangular elements.

GeorgePapanikos,Maria Ch.Gousidou-Koutita, (2015) A Computational Study with Finite Element Method and Finite Difference Method for 2D Elliptic Partial Differential Equations. Applied Mathematics,06,2104-2124. doi: 10.4236/am.2015.612185