A Computational Study with Finite Difference Methods for Second Order Quasilinear Hyperbolic Partial Differential Equations in Two Independent Variables

In this paper we consider the numerical method of characteristics for the numerical solution of initial value problems (IVPs) for quasilinear hyperbolic Partial Differential Equations, as well as the difference scheme Central Time Central Space (CTCS), Crank-Nicolson scheme, ω scheme and the method of characteristics for the numerical solution of initial and boundary value problems for the one-dimension homogeneous wave equation. The initial derivative condition is approximated by different second order difference quotients in order to examine which gives more accurate numerical results. The local truncation error, consistency and stability of the difference schemes CTCS, Crank-Nicolson and ω are also considered.


Introduction
A second order quasilinear PDE in two independent variables x, y is an equation We assume that the PDE (1) is of hyperbolic type, which means that we are restricted to a region of the xy-plane where 2 The second order quasilinear hyperbolic Partial Differential Equations (PDEs) with appropriate initial and boundary conditions serve as models in many branches of physics, engineering, biology, etc. Thus, the numerical solution of such PDEs plays an important rule in the current research. During the last decades, a variety of numerical methods have been developed to solve these PDEs some of which can be found in [1]- [7]. Among those methods the classic characteristic method and its variations are used in a wide range of hyperbolic problems (see [5] [8]- [18]).
In this paper, a modification of the numerical method of characteristics is proposed to solve special cases of initial and boundary value problems The CTCS method is the classic explicit scheme to approach the wave equation which can be very accurate under certain restriction. The ω-method is an implicit scheme first introduced by von Neumann [17]. We use the term ω-method following Zauderer [18]. Crank-Nicolson method [19] is usually used in parabolic equations and is not recommended for second order hyperbolic PDEs. However, we prove the consistency and von Neumann stability for this method and compare it with the other methods.
The common thing among the schemes CTCS, Crank-Nicolson and ω is that it is required to compute the solution on the first time step before they can be employed [20]. In the literature, this is usually done by approximating the initial derivative condition by centered or forward second order divided difference without any specific preference [20]- [27]. This is justified by the fact that the initialization method has no effect on the stability of the overall method [26]. Nevertheless, from numerical point of view, the initialization method affects the accuracy of the methods as we will see.
The manuscript is organized as follows. In Section 2 we describe briefly the numerical method of characteristics and we apply it into two specific quasilinear hyperbolic PDEs, in order to examine the accuracy of the method. In Section 3 we consider the one-dimensional homogeneous wave equation which is a special case of (1). We consider that (2) satisfies the following boundary (BCs) and initial conditions (ICs)  (4) and we give the numerical schemes for the methods CTCS, Crank-Nicolson, ω and characteristics. For each of the methods CTCS, Crank-Nicolson and ω we use second order forward, centered and backward differences to approximate the initial derivative condition. In Section 4 we use the methods mentioned in Section 3 to solve an IBVP for (2) for different values of c ( 0.2,1, 2 c = ). Firstly, we investigate which of the forward, centered and backward differences give better results from numerical aspect. Secondly, we compare the methods mentioned previously taking into consideration the accuracy of the numerical results and the machine time needed for the calculations. In Section 5 we summarize the results of the present work.
Finally, we note that the algorithms of the numerical methods presented in the current paper were written in Fortran 95 and were tested on a 32-bit processor Intel Celeron E1200, 1.60 GHz with 3 GB RAM. A "slow" processor was chosen intentionally to distinguish time consuming methods.

Numerical Method of Characteristics
Consider the hyperbolic PDE (1). It is well-known [16] [18]  R x y be points on φ and let us denote by ( ) , P P P x y the intersection point of the ξ-characteristic through Q and the η-characteristic through R (see Figure 1, left). Then we can calculate approximation values for U, p and q at the point P by the following algorithm. Firstly, we compute approximation values for the coordinates ( ) Finally, to obtain an approximation value for U at P we can use the following An improved approximation to P U is obtained by averaging the values of p and q at the points P, Q and P, R respectively and is given by the equation A similar averaging approach can be used to improve the accuracy of the approximation values of P x , P y , P p and P q computed by the equations (6), (7).
Then we can calculate an improved approximation value of P U by the Equation (9). With this way an iteration scheme is developed. The iterations are terminated when the errors from one step to the next are less than a prespecified error tolerance or an upper limit is placed on the number of iterations. Suppose three points are given on the initial curve φ, say Q, R, S, instead of two (see This has the general form of the PDE (1) with The PDE (10) is hyperbolic since 2 p x = and 1 q = on φ. In view of (5), the slope of the characteristics is given by At first we start with . Hence a grid of 45 points is created. The calculation of the approximation value for U at a grid point is terminated when is the approximation value for U at the point after r iterations) or when the number of iterations exceeds 100. The machine time needed for the calculation of x, y, U, p and q at 45 grid points is less than 0.01s. The actual solution of (10) with the given initial conditions is Hence in view of (11) we see that the characteristics are given as ( ) 1 2 , c c ∈  and the grid that they form is shown in Figure 2, left. We can also see the solution U along ξ, η-characteristics and the approximation values for U at the grid points in Figure  2, right. Table 1 gives selected values of x, y, U, p and q. The arrangement in the table has the two points on φ (from which the characteristics pass through and intersect at a specific grid point) in each line followed by the approximation values of x, y, U, p, and q, the number r of iterations and the absolute percent relative error e for U given by   Table 2 and approximate and exact solutions are illustrated in Figure 3, Figure 4.
As we can see for smaller step size the number of iterations as well as the error e at same grid points are decreased. Example 2.2. Consider the PDE The above PDE is quasilinear and is hyperbolic away from 0 U = . We consider the initial curve as along φ. The slope of the characteristics is given by  Figure 5 provides a visual representation for the second case and a selection of computed values of x, y, U, p and q is given in Table 3, Table 4 for 0.1 h = and 0.01 h = , respectively. In these Tables the absolute percent relative error e for U is given by

Finite Difference Methods for the Wave Equation
Consider the IBVP (2)-(4). Approximating be an increment in t. The grid in xt-plane on which a numerical solution is to be computed is given as and the time step is k. We denote by and approximating the initial derivative condition by a centered second order divided difference in t gives (14), (15), the values ,1 i u can be computed from the equation In view of (14), Equation (16) is expressed as After calculating the values ,1 i u from (17), we continue with the scheme (13) for 1 j ≥ . We consider also two alternative ways of calculating the values ,1 i u .
We do this by approximating the initial derivative condition by a backward and forward second order divided differences in t. By Taylor's expansion of U with respect to t about the point ( ) (2) and (4) becomes (provided f is smooth enough) So, the initial derivative condition can be approximated by a backward second Eliminating , 1 i u − between (14), (18) and considering (4) gives ( ) Similarly, expanding U about the point ( ) , ih k in a Taylor series with respect to t, the initial derivative condition can be approximated by a forward second order divided difference formula Solving for ,1 i u and considering (4) we get To summarise, the CTCS numerical scheme can be given as Rest Values ( 1, 2, , 1 We notice that for 1 r = the truncation error vanishes completely. As , 0 h k → (with r constant), , 0 i j T → , so the difference scheme (13) is consistent with the wave Equation (2). The CTCS method is also stable for 1 r ≤ , [22] hence by Laxs equivalence theorem [21] it is also convergent for 1 r ≤ .

The Crank-Nicolson Implicit Difference Scheme
The Crank-Nicolson scheme is obtained by approximating As with the CTCS method, the Crank-Nicolson can be written as Rest Values ( 1, 2, , 1 The truncation error at the point ( ) Expansion of the terms    (24) and after some simplification we obtain the quadratic equation Hence, the values of ξ are which gives no useful result for r. When

9
A < , i.e., ( ) 2 sin 2 4 r h β < , which is true for 4 r < , the two roots are complex conjugates and the squared modulus of 1,2 ξ satisfy 1,2 Thus a necessary condition for von Neumann stability is 4 r < .

The ω Implicit Difference Scheme
The ω scheme is obtained by approximating 2 ω ≤ ≤ ), respectively. The ω scheme is given as We note that for 0 ω = the ω scheme coincide with the CTCS scheme. Similarly, the ω scheme can be written as The truncation error at the point ( ) As , 0 h k → (with r constant), the truncation error tends to zero, so the scheme (24) is consistent with the wave Equation (2)

The Numerical Method of Characteristics
Equation (2) has the form of the PDE (1) and is hyperbolic. The initial curve is and U q g t ∂ = = ∂ on φ. In view of (5), the slope of the characteristics is given by respectively. Hence, the grid of points is always inside the triangle defined by the − no matter how many initial points are considered along φ. However, we will see in the next section that approximation values for U can be calculated at any point We also notice that we can have only one iteration of the scheme due to the fact that the coefficients of (2) and the slope of characteristics are constants. Therefore, in view of (6), (7), and (9) Finally, it is easy to verify that the solutions of (39)-(42) give also the true values of P x , P t and P p , P q , respectively.

Numerical Study of the Wave Equation
Consider the wave Equation (2) The analytical solution of (2) satisfying these conditions is In the following, we apply the methods discussed in the previous section for We also mention that the implicit schemes Crank-Nicolson and ω lead to tridiagonal systems of equations, which we solve by the method of Gauss-Seidel [28] [29].

The CTCS, Crank-Nicolson and ω Schemes
We apply these schemes for different x-step sizes and time steps. For each step size and time step we run the schemes three times considering the center, backward and forward approximation for the 1 st time level in order to examine which one produce better results. In the following Tables by Error we mean the absolute percent relative error for U (or the absolute percent error if 7 10 U − ≤ ).
Studying Table 5 one would expect that the errors would be vanished for 1 r = as was mentioned in section 3.1. However, the errors are vanished only if we initiate the scheme with the centered difference approximation. To analyze this behavior more closely we need to examine the truncation errors for the ICs (19)- (21). The truncation error at the point ( ) Expansion of the terms In view of (2), and few algebraic steps lead to an expression for ,0 Similarly, the truncation errors at the point ( ) ,0 ih for (20) and (21) are found to be ( ) respectively. We also notice that, according to (44), Thus, in view of (23), , 0 i j T = , for 0 j ≥ , 1 r = and using the centered difference approach. Hence the errors vanish completely. We assume that, initiating the scheme with (20) or (21) introduces an error of order h 4 and k 4 , respectively at the 1 st time level which affect the rest calculations for 1 j ≥ . To confirm the latter assertion we run the scheme computing the values ,1 i u from (44) and then proceed with (13) for 1 j ≥ . As we can see in Table 6, the errors vanish. For 1 r < , the forward difference approach gives more accurate results. This is possibly due to the fact that ,0      Table 8. ω scheme,

The Numerical Method of Characteristics
As was mentioned in section 3.4, the grid of points will always be inside a triangle. A special case which computes approximation values at a specific point outside the triangle is presented by Smith [16]. We extend the idea and compute approximation values for U at any point ( )      (49)) and the modified method (MM) is provided in Table 10 by giving the absolute percent relative errors.
The advantage of using the modified method is evident. If the point ( ) , P P P x t lies on the segment 2 D P (i.e., 0.5 1 P x < ≤ ), we form the sequence of points 1 2 , , , P P P ν  on the segment 2 D P in order to reduce the computational effort.
This procedure was programmed and used to compute approximation values for U on an orthogonal grid. We also note that in case the point P lies inside the triangle, then P U is calculated by the Equations (39)-(43) because they produce more accurate results. Numerical results are presented in Table 11 where by error we mean absolute percent relative error for U (or the absolute percent error if 7 10 U − ≤ ).

Comparison of the Methods
Among the methods discussed in section 4, the most accurate results are obtained   with the CTCS method for 1 r = and by approximating the initial derivative condition with centered differences. For 1 r < , the forward difference approximation is preffered with the exception that centered differences are used for the methods ω, ) and Crank-Nicolson ( 2 c = ). In order to compare the methods, numerical results from Table 5, Tables 7-9, Table 11 are summarized in Table 12 where we give the absolute percent relative errors for U (or the absolute percent errors if 7 10 U − ≤ ). Each method was initiated by the forward difference approximation except for the ones mentioned above. Machine time needed for the calculations is also considered. It should be mentioned that this time includes the computations at all grid points within the rectangle 0 , 1 x t ≤ ≤ which are formed by the given step size h and time step k.
Inspection of Table 12 leads us to the following conclusions: • The ω method for 0.5

ω =
gives the most accurate solutions in most of the cases. • The method of characteristics is the second best in precision. However, taking into consideration the machine time, the (modified) method of the P. Stampolidis, M. C. Gousidou-Koutita characteristics is considerably faster with slightly bigger errors.
• The third best choice seems to be the ω scheme for 0.25 ω = , with the exception of the case where 2 c = . In this case the CTCS scheme is more accurate.
• Even though there is no significant difference in the errors between the methods CTCS and ω, 0.25 ω = , for the specific problems, the difference in machine time is considerable, and as follows it will increase for more complicated problems with more large number of grid points. • Finally, the method of Crank-Nicolson is the least accurate for hyperbolic problems.

Conclusions
In the present work, finite difference methods were considered for the numerical solution of PDEs. Firstly, the method of characteristics was employed to solve IVPs for second order genuine quasilinear hyperbolic PDEs. The method was applied into two specific examples and provided adequate numerical results which were improved by decreasing the step sizes.
Secondly, the methods of CTCS, Crank-Nicolson, ω and characteristics were analyzed to solve numerically the homogeneous wave Equation (2) satisfying (3) and (4). These methods were applied for specific values of c,L and given functions f,g. Three different approaches were employed to approximate the initial derivative condition. The numerical results that were obtained indicated that the most accurate method is the CTCS scheme for 1 r = and employing the centered difference approach. This conclusion was confirmed after a theoretical investigation. It is easily verified that this is also the case for arbitrary function f and g being the zero function. For 1 r < , the methods seem to be more accurate if they initiate with the forward difference approximation with the exception of the methods Crank-Nicolson and ω,