In previous post, the wave equation in 2D, with PML for absorption boundary condition. The system is augmented to 4 unknown variables. And in 3D case, regardless of possible issues from PML, the system should involve more unknowns for additional dimension, however, it is actually more than that. It will bring an term, representing an temporal integral.

By Laplace transform (or Fourier transform) to frequency domain, the equation is simply as ( is complex)

By changing coordinate for each axis (e.g. ),

we will arrive at a new system

where are auxiliary functions, inverting to , we put the equation back to time domain,

where and . , , .

There are 6 unknowns to solve : . The system’s initial condition is from wave equation, additional variables are initialized as zero.

can be solved with various numerical methods, is a second order operator in spatial variables, thus we can use FDM, FEM, pseudo-spectral.

Pseudo-spectral is slower in complexity, but it will involve less points, since it is more accurate on the derivatives. The system needs evaluation on respectively, which requires fft for 5 times on and ifft for 8 times, each fft/ifft in theory needs in 3D, thus total flops are flops, for a grid as large as 200x200x200, the total flops will be 7E10 or so. On a single core machine at effective frequency 2.0GHz, the time will be 30s for one evaluation! For multi-core (say quad-core) platform, it will require (maybe) 10s for one run, 1000 time-steps with forward Euler will be about 3h, multi-step methods like RK2, RK3, RK4, the time will be much longer.

If precision is not important, using single precision will cut the timing in half.