1. Introduction
In 1977, Lucy [
1] and Gingold and Monaghan [
2] independently pioneered the smoothed particle hydrodynamics (SPH) method for modeling astrophysical phenomena in three-dimensional space. As a Lagrangian, meshfree method, the SPH method can handle fluid dynamic problems with complicated and time-variant domain topologies, large density ranges and object separation, as shown in recent reviews by Springel [
3], Liu and Liu [
4] and Monaghan [
5]. Like other meshless methods being used in computational acoustics [
6,
7], the SPH method has the potential to be used to solve complicated acoustic problems, such as combustion noise, bubble acoustics, sound propagation in multiphase flows, and so on [
8].
Recently, Wolfe [
9] and Hahn [
10] directly solved the fluid dynamic equations by the SPH method to obtain pressure perturbations in the computational domain. Subsequently, Zhang
et al. [
8,
11] proposed using the SPH method to solve linearized acoustic wave equations in the quiescent fluid. However, the appearance of unphysical oscillations leads to the instability of SPH simulation results.
In order to eliminate the unphysical oscillations phenomena, Von Neumann and Richtmyer [
12] proposed the methodology of artificial viscosity for simulating one-dimensional shock waves. Landshoff [
13] subsequently added a linear artificial viscosity term to the Von Neumann-Richtmyer artificial viscosity, which could further smooth the oscillations. On this basis, Monaghan and Gingold [
14], Monaghan and Poinracic [
15] and Monaghan [
16] developed another type of artificial viscosity (Monaghan-type artificial viscosity) for simulating shocks. After this, other modifications to the Monaghan-type artificial viscosity have also been proposed [
17], but the effects of the modified Monaghan-type artificial viscosity are still being investigated. In recent years, many research fields [
18,
19,
20,
21,
22] have adopted various forms of artificial viscosity to capture shock or model a physical Navier–Stokes viscosity. So far, Monaghan-type artificial viscosity [
14,
15,
16] is the most widely used artificial viscosity in the SPH simulations. Therefore, this paper focuses on introducing the Monaghan-type artificial viscosity [
14,
15,
16] into the SPH simulation of sound propagation and interference.
The present paper is organized as follows. In
Section 2, the SPH algorithm is built for solving the linearized acoustic wave equations, and a Monaghan-type artificial viscosity [
14,
15,
16] term is added to the momentum equation. In
Section 3, SPH algorithms with or without artificial viscosity are both used to simulate sound propagation and interference, and the effects of artificial viscosity are discussed. In
Section 4, the numerical errors of sound pressure obtained by SPH algorithms with different kinds of smoothing kernel functions, different particle spacings and Courant numbers are calculated and analyzed. On this basis, suitable computational parameters of SPH algorithms for simulating sound waves are recommended. Finally, the conclusion of the paper is drawn in
Section 5.
2. SPH Algorithm for Acoustic Simulation
Functions in the SPH method are written as a particle approximation form. The continuous SPH integral representation for
f(
r) can be written as:
where
f is a function of the vector
r, Ω is the volume of the integral,
W is the smoothing kernel function and
h is the smoothing length. In the SPH convention, the kernel approximation operator is marked by the angle bracket < >.
The particle approximation for the spatial derivative can be described as:
where
ri and
rj indicate the position of particles
i and
j separately,
rij =
ri −
rj,
rij is the distance between particle
i and particle
j,
N is the number of particles in the computational domain,
mj is the mass of particle
j and
ρj is the density of particle
j.
Wij =
W(
rij,
h) is the smoothing kernel function.
h is the smoothing length that defines the influence area of the smoothing function
Wij.
In order to evaluate the effects of the kernel function, three different smoothing kernel functions are used to simulate sound propagation and interference, which are the Gaussian kernel function [
2], the cubic spline kernel function [
23] and the quintic spline kernel function [
24].
The Gaussian kernel function can be written as:
where
q =
rij/
h,
is 1/(π
1/2h), 1/(π
h2) and 1/(π
3/2h3) in one-, two- and three-dimensional space, respectively.
As discussed in [
25], the Gaussian kernel function is sufficiently smooth even for high orders of derivatives, and it is very stable and accurate, especially for disordered particles. However, it is not really compact, as it never goes to zero theoretically, unless
q approaches infinity.
The cubic spline kernel function is given by:
where
q =
rij/
h,
is 1/
h, 15/(7π
h2) and 3/(2π
h3) in one-, two- and three-dimensional space, respectively.
As described in Crespo’s thesis [
25,
26], so far, the cubic spline kernel has been the most widely-used smoothing function in the SPH literature, since it resembles a Gaussian function while having a narrower compact support (it is equal to zero for
q > 2). However, the second derivative of the cubic spline is a piecewise linear function, so the stability properties are inferior compared to other smoothing kernel functions.
The quintic spline kernel function is:
where
q =
rij/
h,
is 1/(120
h), 7/(478 π
h2) and 3/(359 π
h3) in one-, two- and three-dimensional space, respectively.
According to the discussion on the quintic spline kernel function by Cao
et al. [
27], the quintic spline kernel function is a high order spline function and is not sensitive to the disorder particle distribution. The compact support domain of the quintic spline kernel function is narrower than the Gaussian kernel function.
In this paper, the medium of sound propagation and interference is ideal gas; the process of sound propagation and interference is adiabatic; and the particle velocity
u, sound pressure δ
p and the density change of particle δρ satisfy the following equations:
where
P0 denotes the quiescent pressure of a medium,
ρ0 is the quiescent density of a medium and
c0 represents the initial sound speed.
The particle approximation of the continuity equation can be written as:
where
represents the density change of particle
i,
and
separately denote the density of particles
i and
j, the superscript L stands for the Lagrangian variable associated with a fluid particle,
t is the time,
is the mass of particle
j,
and
and
are the velocity of particles
i and
j, respectively.
The standard SPH formulation of the momentum equation can be written as:
where the
and
are the sound pressure of particles
i and
j, respectively.
The particle approximation of state equation for ideal gas can be described as:
If adding the artificial viscosity term, the momentum equation is obtained as:
where
Пij is the Monaghan-type artificial viscosity [
14] and is given by:
where
αП,
βП are adjustable non-dimensional constant.
,
.
ci and
cj separately indicate the sound speed of particle
i and
j, and both
ci and
cj are equal to
c0. In Equation (12), the expression of
can be written as:
where the factor
φ = 0.1
hij,
hij = (
hi +
hj)/2.
hi and
hj indicate the smoothing length of particles
i and
j, respectively, and both of them are equal to
h. The smoothing length is constant in this work.
Algorithm 1 shows the detail steps of acoustic wave simulation.
Algorithm 1. The SPH algorithmic description for acoustic wave simulation. |
begin |
Initialization phase |
Generate sound source according to function of sound pressure |
while (time step < total time step) |
for all particle i do |
Calculate the spatial derivative of smoothing kernel |
Compute the derivative of the density change with respect to time |
Calculate the pressure change using |
Compute the derivative of the velocity with respect to time |
Introduce the artificial viscosity term, and recompute |
Compute , using the second order leap-frog integration |
end for |
Recompute the sound source according to function of sound pressure |
end while |
Return the simulation result, which includes sound pressure, density change, and so on. |
end |
In Algorithm 1, the second order leap-frog integration [
28] is used to compute
,
, since there is low memory storage required and high efficiency in the computation. The expressions can be written as:
where
is the time step. In practice, time step
should be larger than that estimated using the Courant–Friedrichs–Levy (CFL) condition [
25]. In this work, this condition is represented by:
4. Results of Numerical Errors and Discussion
In order to evaluate the SPH simulation results, the SPH numerical error of the sound pressure
ɛpre is calculated. The error is defined by:
where
ɛpre is a non-dimensional parameter and
n denotes the number of particles that are used to compute numerical error.
is the simulation sound pressure of the particle
j, and
is the theoretical sound pressure in the position of particle
j.
P denotes the pressure that is used to non-dimensionalize the numerical error. In this paper,
P is defined as the amplitude of an acoustic wave in the sound propagation and is defined as the difference of the sound pressure amplitudes of two acoustic waves in the sound interference, that is
P = 50 Pa in the sound propagation and
P = 20 Pa in the sound interference. The region that is used to compute the numerical error is from 0 m to 90 m in the sound propagation and from 0 m to 70 m in the sound interference.
According to the computational parameters given in
Table 1, we simulate the sound propagation and interference using the SPH algorithms with
αП changing from 0.00 to 0.08; meanwhile,
βП is set as 0.50. Then, we calculate the SPH numerical errors of the sound pressure according to Equation (18), as shown in
Table 2.
From
Table 2, it can be seen that the SPH algorithms with artificial viscosity can improve the accuracy of the simulation. Compared to the sound interference simulation, when the parameters of artificial viscosity term are the same, the SPH numerical errors of sound propagation are smaller. For sound propagation, the SPH numerical errors of sound pressure reach the minimum when
αП = 0.06,
βП = 0.5. For sound interference, the SPH numerical errors of sound pressure reach the minimum when
αП = 0.03,
βП = 0.5.
Table 2.
The SPH numerical errors of sound pressure.
Table 2.
The SPH numerical errors of sound pressure.
αП | βП | Sound Propagation ɛpre (×10−4) | Sound Interference ɛpre (×10−4) |
---|
0.00 | 0.00 | 2.574247 | 3.674502 |
0.00 | 0.50 | 2.571422 | 3.674424 |
0.01 | 0.50 | 2.303623 | 3.615698 |
0.02 | 0.50 | 2.177653 | 3.580848 |
0.03 | 0.50 | 2.098490 | 3.565303 |
0.04 | 0.50 | 2.059441 | 3.566019 |
0.05 | 0.50 | 2.038529 | 3.580722 |
0.06 | 0.50 | 2.034482 | 3.607429 |
0.07 | 0.50 | 2.039658 | 3.644548 |
0.08 | 0.50 | 2.041069 | 3.690689 |
Since sound propagation and interference are similar, we mainly discuss the effects of artificial viscosity on different sound interference models in the present work. In the discussion, different computational parameters, namely the smoothing kernel function, particle spacing and the Courant number, are considered.
Different sound interference cases with Gaussian, cubic spline and quintic spline kernel functions are simulated. The artificial viscosity terms with different values of
αП and
βП are added, and the numerical errors of sound pressure are plotted in
Figure 5.
Figure 5.
Numerical errors of sound pressure for sound interference models with different kinds of smoothing kernel functions. Particle spacing Δx is 0.04 m, and the Courant number is 0.04. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
Figure 5.
Numerical errors of sound pressure for sound interference models with different kinds of smoothing kernel functions. Particle spacing Δx is 0.04 m, and the Courant number is 0.04. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
As shown in
Figure 5, for the same particle spacing Δ
x and Courant number, the smoothing kernel functions have obvious effects on the SPH simulation results. The SPH simulation using the cubic spline kernel function has more accuracy results than that using the Gaussian kernel function or the quintic spline kernel function. The numerical errors of SPH simulation using the quintic spline kernel function are slightly less than those using the Gaussian kernel function, but there is not much difference between these two types.
From
Figure 5a, it can be found that, for different smoothing kernel functions, adding an artificial viscosity term can reduce the numerical errors of sound pressure. The numerical errors of the SPH results with three kinds of smoothing kernel functions share a similar changing tendency with the increasing of
αП. They firstly decrease and then increase and reach their minimums when
αП locates at [0.03, 0.06]. However, as shown in
Figure 5b, parameter
βП has no obvious effects on the simulation results.
The sound interference models with particle spacing ∆x separately set to 0.04 m, 0.06 m and 0.08 m are also simulated.
Figure 6 shows the numerical errors of sound pressure obtained by different sound interference models.
Figure 6.
Numerical errors of sound pressure for sound interference models with different particle spacings. The smoothing kernel function is cubic spline, and the Courant number is 0.04. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
Figure 6.
Numerical errors of sound pressure for sound interference models with different particle spacings. The smoothing kernel function is cubic spline, and the Courant number is 0.04. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
As can be seen from
Figure 6, for the same smoothing kernel function and Courant number, ignoring the effect of artificial viscosity terms, the largest numerical error of sound pressure occurs when particle spacing is 0.08 m, and the least error of sound pressure happens at a particle spacing of 0.04 m. That is, the numerical errors are heavily influenced by the particle spacing Δ
x, and the numerical errors increase with the particle spacing increasing.
Similarly, it can also be found that the numerical errors of the SPH results with different particle spacings all have the same changing tendency with the increasing of αП. Parameter αП has obvious effects on the simulation results, while parameter βП does not.
In addition, different sound interference models with Courant numbers separately set to 0.02, 0.04, 0.06 and 0.08 are simulated.
Figure 7 shows the numerical errors of sound pressure for sound interference models with different Courant numbers.
Figure 7.
Numerical errors of sound pressure for sound interference models with different Courant numbers. The particle spacing Δx is 0.04 m and the smoothing kernel function is cubic spline. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
Figure 7.
Numerical errors of sound pressure for sound interference models with different Courant numbers. The particle spacing Δx is 0.04 m and the smoothing kernel function is cubic spline. (a) Effects of αП on the simulation results at βП = 0.5; (b) effects of βП on the simulation results at αП = 0.0.
Figure 7 indicates that a better simulation result can be found when the Courant number is 0.08. For different Courant numbers, the numerical errors of sound pressure still share the same changing tendency with parameter
αП increasing. Similarly, parameter
βП has no obvious effect on the simulation results.
In summary, the SPH algorithms using the cubic spline have optimum simulation results when the particle spacing ∆x = 0.04 m and the Courant number is 0.08. The corresponding numerical errors could reach their minimum value when αП belongs to the region [0.03, 0.06].