Journal Of Iranian Water Engineering Research

Journal Of Iranian Water Engineering Research

Solving the Inhomogeneous Second-Order Wave Equation with Asymmetric Boundary Conditions: Novel Analytical, Mesh-Based, and Meshless Approaches in Computational Fluid Dynamics

Document Type : Research Article

Authors
1 MSc Graduated, Department of Civil Engineering, Faculty of Engineering and Technology, University of Qom, Qom, Iran
2 PhD Graduated, Department of Civil Engineering, Faculty of Engineering and Technology, University of Qom, Qom, Iran.
3 Associate Professor, Department of Civil Engineering, Faculty of Engineering and Technology, University of Qom, Qom, Iran.
Abstract
Introduction: Solving partial differential equations (PDEs) is fundamental in engineering, especially fluid mechanics. Analytical solutions are often limited, particularly with complex boundary conditions. Thus, numerical methods have gained research interest. The wave equation, a second-order hyperbolic PDE, is widely used in physics and engineering. Various numerical approaches, including finite difference, finite volume, finite element, and boundary element methods, have been applied to solve this equation.
Recent studies explore high-accuracy numerical solutions, such as wavelet methods, fourth-order discretization, and numerical techniques for nonlocal boundary conditions. While mesh-based methods require extensive preprocessing and computational effort, meshless methods offer a more efficient alternative. Among these, the radial basis function (RBF) method, particularly the multiquadric (MQ) method, has shown promise in solving PDEs without meshing.
Research on MQ method has improved accuracy and computational efficiency, optimizing shape parameters and domain decomposition techniques. This study compares the MQ method’s accuracy and efficiency against the finite difference method and analytical solutions for the inhomogeneous wave equation. The results highlight the advantages and limitations of each method under different initial and boundary conditions.
The paper covers the governing equation, analytical solutions, numerical methods, and a comparative analysis of accuracy and efficiency.
Methodology: The wave equation is solved with different symmetric and asymmetric Neumann and Dirichlet boundary conditions using separation of variables. A variable change is introduced to simplify the problem and eliminate non-zero boundary conditions. The new initial value problem can then be solved using separation of variables. The result is obtained by solving the eigenvalue system, leading to a unique solution for the wave equation. This solution satisfies the boundary conditions and can be expressed as a series solving the non-conservative wave equation.
The finite difference method (FDM) is introduced as a numerical solution technique for the wave equation. In FDM, time and space are discretized into equal subintervals, and derivatives are approximated using finite differences. The equation is then solved for the function at future time steps using a leapfrog method. The stability of explicit methods like FDM is governed by the Courant number, which must be less than or equal to 1 for stability.
Lastly, the meshless multiquaric method, which uses RBFs, is discussed. Unlike mesh-based methods, this approach uses distributed points that don't require connectivity, making it suitable for complex geometries. The method is flexible in both 2D and 3D problems but requires careful selection of the shape parameter to balance accuracy and computational efficiency. An optimal shape parameter can be determined through the algorithm by Falah et al. (2019).
Results and Discussion: The finite difference and meshless multiquadric methods are compared with their respective analytical solution, assuming a CFL number of 0.5. For the meshless multiquadric method, the shape parameter is adaptively determined. For comparison, three examples have been adopted by imposing different boundary conditions.
Example 1: Dirichlet Boundary Conditions
A Gaussian wave is used as the initial condition over a 500m domain. Numerical results from both methods are compared with the analytical solution. The meshless method used 400 overlapping points, while the finite difference method had 800 grid points. Processing times were 0.08s and 0.1s, respectively. The meshless method had half the numerical error of the finite difference method, proving its superiority.
Example 2: Neumann Boundary Conditions
Using the same initial condition as Example 1, Neumann boundary conditions are applied. The meshless method again showed better accuracy, with an RMSE of 0.0107% versus 0.0259% for the finite difference method. Processing times were similar, at 0.081s and 0.12s, respectively.
Example 3: Asymmetric Boundary Conditions
Three cases were considered:
• (3-a): Gaussian initial condition with a zero-gradient Neumann boundary condition.
• (3-b): Zero initial condition with a constant gradient Neumann boundary condition.
• (3-c): Zero initial condition with a sinusoidal Neumann boundary condition.
For these cases, the meshless method used 400, 51, and 51 points, while the finite difference method used 800, 251, and 251 points. The meshless method showed lower RMSE values and faster computation times, confirming its suitability for asymmetric boundary problems.

Overall, the meshless multiquadric method consistently outperformed the finite difference method in terms of both accuracy and computational efficiency, making it a viable alternative for a variety of boundary conditions.
Conclusion: This study compares the finite difference and meshless multiquadric methods for solving the second-order inhomogeneous wave equation. For comparison, an analytical solution was also derived using the separation of variables for various initial and boundary conditions, including Dirichlet and Neumann conditions. Results show that both numerical methods perform well; however, the meshless multiquadric method achieves relatively lower error with similar computational cost. Optimal shape parameters were identified, reducing iterations. This highlights the method’s efficiency in solving hyperbolic equations.
Keywords
Subjects