A second order quasilinear PDE in two independent variables x, y is an equation of the form
where A, B, C, D may be functions of x, y, , and .
We assume that the PDE (1) is of hyperbolic type, which means that we are restricted to a region of the xy-plane where .
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  -  . Among those methods the classic characteristic method and its variations are used in a wide range of hyperbolic problems (see   -  ).
In this paper, a modification of the numerical method of characteristics is proposed to solve special cases of initial and boundary value problems (IBVPs) for second order hyperbolic PDEs. To test the method it is applied for the numerical solution of IBVPs for the one-dimension homogeneous wave equation and it is compared with the following well-known finite difference methods: Central Time Central Space (CTCS), Crank-Nicolson and ω scheme.
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  . We use the term ω-method following Zauderer  . Crank-Nicolson method  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  . 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  -  . This is justified by the fact that the initialization method has no effect on the stability of the overall method  . 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)
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 ( ). 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.
2. Numerical Method of Characteristics
Consider the hyperbolic PDE (1). It is well-known   that in this case there are exactly two characteristics curves, say , through every point of the solution domain which satisfy the equation
Let us denote by the slope at every point of the first characteristic curve through a point of the solution domain (which is said to be a ξ-characteristic) and by the slope at every point of the other characteristic through the point P (η-characteristic).We also assume that along an initial curve, say φ, (non characteristic) U, and are known.
Let , be points on φ and let us denote by 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 by the equations
Then, we calculate approximation values for p and q at P by the equations
Finally, to obtain an approximation value for U at P we can use the following approximation
An improved approximation to 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 , , and computed by the equations (6), (7). Then we can calculate an improved approximation value of 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 Figure 1, right). Then we can compute approximation values for U at a grid of three points in the xy-plane. By the previous algorithm we can calculate solution values at the grid points P and T and then proceed to the grid point V. In general, given points on φ then solution values can be computed at a grid of
Example 2.1. Consider the PDE
This has the general form of the PDE (1) with , , and . The PDE (10) is hyperbolic since . We consider the initial curve as
Figure 1. A grid is defined by the number of points on initial curve.
with , and on φ. In view of (5), the slope of the characteristics is given by
At first we start with points , , on φ with and a step size of . Hence a grid of 45 points is created. The calculation of the approximation value for U at a grid point is terminated when
(where 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 and , 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 , where t, a are the true and approximation values, respectively. If then e is replaced by the absolute percent error . Example 2.1 was also run using , and . The grid consists of 1035 points and the machine time needed for the calculation at those points is 0.016 s. Selected values are given in
Figure 2. n = 10, h = 0.1, 45 Grid Points.
Table 1. n = 10, h = 0.1, Number of grid points = 45, Machine time < 0.01 s.
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 . We consider the initial curve as with , and along φ. The slope of the characteristics is given by and . As in the previous example, we use two different step sizes of and with starting point and the same stopping criteria. The number of initial points taken on φ is and , respectively. In the first case the grid consists of 45 points and in the second of 4095 points. 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 and , respectively. In these Tables the absolute percent relative error e for U is given by , if and the absolute percent error by if .
Even though the number of iterations is smaller by decreasing the step size, there is no significant difference between the errors, approximately 1/10 of the corresponding error of the first case.
Table 2. n = 46, h = 0.02, Number of grid points = 1035, Machine time = 0.016 s.
Figure 3. Approximated and exact solutions (h = 0.02).
Figure 4. Approximated and exact solutions (h = 0.02).
Figure 5. Approximated solutions (h = 0.01).
Table 3. n = 10, h = 0.1, Number of grid points = 45, Machine time < 0.01 s.
Table 4. n = 91, h = 0.01, Number of grid points = 4095, Machine time = 0.078 s.
3. Finite Difference Methods for the Wave Equation
Consider the IBVP (2)-(4). Approximating and by various divided differences formulae, a number of difference schemes is created and some of them are presented below. Before doing that, we need to discretize the space of solutions. Let be an increment in x and be an increment in t. The grid in xt-plane on which a numerical solution is to be computed is given as , with , . The x step size is and the time step is k. We denote by the value of U at the grid point and by the approximation value for . We also denote by and the values of and , respectively.
3.1. The CTCS Explicit Difference Scheme
We approximate and by centered second order divided differences in x and t, respectively. This yields
We put and express (12) as
Putting in (13) yields
and approximating the initial derivative condition by a centered second order divided difference in t gives
Eliminating between (14), (15), the values can be computed from the equation
In view of (14), Equation (16) is expressed as
After calculating the values from (17), we continue with the scheme (13) for . We consider also two alternative ways of calculating the values . 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 and solving for the result
is obtained, which in view of (2) and (4) becomes (provided f is smooth enough)
So, the initial derivative condition can be approximated by a backward second order divided difference formula
Eliminating between (14), (18) and considering (4) gives
Similarly, expanding U about the point 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 and considering (4) we get
To summarise, the CTCS numerical scheme can be given as
Expanding (13) by Taylor’s theorem about the point , , and considering (2), the truncation error is found to be
We notice that for the truncation error vanishes completely. As (with r constant), , so the difference scheme (13) is consistent with the wave Equation (2). The CTCS method is also stable for ,  hence by Laxs equivalence theorem  it is also convergent for .
3.2. The Crank-Nicolson Implicit Difference Scheme
The Crank-Nicolson scheme is obtained by approximating by a centered second order divided difference in t and by the mean of centered second order divided difference in x evaluated at the jth and (j + 1)th time levels. The difference scheme is given as
As with the CTCS method, the Crank-Nicolson can be written as
The truncation error at the point , is defined by
Expansion of the terms , about the point and the terms , , , about the point by Taylors series and substitution into (29) leads to
Expansion of the terms , for , about the point and substitution into the expression for then gives
Finally, taking into consideration (2), can be written as
As (with r constant), , so the scheme (24) is consistent with the wave equation (2). To determine the von Neumann stability condition for the scheme, we insert ( , , ) into (24) and after some simplification we obtain the quadratic equation , where , . Hence, the values of ξ are . If , then which gives no useful result for r. When , i.e., , which is true for , the two roots are complex conjugates and the squared modulus of satisfy . Thus a necessary condition for von Neumann stability is .
3.3. The ω Implicit Difference Scheme
The ω scheme is obtained by approximating by a centered second order divided difference in t and by a weighted average of centered divided difference in x evaluated at the (j − 1)th, jth and (j + 1)th time levels, with the nonnegative weights ω, , and ω ( ), respectively. The ω scheme is given as
We note that for the ω scheme coincide with the CTCS scheme. Similarly, the ω scheme can be written as
The truncation error at the point , is given by
As (with r constant), the truncation error tends to zero, so the scheme (24) is consistent with the wave Equation (2). If the scheme is von Neumann stable for . For the scheme is unconditionally von Neumann stable.
3.4. The Numerical Method of Characteristics
Equation (2) has the form of the PDE (1) and is hyperbolic. The initial curve is with , (provided f is smooth enough) and on φ. In view of (5), the slope of the characteristics is given by
and therefore the characteristics are
Let be a point in the xt-plane. Then the ξ,η-characteristics through P are given by
respectively. Hence, the grid of points is always inside the triangle defined by the lines , and 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), the scheme takes the form
Finally, it is easy to verify that the solutions of (39)-(42) give also the true values of , and , , respectively.
4. Numerical Study of the Wave Equation
Consider the wave Equation (2) with , and . 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   .
4.1. 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 1st 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 ).
Studying Table 5 one would expect that the errors would be vanished for 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 for (19 ) is defined by
Expansion of the terms , , about the point by Taylors series and substitution into (45) gives
In view of (2), and few algebraic steps lead to an expression for
Table 5. CTCS scheme ( ).
Similarly, the truncation errors at the point for (20) and (21) are found to be
respectively. We also notice that, according to (44), , for ,
. This yields, , and for . Thus, in view of (23), , for , 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 h4 and k4, respectively at the 1st time level which affect the rest calculations for . To confirm the latter assertion we run the scheme computing the values from (44) and then proceed with (13) for . As we can see in Table 6, the errors vanish.
, the forward difference approach gives more accurate results. This is possibly due to the fact that
are of order h4 and
is of order k4 with
, usually. We also notice that when
the error increases considerably at points near to
. From (44) we have that for
. The results in Table 5 show that errors are increased significantly at
. This is not the case for
and as we can see
. The methods Crank-Nicolson and ω also follow this behavior as it is illustrated in Figures 6-8. These Figures provide also a visual representation of which of the FD, BD and CD is more accurate. This was done by assigning the red, blue and black color for the FD, CD, BD errors, respectively and selecting the smallest error among them for each time step. In the next tables numerical results are presented only for the first two and the last time steps.
The Crank-Nicolson scheme is not quite as good as the CTCS scheme. Small values of h and k were employed in order to provide adequate numerical
Table 6. Initiating the scheme using analytical solution.
Table 7. Crank-Nicolson scheme ( ).
Table 8. ω scheme, , ( ).
Table 9. ω scheme, , ( ).
solutions. However, this is not true for . Bigger value of h still provides satisfactory results.
As we can see the ω implicit scheme is more accurate than the Crank-Nicolson implicit scheme. A visual inspection of the Figures 6-8 indicates that initiating with CD is preffered only when using the ω-method, , for and the method Crank-Nicolson for . For the other cases FD give the smallest error.
4.2. 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  . We extend the idea and compute approximation values for U at any point , , , , and then adjust the method to improve accuracy. For convenience of calculation, we will demonstrate it in the following example. Let and a point in the xt-plane (Figure 9, left). Then, by (43), for , we get
where can be calculated (as we will see). Obviously, in closer to 0.5, the bigger magnitude of the error is observed. In order to improve the level of accuracy we modify the previous method. We start by forming a sequence of points on the segment at which we compute approximation values for U. Therefore, a step size of is employed to approach the point P (decreasing l improves the accuracy). Thus, the sequence , , is defined. By (43) we get
Figure 6. Percent relative errors at , , with , , .
Figure 7. Percent relative errors at , , with , , .
Figure 8. Percent relative errors at , , with , , . ( Forward Differences (FD) with red color, Central Differences (CD) with blue color, Backward Differences (BD) with black color).
where and are computed as follows (Figure 9, right): Consider the η-characteristic through (Equation (38)) which intersects the line at the point . Then, along this characteristic, Equation (42) implies
The ξ-characteristic through (Equation (38)) intersects the line at and Equation (41) implies
The η-characteristic through intersects the x axis at and by (42) we get
In view of (52) and (53), Equation (51) is given by
which, according to the ICs and BCs, can be written as
Similarly, initiating with ξ-characteristic through , we get the sequence , , and by Equations (41), (42) the result
is obtained. Hence, approximation values for p and q at are determined by solving (54), (55). This way can also be estimated. Then we proceed with the next point . Equation (43) yields , where is evaluated in a similar way. Finally, this procedure calculates . A comparison between the usual method (UM) (Equation (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 lies on the segment (i.e., ), we form the sequence of points on the segment 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 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 ).
4.3. Comparison of the Methods
Among the methods discussed in section 4, the most accurate results are obtained
Table 10. A comparison between the usual and the modified method of characteristics.
Table 11. Numerical method of characteristics.
Figure 9. Characteristics.
with the CTCS method for and by approximating the initial derivative condition with centered differences. For , the forward difference approximation is preffered with the exception that centered differences are used for the methods ω, ( ) and Crank-Nicolson ( ). 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 ). 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 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 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
Table 12. r < 1, Comparison of the methods with respect to percent relative errors.
characteristics is considerably faster with slightly bigger errors.
・ The third best choice seems to be the ω scheme for , with the exception of the case where . In this case the CTCS scheme is more accurate.
・ Even though there is no significant difference in the errors between the methods CTCS and ω, , 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.
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 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 , the methods seem to be more accurate if they initiate with the forward difference approximation with the exception of the methods Crank-Nicolson and ω, , for and , respectively, where the centered difference approach is more accurate. In this case ( ) the ω scheme for is the most accurate with the (modified) method of characteristics being the second best but much faster. We also observe that for the errors increase, probably due to the large number of grid points and the great number of computations, which increase the round-off errors.
Finally, for further research, other values of ω can be tested. In addition, forward third or higher order differences can be used to approximate the initial derivative condition. Moreover, we can test the above in problems of 2D, 3D and more complicated problems.
The authors would like to thank the reviewers for their helpful suggestions for revising this paper. Research of Pavlos Stampolidis has been financially supported by General Secretariat for Research and Technology (GSRT) and the Hellenic Foundation for Research and Innovation (HFRI). This support is greatly appreciated.
Research of Pavlos Stampolidis has been financially supported by General Secretariat for Research and Technology (GSRT) and the Hellenic Foundation for Research and Innovation (HFRI).