A Full Finite-Volume Time-Domain Approach Towards General-Purpose Code Development For Sound Propagation Prediction With Unstructured Mesh
A Full Finite-Volume Time-Domain Approach Towards General-Purpose Code Development For Sound Propagation Prediction With Unstructured Mesh
A Full Finite-Volume Time-Domain Approach Towards General-Purpose Code Development For Sound Propagation Prediction With Unstructured Mesh
ABSTRACT
While finite-difference time-domain (FDTD) approach has widely been accepted as a
simple, fast and proven measure for numerical sound propagation prediction, it has
suffered enforcement of orthogonal mesh usage and lack of general-purpose solver code.
Due to the weaknesses we even now have to write solvers and pre/postprocessing codes
on case-by-case basis. This has made real industrial applications of the technique with
complex geometries difficult. The issue was addressed here through introduction of
a full finite-volume time-domain (FVTD) approach meant as a replacement for the
FDTD technique. The main strength of the FVTD approach in principle is a great
flexibility in mesh handlings which allows full unstructured meshes containing arbi-
trary shapes of polyhedra. Thus the strength opens possibility of using a vast variety
of general-purpose pre/postprocessors designed for finite volume or finite element
meshes. The proposed FVTD technique, along with an acoustic impedance boundary
condition specifically developed for use with the technique, was formulated, imple-
mented and tested using solutions obtained by the FDTD technique as benchmarks.
Both techniques were confirmed to produce identical results under identical geome-
try, mesh and computational conditions. The demanded processor times and memory
usages for FVTD calculations were more than ten times of FDTD calculations, which
still was thought to be allowable up to medium-sized problems with recent advance-
ments in processor performance taken into account. The results obtained under full
unstructured tetrahedral meshes, however, showed numerical dispersions and diffu-
siveness, which indicated necessity of further works.
1 INTRODUCTION
While finite-difference time-domain (FDTD) approach has widely been accepted as
a simple, fast and proven measure for numerical sound propagation prediction, it has
suffered enforcement of orthogonal mesh usage and lack of general-purpose solver code.
1
Email address: oshima@eng.niigata-u.ac.jp
2
Email address: imano@arch.t.u-tokyo.ac.jp
Thus we even now often have to write solvers and pre- and postprocessing codes on case-
by-case basis. The resultant negative effects arising from the shortcomings are mainly
twofold:
1. With recent advancements in processor performance taken into account, the short-
comings has made relative cost of human powers with regard to pre- and post-
processings much higher than the cost devoted for numerical simulation itself, in
particular for small- and medium-sized cases. The situation has made real indus-
trial applications of the FDTD technique for complex geometries difficult.
2. Despite the wide use of the FDTD technique in many literatures, we still do not,
and will not be able to, have a common case sharing framework for accumulat-
ing case examples which would stimulate communications between computational
acousticians unless the circumstance changes.
2. Thanks to the simplicity, its computational cost per cell is extremely low.
The possible new approach is expected to maintain these features at least to some extent.
All the issue was addressed here through introduction of a full finite-volume time-
domain (FVTD) approach meant as a replacement for the FDTD technique, as opposed to
a mixed finite-difference and finite-volume approach meant as a complement for handling
body-fitted cells in FDTD computation [1]. The main strength of the full FVTD approach
in principle is a great flexibility in mesh handlings which allows using unstructured meshes
containing arbitrary shapes of polyhedra, while maintaining relative simplicity compared
to other more advanced approaches such as BEM or FEM. Hence the strength opens
possibility of using a vast variety of general-purpose pre- and postprocessors designed for
finite volume or finite element meshes, keeping computational costs per cell relatively low
at the same time.
To fully exploit the inherent feature of finite volume approach, the proposed technique
has been implemented as a user application on top of an open-source finite volume based
toolkit, OpenFOAM [2]. With this approach, not only the developers can make maximum
use of its tried and proved finite volume operators and I/O libraries, but also a user can
get full access to the included mesh format converters and postprocessing exporters.
The implementation was tested for contrasting its accuracy and computational costs
against the FDTD approach. Furthermore, several formulations of the acoustic impedance
boundary condition were carried out comparative tests under orthogonal and unstructured
meshes to choose the accompanying implementation of the boundary condition with the
main FVTD implementation.
where t, c0 , ∇2 are time, propagation speed of the wave and Laplacian operator respec-
tively. Using φ, pressure p and particle velocity u are written as follows.
∂φ
p = ρ , (2)
∂t
u = −∇φ. (3)
Eq. (1) is discretized under unstructured grid system as shown in Fig. 1 where the
definition point of physical quantities are taken at the barycenter of each control volume
(CV). For the left hand side of Eq. (1), by integrating over the CV with time-invariant
volume V and applying central time-differential scheme, we get
∂2 ∫ φn+1 − 2φn + φn−1
φ dV ≈ V
∂t2 V ∆t2
where φn−1 , φn , φn+1 denote the values of φ at the (n − 1)-th, n-th, (n + 1)-th steps of
time step ∆t. For the right hand side, by integrating Eq. (1) within a CV and applying
divergence theorem, we get
∫ ∫
c20 ∇2 φdV = c20 dS · ∇φ
V S
∑
≈ c20 S f · (∇φ)f (4)
f
where S f denotes the face area vector of the f-th face that constitutes polyhedral CV in
question as follows.
S f = Sf nf (5)
where Sf , nf are the area and the unit outward normal vector of the face f respectively.
If a vector connecting the centers of the CV P and its adjacent CV N, dP N , is parallel
to S f , S f (∇φ)f is written in terms of ∂φ/∂nf , the surface-normal gradient of φ. Thus the
term within the summation in the rightmost hand side of Eq. (4) is discretized as follows.
∂φ
S f · (∇φ)f = Sf
∂nf
φN − φP
≈ Sf (6)
|dPN |
However, if dP N is nonorthogonal to S f , S f has to be decomposed into its orthogonal part
∆f and nonorthogonal part kf .
The first term of the right hand side of the equation above, the orthogonal part, is
discretized similarly to Eq. (6) as follows.
φN − φP
∆f · (∇φ)f ≈ |∆f |
|dPN |
The nonorthogonal part, (∇φ)f in the second term, is given by interpolating the gradient
of φ at the centers of CVs P and N.
Here, the interpolation coefficient fx and the gradient (∇φ)P are given as follows.
fN
fx = ,
|dPN |
1 ∫
(∇φ)P = dS φ
V S
1 ∑
≈ Sφf
V f
Underrelaxed correction:
dPN · S f
∆f = dPN (8)
|dPN |2
Orthogonal correction:
dPN
∆f = Sf (9)
|dPN |
Overrelaxed correction:
dPN
∆f = S2 (10)
dPN · S f f
Jasak concludes overrelaxed correction to be the best correction technique as a result of
testing the techniques with solutions of the Laplacian equation under 10◦ –60◦ skewed two
dimensional quadrilateral meshes. However, typical skewnesses for tetrahedral meshes,
which most of meshing softwares support for three-dimensional geometries, typically fits
in a relatively small range of under 20◦ . Furthermore, behaviors for the wave equation is
not known. Hence the effectiveness of the techniques will be reinvestigated in the following
section.
ub = n b · u b = 0 (11)
Substituting the relationship above to Eqs. (3) and (5) leads to the equation below which
represents the surface normal gradient of φ being zero.
S b · (∇φ)b = 0
By reducing the equation above, we have a recurring formula with regard to the spatial
derivative.
¯n+1 ¯n
∂φ ¯¯ 2 φn+1 − φnP ∂φ ¯¯
¯ = − P
− ¯ (16)
∂nb ¯ cb ∆t ∂nb ¯
and then apply a predictor-corrector scheme [4] to the surface-normal direction to obtain
the surface gradient ∂φ/∂nb |n+1 .
Central differencing formulation (Type PC-C) First we calculate the predictor similarly to
the upwind formulation, Eq. (13),
¯n+1
∂φ ¯¯ 1 φn+1 − φnP
¯ = − P
∂nb ¯P cb ∆t
φnb in the equation above is calculated by the following equation (the same applies here-
after).
¯n
∂φ ¯¯
φnb = φnP + ¯ ∆n (18)
∂nb ¯
Second-order backward formulation (Type PC-B) Similarly to Eq. (14), we obtain a pre-
dictor
¯n+1
∂φ ¯¯ 3φn+1 − 4φnP + φPn−1
¯ = − P
,
∂nb ¯P 2cb ∆t
Central differencing formulation (Type A-C) By discretizing both sides of Eq. (12), we
obtain
φn+1 − φn+1 1 φn+1 − φnb
b P
= − b
.
∆n cb ∆t
( )
After approximating φn+1
b − φn+1
P /∆n to ∂φ/∂nb |n+1 , the equation above is reduced to
¯n+1
∂φ ¯¯ φnb + φn+1
P
¯ =
∂nb ¯ cb ∆t + ∆n
Case 1 The problem was solved using a conventional FDTD code written in Fortran
77 employing a pressure-particle velocity leapfrog scheme. The case is meant to be the
benchmark case to which the results obtained by the proposed technique is compared for
validation. Each edge of the cube was divided to 81 subedges to create a mesh of cell
width ∆x = 0.0123 m and the number of cells 531 441 (Fig. 3(b)). The time step ∆t and
the Courant number Co were set to 0.02 ms and 0.96 respectively.
Case 2 The problem was solved with the proposed technique under a hexahedral orthog-
onal mesh and setup both identical to the ones for Case 1.
Case 3 The problem was solved with the proposed technique under a nonuniform tetra-
hedral unstructured mesh automatically generated by an open-source mesher, Gmsh [6].
The characteristic length lc (the length with which each edge of the cube is divided) is set
to 0.025 m, to make a mesh with the number of CVs 531 333 (roughly the same as Cases
1 and 2). The ratio of maximum and minimum CV edge lengths of the generated mesh
was 6.32. The time step ∆t was set to 0.0049 ms to keep the maximum Courant number
to 0.99. In this case no nonorthogonal techniques were applied.
Cases 4, 5 and 6 The setups are same as Case 3, except that the underrelaxed, orthogonal
and overrelaxed nonorthogonal correction techniques were applied to Cases 4, 5 and 6
respectively.
Common Conditions For all cases the initial values of φ were set to represent the pressure
and particle velocity conditions of
cos 8πr + 1
(r < 0.125)
p−1/2 (r) = 2 [Pa] (20)
0 (otherwise)
u0 (r) = 0 (21)
where r [m] is the distance from the center of the cube. All cases were run up to t = 0.04s.
z
0.5
R4
O 0.2 0.3 R3
0.4 0.5 y
0.5
x
R2
Dimension in [m]
(a) Problem geometry (b) Surface (Hexahedral)
0.4
e) Cases 1, 6 Case 1 (FDTD)
Pressure [Pa]
techniques agrees so precisely that they can be regarded as virtually identical results.
From the results one can verify the proposed FVTD technique has the same accuracy as
a conventional FDTD under identical geometry, mesh and computational setups.
On the other hand, from the comparison of Cases 1 and 3 in Fig. 4(b), the waveform
obtained by the FVTD technique under the tetrahedral mesh is phasing forward in about
1.5 % and the overall waveform is gradually dispersing over time. In addition, the results of
Cases 4–6, which were meant to confirm the effects of the correction techniques to correct
the unwanted behavior observed in Case 3, are shown in Fig. 4(c)–(e) respectively. Despite
the employment of the correction techniques, the drifts of the phase did not improve, or
even worse, waveforms started to oscillate and diverge eventually. Although the starting
times of the oscillations become slightly later for relaxed cases, the overall characteristics
do not differ much.
From the results one can conclude that while one can expect identical results between
FDTD and FVTD techniques under identical setups, there remains works for the FVTD
technique in reducing the phase error coming from nonorthogonalities of unstructured
grids.
Table 2: Processor and memory usages.
Case 1 2 3 4
Processor [s] 28.0 343 865 2 013
Per time step [s] 0.0140 0.172 0.106 0.247
Memory [MB] 18 301 260 260
4.1.2 Results
Total acoustic energy levels in the tube over time were shown in Fig. 6. The for-
mulation that corresponds to each Type is defined in Section 2.4. Types U-C, PC-CN
and A-CN similarly show good attenuations after t = 0.01 s, when the absorption of
the wavefronts that reached the right end of the tube starts. On the other hand, Types
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Figure 6: Attenuation of total acoustic energy Figure 7: Attenuation of total acoustic energy
in the tube over time. in the square domain over time (∆t = 0.05
ms).
PC-C, PC-B, A-C and A-B only show smaller attenuation than the former three types.
Furthermore Types U-B and U-CN quickly diverged as soon as the wavefronts reached
the right end.
4.2.2 Results
Total acoustic energy in the field over time are plotted in Figs. 7 and 8 for ∆t = 0.05
ms and 0.1 ms respectively. When ∆t = 0.05 ms, the energies diverged for Types U-
CN, PC-B and PC-CN. It can be seen that types that employed higher order schemes in
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Type Type
Figure 8: Attenuation of total acoustic energy Figure 9: Attenuation of total acoustic energy
in the square domain over time (∆t = 0.1 ms). in the eighth of a sphere over time.
a given formulation type have a tendency of divergence, except for the algebraic types
which did not diverge (Types A-C, A-B, A-CN). On the contrary, when ∆t = 0.1 ms, all
types of the upwind type (Types U-C, U-B, U-CN) and Type PC-CN diverged. Again, no
divergence was observed for the algebraic type. Especially Type A-CN showed the best
attenuation of −35 dB at t = 0.04 s, and the variation between the results of ∆t = 0.05
ms and 0.1 ms was smallest among the all types.
Figure 11: Geometry of eighth-spherical computational domain.
4.3.2 Results
The results are shown in Fig. 9 as total energy attenuations in the sound fields
over time. All of the predictor-corrector types (Types PC-C, PC-B, PC-CN) and Type
U-CN resulted in divergence. In the remaining converged types, the algebraic types
showed better attenuations in 2–3 dB than the upwind types at t = 0.002 s where the
spherical wave reaches the spherical boundary surface. Within the algebraic types Type
A-C indicates slightly better attenuation in about 0.5 dB.
4.4 Discussion
Looking through all the tests under one-, two- and three- dimensional geometries,
in overall the algebraic types have good characteristics in that in most tests they show
good attenuation characteristics, and in that even in worst tests they do not diverge.
Further, of the three algebraic types, Type A-CN was among the best types in one- and
three-dimensional tests, and the unarguable best under two dimensional tests. Thus one
can conclude Type A-CN as the best performing formulation for the normal acoustic
impedance boundary condition.
5 CONCLUSIONS
To overcome several inherent shortcomings in the currently widely used FDTD-based
sound propagation technique, such as enforced usage of orthogonal meshes and lack of
general-purpose solver code, the authors presented a fully finite-volume time-domain
(FVTD) approach. The proposed FVTD technique, along with an acoustic impedance
boundary condition specifically developed for use with the technique, was formulated and
implemented on top of an open-source finite volume based toolkit, OpenFOAM. The im-
plementation was tested using solutions obtained by the FDTD technique as benchmarks.
Both techniques were confirmed to produce identical results under identical geometry,
mesh and computational conditions. The demanded processor times and memory us-
ages for FVTD calculations were more than ten times of FDTD calculations, which still
was thought to be allowable up to medium-sized problems with recent advancements
in processor performance taken into account. The boundary condition proved to show
good attenuations on one-, two- and three-dimensional meshes including an unstructured
mesh. The overall results obtained under full unstructured tetrahedral meshes, however,
showed numerical dispersions and diffusiveness, despite of nonorthogoanl corrections. The
nonorthogoanl correction problems indicated necessity of further works.
ACKNOWLEDGEMENTS
Parts of the work were supported by JSPS Grant-in-Aid for Scientific Research (A)
19206062, (B) 19360264 and by MEXT Grant-in-Aid for Young Scientists (B) 19760402.
REFERENCES
[1] Botteldooren, D. Acoustical finite-difference time-domain simulation in a quasi-
cartesian grid. J. Acoust. Soc. Am., Vol. 95, No. 5, pp. 2313–2319, 1994.5.
[2] Weller, H. G., Tabor, G., Jasak, H., and Fureby, C. A tensorial approach to computa-
tional continuum mechanics using object-oriented techniques. Computers in Physics,
Vol. 12, No. 6, pp. 620–631, December 1998.
[3] Jasak, H. Error analysis and estimation for the finite volume method with applications
to fluid flows. PhD thesis, Imperial College, June 1996.
[4] Ferziger, J. H. and Perić, M. Computational Methods for Fluid Dynamics. Springer-
Verlag (Berlin), 1996. (Japanese version).
[6] Geuzaine, C. and Remacle, J.-F. Gmsh: a three-dimensional finite element mesh gen-
erator with built-in pre- and post-processing facilities. http://www.geuz.org/gmsh/.
[7] Naito, Y., Yokota, T., Sakamoto, S., and Tachibana, H. The study of complete
absorption boundary for open region calculation by FDM. Proc. The 2000 autumn
meeting of the Acoustical Society of Japan, Vol. II, pp. 751–752, September 2000.