Using the Finite Difference Method for the Wave Equation in Fluid Dynamics
Key Takeaways

The wave equation in fluid dynamics is dependent on factors such as the flow field, fluid attributes, and wave sources.

The wave equation can be derived using Newton’s law and Hooke's law.

CFD analysis of the wave equation is easier if you use the finite difference method.
Wave analysis is important in a wide range of applications, from electromagnetics to acoustics. In fluid dynamics, wave propagation occurs in many different ways, depending on the flow field, fluid attributes, and wave source. So, the understanding of the fluid wave phenomenon can be an important tool in analyzing flow behavior and potential mechanisms like heat transfer and turbulence.
In CFD, numerical simulation of wave propagation can be done using the finite difference method. By solving the partial differential equations (PDE) associated with the wave equation, a numerical solution associated with the fluid wave motion and its amplitude can be achieved. In this article, we will discuss the wave motion in fluids and the use of the finite difference method to solve the wave equation.
The Wave Equation for Fluids
Let us consider a fluid medium, such as water, flowing through a surface within a gravitational field in an equilibrium. Any deviation from the current state can lead to the gravity and surface tension acting on the fluid to cause oscillatory motion. This leads to the formation of gravity and capillary waves. These waves move across various times and positions, which can be analyzed using wave equations at different dimensions.
Derivation of the Wave Equation
The wave equation can simply be represented by the following partial differential equation:
Here, x represents the onespace dimension where the displacement, u, takes place at a time, t.
This equation can be derived from Hooke’s law, which uses a series of springs to connect particles with mass, m, to generate a wave phenomenon. Each spring has the spring constant, k, and is connected at length, h.
Using Newton’s and Hooke’s law, the force exerted on a particle can be written as:
Equating the above equations, we get the following equation of motion:
If we consider that N particles are placed evenly at length, L, we can get an overall equation by simply summing up the individual equation for each particle, given that, total length L=Nh and total mass M=Nm. The equation thus derived is:
Here, K is the total spring constant, which is equal to k/N.
If we take h→0, it can also imply that L→0. Therefore, we can assume N→∞ to ensure the value of L remains the same. The above equation under this assumption can be expressed as:
The term KL²/M is the square of propagation of speed. Considering this term to be c², we get:
This is the onedimensional wave equation.
Solving the Wave Equation With the Finite Difference Method
Given that a wave moves across time and space, the wave equation PDE of first or secondorder can be discretized using the finite difference method. The process of using the finite difference method to solve the wave equation includes:
 ➔ Discretization of the wave equation
 ➔ Assign and solve the equation at each mesh point
 ➔ Replace the derivatives with finite differential approximation
 ➔ Solve the resulting partial differential equation
Using the finite difference method for the wave equation, it is possible to solve for wave speed, amplitude, boundary conditions, and stability factors in wave analysis. This is especially beneficial when solving complex fluid dynamics problems. With the finite difference method facilitating the proper numerical evaluation and simulation of wave formation, complex wave behaviors in compressible and incompressible fluids can be easily analyzed.
Subscribe to our newsletter for the latest CFD updates or browse Cadence’s suite of CFD software, including Fidelity and Fidelity Pointwise, to learn more about how Cadence has the solution for you.