Microsoft Word - ETASR_V12_N3_pp8574-8577 Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8574-8577 8574 www.etasr.com da Silva Júnior et al.: Numerical Simulation of a One-Dimentional Non-Linear Wave Equation Numerical Simulation of a One-Dimentional Non- Linear Wave Equation Adalberto Gomes da Silva Júnior Department of Basic Science and Environmental Engineering School at Lorena, University of São Paulo São Paulo, Brasil adalbertogomes.eq@usp.br Jairo Aparecido Martins Research & Development DESCH North America Cambridge, Ontario, Canada Jairo.martins@desch.com Estaner Claro Romão Department of Basic Science and Environmental Engineering School at Lorena, University of São Paulo São Paulo, Brasil estaner23@usp.br Received: 15 March 2022 | Revised: 24 March 2022 | Accepted: 27 March 2022 Abstract-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 I. 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-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-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: • Regressive Finite Differences: ���� � = ����� � ∆ + ����� (1) Corresponding author: Estaner Claro Romão Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8574-8577 8575 www.etasr.com da Silva Júnior et al.: Numerical Simulation of a One-Dimentional Non-Linear Wave Equation • Progressive Finite Differences: ���� � = ������� ∆ + ����� (2) • Central Finite Differences: ���� � = ������� � �∆ + ������ (3) 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: �� �� + � �� � + � �� � = ���,�� (4) �� �� + � �� � + ! � �� � = ���,�� (5) 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 xi 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): ��"���" � ∆� + ��#�� � ��" ���� �" � ∆ + ��#�� � ��" ���� �" � ∆ = ����,�� (6) ��# = $����,�� − ��#�� ��� " ���� �" � ∆ − �� #�� ���" ���� �" �∆ + ��" � ∆� &∆� (7) and in (5) : ��"���" � ∆� + �� #�� ���" ���� �" �∆ + ! ��" � ���" ���� �" �∆ = ����,�� (8) ��# = '����,�� + �� " � ∆� − ��#�� � ��" ���� �" � ∆ + ! ∆ ( �� �" � ��" � − 1*+∆� (9) B. Formulation II: Central Finite Difference In Equation (4): ��"���" � ∆� + ��#�� � ����" ���� �" � �∆ + ��#�� � ����" ���� �" � �∆ = ����,�� (10) ��# = $����,�� − ��#�� ����� " ���� �" � �∆ − �� #�� �����" ���� �" ��∆ + ��" � ∆� & ∆� (11) and in (5): ��"���" � ∆� + ��#�� � ����" ���� �" � �∆ + ! ��" � �����" ���� �" ��∆ = ����,�� (12) ��# = '����,�� + �� " � ∆� − �� #�� �����" ���� �" ��∆ − ! ��" � �����" ���� �" ��∆ +∆� (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) ���,�� = 01-�� + �� (15) As a result, (4) and (5) were written as: ���,�� = 01-�2� + 2�� − -./�� + �� (16) ���,�� = 01-�� + �� + -./�� + ��01-�� + �� + ! 345� 6�� 7−-./�� + ��8 (17) Notice that, the previous equation is valid if: � + � ≠ :�. 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. TABLE I. MAXIMUM ERROR FOR FUNCTION ���, �� USING REGRESSIVE FINITE DIFFERENCES ;< ;= 0.01 0.02 0.01 0.001 0.0001 0.00001 0.000001 0.2 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 Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8574-8577 8576 www.etasr.com da Silva Júnior et al.: Numerical Simulation of a One-Dimentional Non-Linear Wave Equation TABLE II. MAXIMUM ERROR FOR FUNCTION ρ�x,t� USING REGRESSIVE FINITE DIFFERENCES ;< ;= 0.01 0.02 0.01 0.001 0.0001 0.00001 0.000001 0.2 9.85E-02 5.94E-02 div 2.01E-01 2.50E-01 2.23E-01 div 0.1 div 1.17E-01 div div 3.88E-01 3.92E-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 TABLE III. MAXIMUM ERROR FOR FUNCTION ���,�� USING CENTRAL FINITE DIFFERENCES ;< ;= 0.01 0.02 0.01 0.001 0.0001 0,00001 0,000001 0.2 2.24E-01 2.02E-02 9.25E-03 8.74E-04 1.06E-04 3.82E-05 4.24E-05 0.1 4.22E+01 1.31E-01 5.99E-02 5.63E-03 5.62E-04 5.86E-05 8.74E-06 0.05 div 7.02E-01 1.63E-01 1.46E-02 1.43E-03 1.41E-04 1.20E-05 0.02 div div div 4.77E-02 4.50E-03 4.48E-04 4.44E-05 0.01 div div div 1.55E-01 8.88E-03 8.72E-04 8.70E-05 0.005 div div div div 1.86E-02 1.77E-03 1.77E-04 TABLE IV. MAXIMUM ERROR FOR FUNCTION ���,�� USING CENTRAL FINITE DIFFERENCES ;< ;= 0.01 0.02 0.01 0.001 0.0001 0,00001 0,000001 0.2 2.68E-01 5.02E-02 2.44E-02 2.40E-03 2.63E-04 5.00E-05 3.87E-05 0.1 9.60E+01 4.58E-02 1.68E-02 1.34E-03 1.36E-04 2.50E-05 1.39E-05 0.05 div 4.36E-01 8.20E-02 3.48E-03 3.19E-04 3.16E-05 5.79E-06 0.02 div div div 1.01E-02 7.30E-04 7.07E-05 7.04E-06 0,01 div div div 1.31E-01 1.62E-03 1.49E-04 1.48E-05 0.005 div div div div 4.18E-03 3.18E-04 3.10E-05 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. ACKNOWLEDGMENT The authors acknowledge the financial support by CAPES (process number 23038.000263/2022-19). REFERENCES [1] E. C. Romao and L. H. P. de Assis, "Numerical Simulation of 1D Unsteady Heat Conduction-Convection in Spherical and Cylindrical Coordinates by Fourth-Order FDM," Engineering, Technology & Applied Science Research, vol. 8, no. 1, pp. 2389–2392, Feb. 2018, https://doi.org/10.48084/etasr.1724. [2] L. Saidi, S. Mekroussi, S. Kherris, D. Zebbar, and B. Mébarki, "A Numerical Investigation of the Free Flow in a Square Porous Cavity with Non-Uniform Heating on the Lower Wall," Engineering, Technology & Applied Science Research, vol. 12, no. 1, pp. 7982–7987, Feb. 2022, https://doi.org/10.48084/etasr.4604. [3] S. Bekkouche and M. Kadja, "Numerical Analysis of Density-Driven Reactive Flows in Hele-Shaw Cell Geometry," Engineering, Technology & Applied Science Research, vol. 10, no. 2, pp. 5434–5440, Apr. 2020, https://doi.org/10.48084/etasr.3349. [4] M. D. de Campos, E. Claro Romão, and L. F. M. de Moura, "A finite- difference method of high-order accuracy for the solution of transient nonlinear diffusive–convective problem in three dimensions," Case Studies in Thermal Engineering, vol. 3, pp. 43–50, Jul. 2014, https://doi.org/10.1016/j.csite.2014.03.001. [5] M. Campos and E. Romão, "A High-Order Finite-Difference Scheme with a Linearization Technique for Solving of Three-Dimensional Burgers Equation," Computer Modeling in Engineering and Sciences, vol. 103, no. 3, pp. 139–154, Dec. 2014. [6] Y. Ge, Z. F. Tian, and J. Zhang, "An exponential high-order compact ADI method for 3D unsteady convection–diffusion problems," Numerical Methods for Partial Differential Equations, vol. 29, no. 1, pp. 186–205, 2013, https://doi.org/10.1002/num.21705. [7] Y. Ge, F. Zhao, and J. Wei, "A High Order Compact ADI Method for Solving 3D Unsteady Convection Diffusion Problems," Applied and Computational Mathematics, vol. 7, no. 1, pp. 1–10, Jan. 2018, https://doi.org/10.11648/j.acm.20180701.11. [8] N. Coelho, M. Vasconcelos, and L. Pedroso, "Estudo de Diferenças Finitas para a Equação de Calor em Barragens de Concreto," in Proceedings of the XXXVI Iberian Latin-American Congress on Computational Methods in Engineering, Rio de Janeiro, Brazil, Nov. 2015, https://doi.org/10.13140/RG.2.1.1828.9045. [9] E. C. Romao, J. C. Z. Aguilar, and M. D. de Campos, "Central difference method of O(∆x6) in solution of the CDR equation with variable coefficients and Robin condition," International Journal of Applied Mathematics, vol. 25, no. 1, pp. 139–153, Jan. 2012. [10] F. W. Gelu, G. F. Duressa, and T. A. Bullo, "Sixth-order compact finite difference method for singularly perturbed 1D reaction diffusion Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8574-8577 8577 www.etasr.com da Silva Júnior et al.: Numerical Simulation of a One-Dimentional Non-Linear Wave Equation problems," Journal of Taibah University for Science, vol. 11, no. 2, pp. 302–308, Mar. 2017, https://doi.org/10.1016/j.jtusci.2015.12.010. [11] M. M. Cruz, M. D. Campos, J. A. Martins, and E. C. Romão, "An Efficient Technique of Linearization towards Fourth Order Finite Differences for Numerical Solution of the 1D Burgers Equation," Defect and Diffusion Forum, vol. 348, pp. 285–290, 2014, https://doi.org/ 10.4028/www.scientific.net/DDF.348.285. [12] O. A. Neves, E. C. Romão, J. B. C. Silva, and L. F. M. de Moura, "Numerical Simulation of Convection-Diffusion Problems by the Control-Volume-Based Finite-Element Method," Numerical Heat Transfer, Part A: Applications, vol. 57, no. 10, pp. 730–748, May 2010, https://doi.org/10.1080/10407781003800672. [13] L. Zhang, L. Wang, and X. Ding, "Exact finite-difference scheme and nonstandard finite-difference scheme for coupled Burgers equation," Advances in Difference Equations, vol. 2014, no. 1, May 2014, Art. no. 122, https://doi.org/10.1186/1687-1847-2014-122. [14] H. Zhu, H. Shu, and M. Ding, "Numerical solutions of two-dimensional Burgers’ equations by discrete Adomian decomposition method," Computers & Mathematics with Applications, vol. 60, no. 3, pp. 840– 848, Aug. 2010, https://doi.org/10.1016/j.camwa.2010.05.031. [15] S. C. Chapra and R. P. Canale, Métodos Numéricos para Engenharia, 5th ed. Sao Paolo, Brazil: Mcgraw-Hill, 2008. [16] A. D. O. Fortuna, Técnicas Computacionais Para Dinâmica dos Fluidos. Conceitos Básicos e Aplicações, 2nd ed. Sao Paolo, Brazil: EDUSP, 2020.