Numerical Simulation of a One-Dimentional Non- Linear Wave Equation

In this paper, numerical simulations via regressive and central finite differences of different orders were produced using Fortran code and a one-dimensional non-linear wave equation was solved. The errors obtained during simulations, when using different refinements, were listed and compared in order to determine the validity of the simulation, which demonstrates that the proposed formulation presents satisfactory results. Keywords-finite difference method; wave equation; numerical simulation


INTRODUCTION
In order to better understand phenomena in physics, engineering, and even mathematics, it is often necessary to apply mathematical modeling, which most of the times requires solving Partial Differential Equations (PDEs). Due to the high complexity of these models, an analytical solution is infeasible, requiring the use of numerical methods. Among many methods available, the most friendly, accessible, and accurate, and therefore used for multiple purposes in engineering, is the method of finite differences [1][2][3][4][5][6][7]. It relies in a substitution of partial derivatives at a point by its incremental reasons. Moreover, it is important to highlight that numerical simulations involving equations which guide transference of energy usually have their values matching with the analytical solution. Authors in [8] for instance, analyzed the temperatures inside a concrete dam by using an explicit method, where a transition between stationary to transient regime could be detected. Another example is described in [9], when using finite differences at sixth order, applied in an equation of convection-diffusion-reaction an implicit method, obtained low absolute errors, most of them diffusive when using more refined meshes. By using the same approximation order, authors in [10] obtained deviations of 10 -14 in problems which considered reaction-diffusion equations in singly disturbed systems. Many other papers have demonstrated success when using the difference finite method for the solution of problems of transport phenomena such as [11][12][13][14], however, we did not find in the open access bibliography other works that compare explicit methods in the solution of the equation proposed in this work. Since many papers have described high precision on outputs when covering transport phenomena via finite difference methods, this paper applied this method to simulate a one-dimensional non-linear wave equation, while also checking whether this method is valid for this application. In addition, the maximum error obtained with a discrete mesh was evaluated and demonstrated the accuracy of the proposed method.
II. METHOD OF FINITE DIFFERENCES One of the most common methods to solve PDEs is the finite difference method, which consists of an approximation of differences by incremental reasons that utilizes expansions from Taylor's series. Furthermore, a finite differences method can be classified as regressive, progressive, or central.
Assume that y is a function, i a point which belongs to a mesh and ‫ݔ߂‬ an incremenal reason between two points: ‫ݔ‬ ିଵ and ‫ݔ‬ , both included in the mesh. A regressive finite difference makes use of values of a function in i and of i-1 to calculate a variation rate at the point. A progressive finite difference uses i and i+1 and finally it is also possible to know an approximate value of a differential by applying central differences, which applies values such as: i+1 and i-1 [15]. The three described equations are: III. MODEL EQUATION AND FORMULATIONS An equation of one-dimensional non-linear wave, obeying the continuity and Euler's principles, was used in the simulations. It is important to highlight that functions such as ݂ሺ‫,ݔ‬ ‫ݐ‬ሻ and ݃ሺ‫,ݔ‬ ‫ݐ‬ሻ were applied in order to allow an easier way to build a precise solution when processing computational tests.
The equations of the one-dimensional non-linear wave are: Note that (4) and (5) are only a reduction of the motion and continuity equation (Navier Stokes Equations).
For the formulations below, the explicit method is employed, which allows calculating variables ‫ݑ‬ and ߩ at point x i in a mesh, by using data from previous steps. This procedure allowed considering independent equations and guaranteed a quicker computerized solution when comparing with the implicit method, which implies a linear system of algebraic equations [16].

A. Formulation I : Regressive Finite Difference
In (4) (7) and in (5) (13) IV. RESULTS AND DISCUSSION The formulations presented above were processed with Fortran programming language. By computational code was possible to obtain results for values of u (speed) and ߩ (specific mass) for both the conducted tests, i.e. with regressive finite differences and central finite differences. Furthermore, in order to make the test simpler, sound speed was assumed as ܽ = 1 and the size of spatial and time domains as 0.2. Meanwhile, for the numerical tests the following equations were adopted for u and ρ: ‫,ݔ‪ሺ‬ݑ‬ ‫ݐ‬ሻ = ‫ݔ‪݁݊ሺ‬ݏ‬ + ‫ݐ‬ሻ (14) ߩሺ‫,ݔ‬ ‫ݐ‬ሻ = ‫ݔ‪ሺ‬ݏܿ‬ + ‫ݐ‬ሻ (15) As a result, (4) and (5)  For both numerical simulations, the values of MaxU and Max ߩ were calculated, which represent the highest error incurred when comparing the calculated value, by finite differences, and the real value (the exact solution) from equations which contain all the points in the discrete mesh. Some of data for maximum errors were very high and they were considered as divergent. Further, for finite differences there were only a few values of MaxU and Maxߩ that were not divergent (see Tables I and II). In addition, there was an homogeneous trend of divergences among the meshes worked along the tests.
A notable feature verified for central finite differences was the lower values for MaxU and Maxߩ for smaller increments of time, while for higher spatial increments values of MaxU and Maxߩ showed divergent values, see Tables III and IV.  1.56E+00 5.76E-01 div 4.99E+00 1.03E+01 6.68E+00 div 0.1 div 9.51E-01 div div 9.88E+00 1.07E+01 div 0.05 div div div div div div div 0.02 div div div div div div div 0.01 div div div div div div div 0.005 div div div div div div div www.etasr.com da Silva Júnior et al.: Numerical Simulation of a One-Dimentional Non-Linear Wave Equation div div div div div div div 0.02 div div div div div div div 0.01 div div div div div div div 0.005 div div div div div div div V. CONCLUSIONS The results obtained with both numerical simulations allow inferring about the validity of finite different methods to analyze one-dimensional non-linear wave equations. For regressive differences, the values of MaxU and Maxߩ for many simulations showed divergence, most likely due to the truncation error, very common for cases where Taylor series are utilized. For central finite differences, very small values of MaxU and Max ߩ , close to 10 -3 , appeared during the simulations with spatial meshes as well as during the time dependent simulations with refined meshes. These values could be driven by choosing ‫ݐ∆‬ within the range of stability requirements.
In conclusion, the finite differences methods are valid to solve the one-dimensional non-linear wave equation but they are spatial restricted and time dependent, with few increments and finite differences with higher orders.