Abstract

This paper presents a study on the numerical solutions of the Burgers’ equation with forcing effects. The article proposes three hybrid methods that combine two-point, three-point, and four-point discretization in time with the Galerkin finite element method in space (TDFEM2, TDFEM3, and TDFEM4). These methods use backward finite difference in time and the finite element method in space to solve the Burgers’ equation. The resulting system of the nonlinear ordinary differential equations is then solved using MATLAB computer codes at each time step. To check the efficiency and accuracy, a comparison between the three methods is carried out by considering the three Burgers’ problems. The accuracy of the methods is expressed in terms of the error norms. The combined methods are advantageous for small viscosity and can produce highly accurate solutions in a shorter time compared to existing numerical schemes in the literature. In contrast to many existing numerical schemes in the literature developed to solve Burgers’ equation, the methods can exhibit the correct physical behavior for very small values of viscosity. It has been demonstrated that the TDFEM2, TDFEM3, and TDFEM4 can be competitive numerical methods for addressing Burgers-type parabolic partial differential equations arising in various fields of science and engineering.

1. Introduction

Burgers’ equation with forcing term is a nonlinear partial differential equation used to model shock wave theory and turbulence theory mathematically: where the small parameter means as usual the kinematics viscosity of the fluid motion.

We have added an inhomogeneous term to the right-hand side of the classical Burgers’ equation. This term represents an external source term for a one-dimensional velocity field which is assumed to be smooth. It is a simple model for exploring various interesting issues that arise in fluid turbulence. The function pumps the energy into the system constantly and has a physical meaning that expresses force such as gravity, centrifugal, friction force, or electromagnetic forces on the fluid. The physical situations in which the classical Burgers’ equation arises tend to be highly idealized due to the assumptions of the turbulence and constant coefficients without the forcing term. Equation (1) can provide us with more realistic models in various physical contexts such as directed polymers in a random medium, ballistic deposition, passive random walker dynamics on a growing surface, large eddy simulation, pinning of vortex lines in superconductors, and the long-wave propagation in a homogeneous two-layer shallow liquid. Hence, Eq. (1) has been the subject of numerous studies, and there is an enormous literature dedicated to this model equation.

Equation (1) was originally proposed by Bateman [1] in a homogeneous form and later used by Burgers [2, 3] as a mathematical model for turbulence. It represents the basic competition between nonlinear advection and viscous diffusion. This simple mathematical formulation appears in various physical problems such as turbulence, viscosity, traffic flow, sound waves, viscous elastic tubes, chemical reaction, heat conduction, and thermal radiation.

The Burgers’ equation can be solved exactly via the Hopf-Cole transformation for any given initial and boundary conditions. The Hopf-Cole transformation converts the nonlinear Burgers’ equation to the linear diffusion equation [4], and the exact solution of the model equation was provided by Cole [5] in this way. Since the equation has an exact solution, it is often used to control more complex nonlinear partial differential equations and is the first case study for testing and comparing computational techniques. Therefore, the Burgers’ equation has been extensively studied in literature with a variety of initial and boundary conditions from an analytical perspective, resulting in various solutions and properties being discussed [6].

The numerical techniques are valuable equipment for understanding the process of the physical model, and for this reason, many numerical studies have been developed in the literature, and we mention some of them in this study, for example, the implicit finite difference method [7], the implicit fourth-order compact finite difference scheme [8], the seventh-order weighted essentially nonoscillatory (WENO) schemes [9], a nonlinear Hopf-Cole transformation and backward differentiation formula method [10], the finite element method based on the method of discretization in time [11], a simple finite element approximation to the Burgers’ equation diminished by Hopf-Cole transformation [12], and a weak finite element method [13]. Recently, spline functions with some numerical schemes have been used in acquiring numerical solutions of the Burgers’ equation such as cubic and quadratic B-spline collocation method [14], modified cubic B-spline collocation method [15], B-spline Galerkin method and B-spline collocation method [16], collocation method based on Hermite formula and cubic B-splines [17], a cubic B-spline Galerkin method with higher order splitting approaches [18], cubic B-spline and fourth-order compact finite difference method [19], and cubic B-spline and differential quadrature method [20]. Also, implicit fractional step -scheme and conforming finite element method [21], radial basis functions (RBF) meshless method [22], nonstandard finite difference method [23], and a sixth-order compact finite difference scheme for space integration and Crank-Nicolson scheme for time discretization were used in [24].

Much effort has been spent in solving the Burgers’ equation, and the effort of finding a more accurate numerical scheme is still in progress. Investigating an accurate and efficient numerical scheme encourages us to produce the newly combined methods based on the finite element method for the Burgers’ equation with forcing effects. These methods are the two-, three-, and four-point backward finite difference schemes in time and the Galerkin finite element method (GFEM) in space. To the best of our knowledge, the three combined methods are applied to the model equation for the first time in this study. We use the two-, three-, and four-point backward finite difference scheme derived for the first order derivative to discretize the term in the model equation since the method is easily applicable and converges very rapidly to the solution. Since ordinary differential equation systems obtained after discretization in time are exceptionally large, the computational proficiency of the finite difference approach becomes critical. In such cases, the performance of the scheme is weakened due to instability. The GFEM is one of the best choices in such situations since the method is easy to implement and has the required accuracy. It is a general technique for constructing approximate solutions to boundary value problems that arise in science and engineering applications. The GFEM gives a polynomial at each point instead of a value, and it can give value at any point within the domain. In this method, one can easily use the finite element shape functions instead of trial functions [25]. For this reason, the GFEM has become a very popular technique used in solving differential equations.

Most of the existing numerical schemes in the literature developed to solve Burgers’ equation cannot exhibit its correct physical behavior for very small viscosity values. A distinctive feature of the hybrid methods over the existing numerical schemes is taking advantage of the fact that a small viscosity parameter is accounted for in the accuracy. The methods can solve the classical Burgers’ equation up to and Burgers’ equation with forcing term up to . The capacity of the proposed methods surpasses the methods cited in the literature that we have referenced.

The advantages of the hybrid methods are seen especially from the steep behavior of the produced results. We show that our methods stabilize the solutions much earlier than the methods suggested by some literature [824, 26]. The present works of literature are aimed at obtaining numerical solutions accurately. However, these numerical results are confined to a high viscosity value. Therefore, we put more emphasis on the accuracy of the solution at low values of viscosity parameter in this article. Also, the three combined methods have been applied directly without using the linearization or any restrictive assumptions.

The current study is aimed at demonstrating that the newly combined methods are powerful, quite accurate, and capable of solving the model equation with forcing effects effectively and comparatively. For this, three test examples are included, and the numerical computations are performed for various values of viscosity by computer codes generated in MATLAB. The presented schemes have been compared with each other and some literature [14, 17, 26] to determine their advantages and disadvantages for different types of problems. The more advantageous combined method of the three in comparison to the other two can be seen for the specific cases of the proposed problems elaborately. The results are presented by the tables and figures compared with some error norms.

The remainder layout of the paper is organized as follows. In Section 2 and its subsections, the numerical scheme based on the Galerkin finite element method with two-point, three-point, and four-point finite difference schemes is explained and implemented to the model equation. Section 3 compares numerical results with other some numerical techniques available in the literature. Section 4 summarizes the conclusions and recommendations of this study.

2. Materials and Methods

We consider the Burgers’ equation given in Eq. (1) with the initial condition, and the Dirichlet boundary conditions,

The method of discretization in time through the backward finite difference method converts a second-order initial boundary value problem in two variables into the solution of ordinary differential equations with corresponding boundary conditions. In addition, the finite element method is a well-known technique for solving both partial and ordinary differential equations. Its main idea is to decompose the entire region of the problem domain into a finite element system associated with nodes and to choose the most appropriate element type that models the real physical behavior in the best way possible [25]. The article focuses on the Galerkin finite element method which uses linear basis functions as weight and trial functions over the finite element. These basis functions are selected because they are convenient and advantageous. The combined methods presented in the article are introduced in the following subsections.

2.1. Two-Point Discretization in Time and Galerkin Finite Element Method (TDFEM2)

We study Eq. (1) with initial condition (2) and boundary conditions (3). In the method of discretization in time using two-point backward finite difference approximation, the compact time interval is divided into subintervals of lengths such as , where is final time and is a positive integer. is defined as approximation of the function for . After replacing derivative by the backward difference approximation a discretization of the model problem in the direction of the time-axis is established [27]. The method of discretization in time employing two-point backward finite difference gives where . The method of two-point discretization in time includes seeking the functions such that boundary conditions given in Eq. (4) are satisfied. Since the exact solution of the boundary value problem (4) becomes more difficult with increasing values of , we propose the GFEM to solve it. The FEM gives a systematic means of generating numerical solutions to a problem formulating the model problems [25]. Thus, the GFEM is applied to solve each of Burgers’ equation problems. The weak form of Eq. (4) is given by where is the test function. The test function and its derivative exist and are square integrable on the interval . The Hilbert space denotes the linear space of all test functions. To create the test functions , we select a set of test basis functions that are finite linearly independent, where . Therefore, we can express the test function in the following manner: where the coefficients are arbitrary real numbers [11]. Due to the boundary conditions, we know that . We obtain approximate solution of Eq. (6) applying GFEM. We define the Galerkin approximation of the by, where are linearly independent trial basis functions and the coefficients are to be determined later. In the GFEM, trial basis functions and test functions are chosen to be the same, namely,

The interval is partitioned into subintervals of equal length . If are the end points of -th element , so that and . These end points are known as nodes. linear trial basis functions can be defined by using the following equality:

Substituting (7) and (8) into the weak form Eq. (6) and after boundary conditions adapted into the system, we delete the first and last equations from the system and eliminate the coefficients and from the system. Thus, we obtain a system of equations in the following form: where . For each , Eq. (12) is a nonlinear system consisting of equations and unknowns. and are the coefficient matrices with the dimension , and is the element matrix with the dimension . These matrices are derived from following integrals:

The above system can be written in terms of matrices as where and . Before starting the iteration procedure, initial vector must also be determined using initial condition. After that, we solve the system of nonlinear algebraic equations resulting from the nonlinear Burgers equation implemented through the built-in function fsolve of MATLAB.

2.2. Three-Point Discretization in Time and Galerkin Finite Element Method (TDFEM3)

In this subsection, we consider again the model Eq. (1) with initial and boundary conditions given in (2) and (3), and replacing derivative by the three-point backward difference approximation , we get following boundary value problem: where . Since the exact solution of the boundary value problem (15) becomes more difficult with increasing similar to Section 2.1, the GFEM is applied to solve each of the problems. The weak form of Eq. (15) is given by

Substituting (7) and (8) into the weak form Eq. (16) and after boundary conditions adapted into the system, we delete the first and last equations from the system and eliminate the coefficients and from the system. Thus, we obtain a system of equations in the unknown parameters : where . The system given in Eq. (17) can be written in terms of matrices as where , . It is seen that Eq. (18) is used only for , so we must compute the values of by another method. For this, we choose a predictor-corrector method. Before starting the iteration, the initial vector must be determined by setting by . After an inner iteration, we obtain the values of . In this stage, Eq. (18) is used for the computation other values of , and we solve the system of nonlinear algebraic equations resulting from the nonlinear Burgers' equation implemented through the built-in function fsolve of MATLAB.

2.3. Four-Point Discretization in Time and Galerkin Finite Element Method (TDFEM4)

We have detailed information about the discretization in time and the GFEM in Subsections 2.1 and 2.2. In this subsection, what we have done is to use the four-point backward difference approximation to establish a discretization of the given problem in the direction of the time-axis.

Replacing derivative by the four-point backward finite difference approximation, , the method of discretization in time through four-point backward difference gives the boundary value problem as follows:

Applying the GFEM, the weak form of Eq. (19) is given by and substituting (7) and (8) into the weak form Eq. (20) and after boundary conditions imposed to the system, we delete first and last equations from the system and eliminate the coefficients and from the system. Thus, we obtain a system of equations in the unknown parameters :

where . The nonlinear systems obtained from Eq. (20) for each value of the can be solved using computer codes produced in MATLAB. We prefer to write the above system in terms of matrix form as where , It is seen that Eq. (22) is used only for , so we must compute the values of by another method. For this, we choose a predictor-corrector method. Before starting the iteration, the initial vector can be determined setting by . After two inner iterations, we obtain the values of and . In this stage, Eq. (22) is used for the computation of other values of , and we solve the system of nonlinear algebraic equations resulting from the nonlinear Burgers equation implemented through the built-in function fsolve of MATLAB.

3. Numerical Experiments

We have mentioned how we can solve Burgers’ equation with forcing term using TDFEM2, TDFEM3, and TDFEM4 in the subsections of Section 2. In this part, we provide three numerical test examples to demonstrate the adaptability and accuracy of the proposed hybrid methods computationally. Numerical simulations were produced using MATLAB 2023b on a personal notebook equipped with a 12th Gen Intel (R) Core (TM) i7-1255U processor, 10 processing cores, 16 GB of RAM, and all results are shown graphically as well as in tabular form. To compute the accuracy of the numerical schemes, we calculate the difference between the numerical and exact solutions at each nodal point after specified time steps and use this to compute the and error norms. These absolute and relative errors are given by

Example 1 (see [14]). This problem represents a shock propagation solution of Burgers’ equation, and the forcing term is taken to be zero for this problem. We examine Burgers’ equation with the initial condition at , and boundary conditions, The exact solution of Burgers’ equation is where . Calculations are performed for different viscosity values, finite elements, and time. It can be seen from Figure 1 that the wave at for is smooth, and the scheme produces a more regular shock during the computation time. As time progresses, a decrease in wavelength and a wider spread are observed. For smaller viscosity values, , the shock becomes sharp. This sharpness is maintained, and the shock wave propagates faster as time progresses. As can be seen in Figures 1 and 2, the proposed hybrid methods are observed to be very successful in capturing the steep behavior of the solution function.

The numerical results for , , and are tabulated in Table 1, while those for , , and are given in Table 2. These tables also include the total CPU time required for all calculations with absolute and relative errors. Based on the tables provided, the results obtained are relatively close to the exact results. It is noteworthy that the errors in our results decrease as the number of points used in time discretization increases. As time progresses, the absolute and relative errors in the tables gradually increase. However, the errors obtained in all schemes are small and acceptable for the viscosity values used in this problem.

Tables 3 and 4 provide a comparison of numerical solutions obtained using cubic B-spline [14] and Hermite formula [17] based collocation methods at different time stages. The results demonstrate that our proposed methods based on FEM are more accurate, as the computed errors are smaller than the corresponding errors obtained by [14, 17]. Additionally, our proposed methods are more efficient in terms of time consumption, and thus, they are a better choice for solving problems of Burgers’ type.

We examined the effect of increasing the number of finite elements and values on the error norms, which are presented in Tables 5 and 6, respectively. It is observed that an increase in the number of finite elements leads to a significant reduction in the absolute error rate, as shown in Table 5. Moreover, as the value of increases, the time step decreases, and the numerical solutions converge more closely to the exact solutions. The paper’s tables indicate that TDFEM4 is more accurate and economical than TDFEM2 and TDFEM3, requiring less computational cost and storage space.

Example 2. We consider Burgers’ equation with the initial condition, and the boundary conditions, and the following forcing term, With the above conditions, the exact solution of the model equation is Figures 3 and 4 depict the physical behavior of the problem for and with and , respectively. For the viscosity value of , the program took 4.358682 seconds to run, and a sharp descent is observed at 11.4 seconds. It is seen that the proposed method efficiently captures the shocks in the numerical solution.

The accuracy of the presented methods is examined by computing the absolute and relative errors for smaller values of viscosity. In the present, the selection of viscosity value affects the errors in the proposed schemes. With decreasing viscosity values, the algorithm needs more finite elements to compute properly. As expected, the error norms are reduced by increasing the number of finite elements and decreasing the time step.

The absolute and relative errors for , , and and , , and at different times are tabulated in Tables 7 and 8, respectively. These tables also provide the total CPU time required for all computations. It is seen from Tables 7 and 8 that the errors obtained in all schemes are quite small and acceptable for values of viscosity used in this problem. Our proposed numerical methods perform efficiently for small values of in a short computation time.

In particular, the TDFEM4 can progress up to 12 seconds with less computational complexity and capture shocks at 11.4 seconds. Yet, the computed results of the method that used more points in discretization in time are more accurate in comparison with the other two combined methods and are free of choice of viscosity parameter. It can be inferred that the presented numerical methods are in quite good agreement with the exact solution and represent the physical properties of Burgers’ equation with forcing term accurately.

Example 3 (see [26]). Consider the model equation with the initial condition, and with the time-dependent nonhomogeneous boundary conditions, Its exact solution is

In this example, the numerical results have been computed for the parameter values in Table 9. The accuracy of the three combined methods has been demonstrated based on the error norms, and the presented schemes have been compared with each other in terms of their advantages and disadvantages. It is seen that the combined methods have more accurate results even with the use of fewer finite elements than some studies in the literature, and the comparisons have shown that the present schemes offer better results than the numerical schemes given in [26]. This problem was studied in [18], yet there are no numerical results to compare with our results. Therefore, we do not have elaborate details.

Figure 5 displays the physical behavior of the solution function at , for , , and . The numerical results agree with the exact results, indicating that the three combined methods used in this study are accurate, especially the method that used more points in discretization in time which was found to be more accurate than the other two methods. We can conclude that these combined methods are more accurate than some other existing methods in the literature.

4. Conclusions and Recommendations

In the present work, the three combined methods based on the backward finite difference and Galerkin finite element schemes have been introduced and applied for solutions of the Burgers’ equation with forcing term accurately. To demonstrate the efficiency of the proposed newly combined methods, three test examples are included and the numerical computations are performed for various values of the parameters. The computed results have revealed that the proposed methods are computationally powerful, highly accurate, and capable of solving the model equation. The numerical results are seen to be relatively more accurate than some of the existing results in the literature. The methods are also quite convenient to generate computer codes in any programming language. As well, the presented methods in this article seem to be a very robust alternative to solve the problem by preserving the physical properties of the Burgers’ equation. Based on the currently proposed methods, further studies can focus on solving the Burgers’ type equations as well as other PDEs arising in various fields of science and engineering.

Data Availability

Data will be made available on request.

Disclosure

The authors declare that they have not used artificial intelligence (AI) tools in the preparation of this article.

Conflicts of Interest

The authors did not report any potential conflicts of interest.

Acknowledgments

The authors would like to thank Dr Murat Sari (Istanbul Technical University) for his valuable comments on this paper. The first author would like to thank the Science Fellowships and Grant Programs Department of TUBITAK (TUBITAK BIDEB) for supporting her academic research.