1 Introduction

Khokhlov–Zabolotskaya–Kuznetzov (KZK) equation is one of the most widely used models in medical ultrasound simulations. KZK equation can be regarded as a parabolic approximation of the more general Westervelt equation, and it describes the propagation of the sound beams in the homogeneous and thermoviscous (heatconducting) fluids. The advantage of the model is that it combines the effects of diffraction, absorption and nonlinearity. Even though the KZK equation is especially suitable for the far field of the paraxial region for moderately focused or unfocused transducers, its original and revised form has also been applied to more general ultrasound simulations.

Due to the broad applications of the KZK equation, many numerical methods have been developed. In 1984, Aanonsen et al. [1] developed numerical algorithms to solve the KZK equation in the frequency domain. In particular, the authors applied the Fourier expansions to the original equation, which leads to a coupled PDE system and they further solved the resulting system using finite difference method. Bakhvalov et al. [3] proposed a mixed-domain numerical method which solves the diffraction and absorption terms in the frequency domain, and computes the nonlinear term using the Godunov method in the time domain. Later, Lee and Hamilton [15] designed an operator-splitting finite difference method to solve the KZK equation entirely in the time domain; for each update along the direction of the wave propagation, they solved the diffraction term, absorption term and nonlinear term sequentially. In order to handle the oscillatons caused by the diffraction term, the authors employed the implicit backward finite difference method in the near field, and the Crank–Nicolson method in the far field. The stretched coordinates method [4] was used to deal with the nonlinear term of the equation. Many other algorithms including the work by Baker et al. [2], Yang et al. [23] and Hajihasani et al. [12] were then developed based on Lee and Hamilton’s framework to tackle more general situations. For example, Yang et al. and Hajihasani et al. consider the diffraction term in Cartesian coordinates. Since the diffraction term is the main challenging part in the numerical simulations, they provide different treatments in order to solve the equation accurately. Generally speaking, most of the numerical schemes of the KZK equation are based on either the spectral method or finite difference methods.

In this paper, we propose a local discontinuous Galerkin (LDG) method to solve the KZK equation. Discontinuous Galerkin (DG) methods, which use piecewise defined functions (typically polynomials) in each element, were initiated by Reed and Hill’s work [16] to solve the steady state linear hyperbolic equations. DG methods have drawn a great amount of attention since the pioneering works by Cockburn and Shu in a series of papers [5, 7,8,9]. In particular, the authors established a framework to solve nonlinear hyperbolic conservation laws by introducing total variation bounded nonlinear limiters [17] to capture the strong shocks. More details for the development of the DG methods can be referred to the review papers [6, 10]. The DG methods were then developed to solve convection-diffusion equations and partial differential equations with high order spatial derivatives. For instance, Yan et al. used the LDG method to solve a general Korteweg–de Vries (KdV) type equation in [21], and they further generalized the LDG method for equations with fourth and fifth order spatial derivatives in [22]. Later, Xu and Shu applied the LDG method to solve many other equations including the Kadomtsev–Petviashvili and Zakharov–Kuznetsov equations [19], and we refer to their review paper [20] for the latest development of the LDG method.

The reason we design a LDG method to solve the KZK equation is that the DG methods have many advantages. The DG methods can be easily formulated to be of arbitrary order of accuracy, and they are also suitable for adaptive simulations in both the p- and h-refinement, complicated geometry and parallel computing. Based on the aforementioned benefits, we propose a LDG method to solve the KZK equation in the time domain so that it is easy to deal with the non-local diffraction term and the diffusion term. To the best of our knowledge, this paper provides the first algorithm to the KZK equation that belongs to the finite element schemes.

One feature of the KZK equation is that the solutions are much more oscillatory in the near field compared to the solutions in the far field. Such property leads to different choices in terms of discretization within distinct regimes of the domain. That is, we use two different step sizes along the direction of the beam propagation (in the \(\sigma \) domain of Eq. (2.8)) for all the examples except for the accuracy test in Sect. 3.1.1. Another special treatment is that we multiply the KZK equation by the cylindrical radial variable (\(\rho \)) before we derive the weak formulation of the LDG scheme. That gives the provable \(L^2\) stability of our LDG scheme for the KZK equation in the cylindrical coordinates. For our numerical simulations, we mainly compare the performance of our numerical results with Lee’s results [14] for some benchmark examples. In general, the examples fall into the two categories, i.e., the cases for the focused and unfocused sources. We observe that our numerical results match well with Lee’s results for the unfocused case, and have better accuracy for the focused case.

The outline of our paper is as follows. In Sect. 2, we introduce two dimensionless forms of the KZK equation, propose LDG scheme for the KZK equation and present the stability analysis of the scheme. In Sect. 3, we perform some accuracy tests of our scheme on the KZK equation with only the diffraction term or with an extra source term. We also test our scheme for some classical numerical examples including the focused circular short tone burst excitation and the propagation of unfocused sound beams. By comparing our results to the benchmark solutions, we can show that under the same degrees of freedom, our scheme has better performance. We conclude this paper in Sect. 4.

2 Local Discontinuous Galerkin Discretization

2.1 Model Problem

The original form of the KZK equation for the axisymmetric sound pressure p in cylindrical coordinates is given by

$$\begin{aligned} \frac{\partial ^2p}{\partial z \partial t'} = \frac{c_0}{2}\left( \frac{\partial ^2p}{\partial r^2} + \frac{1}{r} \frac{\partial {p}}{\partial {r}} \right) + \frac{D}{2c_0^3}\frac{\partial ^3p}{\partial {t'^3}} +\frac{\beta }{2\rho _0c_0^3}\frac{\partial ^2p^2}{\partial t'^{2}}, \end{aligned}$$
(2.1)

Here (rz) represents the cylindrical coordinates with z denoting the axis of the beam which is the direction of propagation and r being the radial distance from the z axis. Another variable \(t'\) is the retarded time which could be negative. Other constant parameters \(c_0, D, \beta \) and \(\rho _0\) represent the sound speed, diffusivity of the sound in the thermoviscous fluid, nonlinearity parameter and the density of the fluid, respectively.

In this paper, we consider two dimensionless forms of the original KZK equation (2.1). In order to model the focused source, one can use the variable transformations \(p = p/p_0, \sigma = z/d, \rho = r/a, \tau = \omega _0 t'\) with \(p_0\) being the amplitude of the sound pressure for the source, d being the focal length of the source, a being the radius of the source and \(\omega _0\) being the frequency of the source, to obtain the following non-dimensional KZK equation

$$\begin{aligned} p_\sigma =\frac{1}{4G}\int _{-\infty }^{\tau }\frac{(\rho p_\rho )_\rho }{\rho } d\tau ' + Ap_{\tau \tau }+\frac{N}{2}(p^2)_{\tau }, \end{aligned}$$
(2.2)

where G, A and N are constants which satisfy \(G > 0\) and \(A, N \ge 0\). If we instead apply the following transformations \(p = (1+\sigma )p/p_0, \sigma = z/z_0, \rho = r/a/(1+\sigma ), \tau = \omega _0 t' - (r/a)^2/(1+\sigma )\) to (2.1), where \(z_0\) is the so-called Rayleigh distance, we can obtain the case for unfocused sources:

$$\begin{aligned} p_\sigma =\frac{1}{4(1+\sigma )^2}\int _{-\infty }^{\tau }\frac{(\rho p_\rho )_\rho }{\rho } d\tau ' + Ap_{\tau \tau }+\frac{N}{1+\sigma }(p^2)_{\tau }. \end{aligned}$$
(2.3)

The major difference of the two dimensionless forms is essentially how the relative range coordinate \(\sigma \) is defined. More details about these transformations can be referred to [14]. For both Eqs. (2.2) and (2.3), the terms on the right-hand side denote diffraction, absorption and nonlinearity, respectively.

The source condition for a weakly focused, axisymmetric beam can usually be defined by

$$\begin{aligned} p = p_0f(t+r^2/2c_0d)g(r), \quad \text {at } z = 0, \end{aligned}$$
(2.4)

where the function f is the temporal excitation and g(r) is the amplitude distribution. In the dimensionless coordinates, this source condition becomes:

$$\begin{aligned} p = f(\tau +G\rho ^2)g(\rho ), \quad \text {at } \sigma = 0. \end{aligned}$$
(2.5)

We define the temporal and spacial domain as \(0 = \rho _{min} \le \rho \le \rho _{max}\) and \(\tau _{min} \le \tau \le \tau _{max}\), and impose the following boundary conditions:

$$\begin{aligned}&p(\tau _{min}, \rho , \sigma ) = 0, \qquad p(\tau _{max}, \rho , \sigma ) = 0, \nonumber \\&p(\tau , \rho _{max}, \sigma ) = 0, \qquad p_\rho (\tau , \rho _{min}, \sigma ) = 0. \end{aligned}$$
(2.6)

The spatial domain must be large enough to minimize the error introduced by the inevitable reflection due to the artificial boundary conditions. The time domain must also be large enough to encompass both the axial wave and the delayed edge wave. Lee has a detailed discussion on how to select \(\rho _{max}\), \(\tau _{min}\) and \(\tau _{max}\) in his previous work [14]. Here, we present his result for the focused sources:

$$\begin{aligned} \rho _{max} = 4, \qquad \tau _{min} = -(G+\omega _0T_0+10\pi ), \qquad \tau _{max} = \omega _0T_0+20\pi , \end{aligned}$$
(2.7)

where \(T_0\) is the duration of the source excitation. We will specify the domain in each numerical example accordingly.

The equation for the focused case (2.2) will be used in the following subsections to derive our LDG method. Due to the setup of our problems, although \(\tau \) is the actual temporal variable, we follow the approach in [14], and regard \(\sigma \) as the “artificial” temporal direction, \(\rho \) and \(\tau \) as spatial variables when we solve the equations numerically.

2.2 Notations

We consider a two-dimensional rectangular domain \(\Omega \) and without loss of generality, we denote it by \([\tau _{min}, \tau _{max}]\times [\rho _{min}, \rho _{max}]\). We discretize the computational domain \(\Omega \) into rectangular cells \(K_{i,j}=I_i\times J_j\), where \(I_i=[\tau _{i-\frac{1}{2}},\tau _{i+\frac{1}{2}}]\), for \(i=1,\ldots , N_\tau \) and \(J_j=[\rho _{j-\frac{1}{2}},\rho _{j+\frac{1}{2}}]\), for \(j=1,\ldots ,N_\rho \). The coordinate for the center of the cell \(K_{i,j}\) is denoted by \((\tau _i,\rho _j) :=\left( (\tau _{i-\frac{1}{2}}+\tau _{i+\frac{1}{2}})/2,(\rho _{j-\frac{1}{2}}+\rho _{j+\frac{1}{2}})/2\right) \), and the mesh sizes in \(\tau \)- and \(\rho \)-direction are denoted by \(\Delta \tau _i=\tau _{i+\frac{1}{2}}-\tau _{i-\frac{1}{2}}\) and \(\Delta \rho _j=\rho _{j+\frac{1}{2}}-\rho _{j-\frac{1}{2}}\), respectively. We define the piecewise polynomial space as \(V_h^k=\{v : v|_{K_{i,j}} \in Q^k(I_i\times J_j), \forall K_{i,j} \}\), where \(Q^k\) is the space of tensor products of one-dimensional polynomials of degree up to k. Note that functions in \(V_h^k\) can be discontinuous across element boundaries. For any function \(p_h \in V^k_h\), \(p_h(\tau ^+_{i+1/2},\rho )\) and \(p_h(\tau ^-_{i+1/2},\rho )\) denote the limit values of \(p_h\) at \(\tau _{i+ \frac{1}{2}}\) from the right cell \(I_{i+1}\times J_j\) and from the left cell \(I_i\times J_j\), respectively. Similar definitions hold for \(p_h(\tau ,\rho ^+_{j+1/2})\) and \(p_h(\tau ,\rho ^-_{j+1/2})\).

2.3 LDG Method for the KZK Equation

In this subsection, we define the semi-discrete LDG method for the KZK equation (2.2). That is, we only discretize the domain of \(\rho \) and \(\tau \), and regard \(\sigma \) as the continuous time. The KZK equation is written into a first order system by substituting the first order derivatives \(p_\rho \), \(p_\tau \) and definite integral \(\int _{\tau _{min}}^\tau p_\rho d\tau \) with the auxiliary variables s, q, r, respectively:

$$\begin{aligned}&p_\sigma = \frac{1}{4G\rho }(\rho r)_\rho + Aq_\tau + \frac{N}{2}(p^2)_\tau , \end{aligned}$$
(2.8)
$$\begin{aligned}&s = p_\rho , \end{aligned}$$
(2.9)
$$\begin{aligned}&r = \partial ^{-1}_\tau s, \end{aligned}$$
(2.10)
$$\begin{aligned}&q = p_\tau , \end{aligned}$$
(2.11)

where

$$\begin{aligned} \partial ^{-1}_\tau s = \int _{\tau _{min}}^\tau s\ d\tau . \end{aligned}$$
(2.12)

Our scheme for (2.8)–(2.11) can be formulated as follows: we look for \(p_h\), \(s_h\), \(q_h\), \(r_h \in V_h^k\), such that

$$\begin{aligned} \frac{d}{d\sigma }\int _{K_{ij}}p_h\phi \rho d\rho d\tau= & {} \frac{1}{4G}\int _{I_i}(\widetilde{r_h}\phi ^-\rho (\tau ,\rho _{ j+\frac{1}{2}})- \widetilde{r_h}\phi ^+\rho (\tau ,\rho _{ j-\frac{1}{2}}) )d\tau - \frac{1}{4G}\int _{K_{ij}} r_h\phi _\rho \rho d\rho d\tau \nonumber \\&+\,A\int _{J_j}(\widehat{q_h}\phi ^-\rho (\tau _{i+\frac{1}{2}}, \rho ) - \widehat{q_h}\phi ^+\rho (\tau _{i-\frac{1}{2}}, \rho ))d\rho - A\int _{K_{ij}}q_h\phi _\tau \rho d\rho d\tau \nonumber \\&+\,\frac{N}{2}\int _{J_j}(\widehat{p_h^2}\phi ^-\rho (\tau _{i+\frac{1}{2}}, \rho ) - \widehat{p_h^2}\phi ^+\rho (\tau _{i-\frac{1}{2}}, \rho ))d\rho - \frac{N}{2}\int _{K_{ij}}p_h^2\phi _\tau \rho d\rho d\tau , \nonumber \\ \end{aligned}$$
(2.13)
$$\begin{aligned} \int _{K_{ij}}s_h\psi \rho d\rho d\tau= & {} \int _{I_i}(\widetilde{p_h}\psi ^-\rho (\tau ,\rho _{ j+\frac{1}{2}} )- \widetilde{p_h}\psi ^+\rho (\tau ,\rho _{ j-\frac{1}{2}}))d\tau \nonumber \\&- \int _{K_{ij}}p_h(\psi \rho )_\rho d\rho d\tau ,\end{aligned}$$
(2.14)
$$\begin{aligned} \int _{K_{ij}} r_h \varphi \rho d\rho d\tau= & {} \int _{K_{ij}} \partial _\tau ^{-1}s_h \varphi \rho d\rho d\tau ,\end{aligned}$$
(2.15)
$$\begin{aligned} \int _{K_{ij}}q_h \zeta \rho d\rho d\tau= & {} \int _{J_j}(\widehat{p_h}\zeta ^-\rho (\tau _{i+\frac{1}{2}}, \rho )- \widehat{p_h}\zeta ^+\rho (\tau _{i-\frac{1}{2}}, \rho )) d\rho \nonumber \\&- \int _{K_{ij}}p_h\zeta _\tau \rho d\rho d\tau , \end{aligned}$$
(2.16)

hold for all test functions \(\phi \), \(\psi \), \(\varphi \), \(\zeta \in V_h^k\). Note that we multiply the equations by \(\rho \) and then integrate them, since the problem is axisymmetric and \(\rho \) denotes the radial distance.

The terms, \(\widehat{p_h}\), \(\widehat{q_h}\), \(\widetilde{p_h}\), \(\widetilde{r_h}\) and \(\widehat{p^2_h}\) in (2.13)–(2.16) are the so-called numerical fluxes resulting from integration by parts. They must be designed carefully at the boundary and they are essential to ensure numerical stability. For the fluxes \(\widehat{p_h}\), \(\widehat{q_h}\), \(\widetilde{p_h}\) and \(\widetilde{r_h}\), we use the simple alternating fluxes,

$$\begin{aligned} \widehat{p_h} = p_h^+, \qquad \widehat{q_h} = q^-_h, \qquad \widetilde{p_h} = p_h^+,\qquad \widetilde{r_h} = r^-_h, \end{aligned}$$
(2.17)

where all quantities are computed at the same points (i.e., the cell interface). We remark that the choice of the fluxes (2.17) is not unique. We can, for example, alternatively choose the numerical fluxes to be

$$\begin{aligned} \widehat{p_h} = p_h^-, \qquad \widehat{q_h} = q^+_h, \qquad \widetilde{p_h} = p_h^-,\qquad \widetilde{r_h} = r^+_h. \end{aligned}$$
(2.18)

For the flux \(\widehat{p^2_h}\), we use the simple Lax–Friedrichs flux defined by

$$\begin{aligned} \widehat{p^2_h}(p_h^-, p_h^+) = \frac{1}{2}\left( (p_h^-)^2 + (p_h^+)^2 + \alpha (p_h^+ - p_h^-)\right) , \qquad \alpha = \text {max}|2p_h|, \end{aligned}$$
(2.19)

where the sign before \(\alpha \) is positive as the nonlinear term \(p^2\) appears on the right hand side of the equation.

The following are the details of implementation of our proposed LDG methods. The first non-trivial component comes from the non-local term \(\partial ^{-1}_{\tau }s_h\) in (2.15). As defined in (2.12), this term can be calculated exactly since \(s_h\) is now a piecewise polynomial in \(\tau \). The other issue comes from the integration in polar coordinate \(\rho \). The mass matrix now depends on the location of \(\rho \), and may be different in cell \(K_{ij}\) for different j. Therefore, we pre-calculate these mass matrices at the beginning, and use them in the update of each time step. In order to implement the boundary conditions, we apply the Neumann boundary condition at \(\rho _{min}\) and set

$$\begin{aligned} \widetilde{r_h}(\tau , \rho _{min}) = 0. \end{aligned}$$
(2.20)

At \(\rho _{max}\), \(\tau _{min}\), \(\tau _{max}\), when Dirichlet boundary conditions are applied, we set:

$$\begin{aligned} \widetilde{r_h}(\tau , \rho _{max})= & {} {r_h}^-(\tau , \rho _{max}),\quad \widetilde{p_h}(\tau , \rho _{max}) = p(\tau , \rho _{max}) = 0, \end{aligned}$$
(2.21)
$$\begin{aligned} \widehat{q_h}(\tau _{max}, \rho )= & {} {q_h}^-(\tau _{max}, \rho ),\quad \widehat{p_h}(\tau _{max}, \rho ) = p(\tau _{max}, \rho )=0, \end{aligned}$$
(2.22)

and

$$\begin{aligned} \widehat{q_h}(\tau _{min}, \rho ) = {q_h}^+(\tau _{min}, \rho ),\quad \widehat{p_h}(\tau _{min}, \rho ) = p(\tau _{min}, \rho )=0. \end{aligned}$$
(2.23)

Note that (2.23) indicates that the directions of \(\widehat{q_h}\) and \(\widehat{p_h}\) are flipped at the left boundary \(\tau _{min}\).

Applying the semi-discrete LDG scheme (2.13)–(2.16) to the KZK equation, we end up with an ordinary differential equation system which can be written as

$$\begin{aligned} u_\sigma = L(u), \end{aligned}$$
(2.24)

where L(u) is the discretization of the operators on the right hand side of KZK equation. To update u, we choose a class of high order total variation diminishing (TVD) Runge–Kutta (RK) type methods developed by Shu and Osher [18]. In particular, we consider the following second-order TVD Runge–Kutta method:

$$\begin{aligned} u^{n,1}= & {} u^n + \Delta \sigma _n L(u^n), \\ u^{n+1}= & {} \frac{1}{2} u^n + \frac{1}{2} u^{n,1} + \frac{1}{2} \Delta \sigma _n L(u^{n,1}), \end{aligned}$$

to update the numerical solution from \(\sigma _n\) to \(\sigma _{n+1}\), with \(\sigma _n=\sigma _{n+1}-\sigma _n\).

2.4 \(L^2\) Stability

In this subsection, we first show that the quantity \(\int _\Omega \rho p^2d\rho d\tau \), the \(L^2\) norm of p in the cylindrical coordinate, is a non-increasing function in the \(\sigma \)-direction for the exact solution of the KZK equation. Again, the extra \(\rho \) is included in the definition of \(L^2\) norm, as the problem is axisymmetric and \(\rho \) denotes the radial distance. Then we prove that \(\int _\Omega \rho p_h^2d\rho d\tau \) of the numerical solution \(p_h\) is also non-increasing. This property indicates that our numerical scheme is stable.

Proposition 1

The solution to the KZK equation (2.2) along with boundary conditions (2.6) satisfies:

$$\begin{aligned} \frac{d}{d\sigma } \int _\Omega \rho p^2 d\rho d\tau \le 0. \end{aligned}$$
(2.25)

Proof

We multiply the Eq. (2.2) by \(\rho p\), integrate over the domain to obtain

$$\begin{aligned} \frac{1}{2}\frac{d}{d\sigma }\int _\Omega p^2 \rho d\rho d\tau&= \int _\Omega p \frac{1}{4G\rho }\partial ^{-1}_{\tau } (\rho p_\rho )_\rho \rho d\rho d\tau \\&\quad +\int _\Omega pAp_{\tau \tau } \rho d\rho d\tau +\int _\Omega p\frac{N}{2}(p^2)_{\tau } \rho d\rho d\tau \\&=\frac{1}{4G}\int _{\tau _{min}}^{\tau _{max}}p\partial ^{-1}_\tau (\rho p_\rho )|_{\rho _{min}}^{\rho _{max}} d\tau -\frac{1}{8G} \int _\Omega ((\partial ^{-1}_\tau p_\rho )^2)_\tau \rho d\rho d\tau \\&\quad +A\int _{\rho _{min}}^{\rho _{max}}pp_\tau \rho |_{\tau _{min}}^{\tau _{max}}d\rho - A\int _\Omega (p_{\tau })^2\rho d\rho d\tau +\frac{ N}{3}\int _\Omega (p^3)_{\tau }\rho d\rho d\tau \\&=-\frac{1}{8G} \int _\Omega ((\partial ^{-1}_\tau p_\rho )^2)_\tau \rho d\rho d\tau - A\int _\Omega (p_{\tau })^2\rho d\rho d\tau \\&= -\frac{1}{8G} \int _{\rho _{min}}^{\rho _{max}} \left( \int _{\tau _{min}}^{\tau _{max}} p_{\rho } \, d\tau \right) ^2 \, \rho d\rho - A\int _\Omega (p_{\tau })^2\rho d\rho d\tau \\&\le 0, \end{aligned}$$

where the boundary conditions \(p_\rho (\tau , \rho _{min}, \sigma ) = 0\), \(p(\tau , \rho _{max}, \sigma ) = 0\), \(p(\tau _{min}, \rho , \sigma ) = 0\) and \(p(\tau _{max}, \rho , \sigma ) = 0\) are used. \(\square \)

We then show that the proposed semi-discrete LDG method will result in a numerical solution with similar property, that is, the scheme is \(L^2\)-stable.

Proposition 2

(cell entropy inequality) There exist numerical entropy fluxes \(H_{i, j+\frac{1}{2}}\), \(I_{i+\frac{1}{2}, j}\) and \(J_{i+\frac{1}{2}, j}\) such that the solution to the scheme (2.13)–(2.16) satisfies:

$$\begin{aligned} \int _{K_{ij}} (p_h)_\sigma p_h\rho d\rho d\tau+ & {} \left( H_{i, j+\frac{1}{2}} - H_{i, j-\frac{1}{2}}\right) +\left( J_{i+\frac{1}{2}, j} - J_{i-\frac{1}{2}, j}\right) +\left( I_{i+\frac{1}{2}, j} - I_{i-\frac{1}{2}, j}\right) \nonumber \\+ & {} \frac{1}{4G}\int _{K_{ij}}\frac{1}{2}(\partial ^{-1}_\tau s_h)^2_\tau \rho d\rho d\tau \le 0. \end{aligned}$$
(2.26)

Proof

Taking the test functions \(\phi = p_h\), \(\psi = r_h\), \(\varphi = -s_h\), \(\zeta = q_h\) in Eqs. (2.13)–(2.16), we have:

$$\begin{aligned} \int _{K_{ij}}(p_h)_\sigma p_h\rho d\rho d\tau&= \frac{1}{4G}\int _{I_i} \widetilde{r_h}p_h^- \rho (\tau ,\rho _{ j+\frac{1}{2}}) - \widetilde{r_h}p_h^+\rho (\tau ,\rho _{ j-\frac{1}{2}} )d\tau - \frac{1}{4G}\int _{K_{ij}} r_h(p_h)_\rho \rho d\rho d\tau \nonumber \\&\quad +A\int _{J_j}\widehat{q_h}p_h^-\rho (\tau _{i+\frac{1}{2}}, \rho ) - \widehat{q_h}p_h^+\rho (\tau _{i-\frac{1}{2}}, \rho )d\rho - A\int _{K_{ij}}q_h(p_h)_\tau \rho d\rho \tau \nonumber \\&\quad +\frac{N}{2}\int _{J_j}\widehat{p_h^2}p_h^-\rho (\tau _{i+\frac{1}{2}}, \rho ) - \widehat{p_h^2}p_h^+\rho (\tau _{i-\frac{1}{2}}, \rho )d\rho - \frac{N}{2}\int _{K_{ij}}p_h^2(p_h)_\tau \rho d\rho d\tau , \end{aligned}$$
(2.27)
$$\begin{aligned} \int _{K_{ij}}s_hr_h\rho d\rho d\tau&= \int _{I_i}\widetilde{p_h}r_h^-\rho (\tau ,\rho _{ j+\frac{1}{2}} )- \widetilde{p_h}r_h^+\rho (\tau ,\rho _{ j-\frac{1}{2}} )d\tau - \int _{K_{ij}}p_h(r_h \rho )_\rho d\rho d\tau , \end{aligned}$$
(2.28)
$$\begin{aligned} -\int _{K_{ij}} r_h s_h \rho d\rho d\tau&= -\int _{K_{ij}} \partial _\tau ^{-1}s_hs_h \rho d\rho d\tau , \end{aligned}$$
(2.29)
$$\begin{aligned} \int _{K_{ij}}q_h q_h \rho d\rho d\tau&= \int _{J_j}\widehat{p_h}q_h^-\rho (\tau _{i+\frac{1}{2}}, \rho ) - \widehat{p_h}q_h^+\rho (\tau _{i-\frac{1}{2}}, \rho ) d\rho - \int _{K_{ij}}p_h(q_h)_\tau \rho d\rho d\tau . \end{aligned}$$
(2.30)

We choose the alternating flux (2.17) along with (2.20)–(2.23), multiply Eqs. (2.28) and (2.29) by 1 / (4G), multiply Eq. (2.30) by A, and sum them up with (2.27). After some algebraic manipulations, we have:

$$\begin{aligned} \begin{aligned}&\int _{K_{ij}} \left( p_h\right) _\sigma p_h\rho d\rho d\tau + A\int _{K_{ij}} q_h^2 \rho d\rho d\tau +\frac{1}{4G}\int _{K_{ij}}\frac{1}{2}\left( \partial ^{-1}_\tau s_h\right) ^2_\tau \rho d\rho d\tau \\&\quad +\left( H_{i, j+\frac{1}{2}} - H_{i, j-\frac{1}{2}}\right) +\left( J_{i+\frac{1}{2}, j} - J_{i-\frac{1}{2}, j}\right) +\left( I_{i+\frac{1}{2}, j} - I_{i-\frac{1}{2}, j}\right) + \Theta _{i-\frac{1}{2}, j}=0, \end{aligned} \end{aligned}$$
(2.31)

where the entropy fluxes are:

$$\begin{aligned} H_{i, j+\frac{1}{2}}&= -\frac{1}{4G}\int _{I_i}r_h^-p_h^+\rho (\tau ,\rho _{ j+\frac{1}{2}}) d\tau , \\ J_{i+\frac{1}{2}, j}&= -A\int _{J_j} q_h^-p_h^+\rho (\tau _{i+\frac{1}{2}},\rho ) d\rho ,\\ I_{i+\frac{1}{2}, j}&=\frac{-N}{2} \int _{J_j}\int ^{p_h^-(\tau _{i+\frac{1}{2}}, \rho )}\left( \widehat{p_h^2} - p_h^2\right) dp_h \rho d\rho , \end{aligned}$$

with the exception at the boundaries:

$$\begin{aligned} H_{i, \frac{1}{2}}&= -\frac{1}{4G}\int _{I_i}r_h^-p_h^+\rho (\tau ,\rho _{\frac{1}{2}}) d\tau , \\ J_{\frac{1}{2}, j}&= -A\int _{J_j} q_h^+ p_h^-\rho (\tau _{\frac{1}{2}},\rho ) d\rho , \end{aligned}$$

and the extra \(\Theta _{i-\frac{1}{2}, j}\) term is defined by

$$\begin{aligned} \Theta _{i-\frac{1}{2}, j} = \frac{N}{2}\int _{J_j}\int _{p_h^-(\tau _{i-\frac{1}{2}}, \rho )}^{p_h^+(\tau _{i-\frac{1}{2}}, \rho )} \left( \widehat{p_h^2} - p_h^2\right) dp_h\rho d\rho . \end{aligned}$$

By the monotonicity of \(\widehat{-p_h^2}\), we have

$$\begin{aligned} \Theta \ge 0. \end{aligned}$$

Notice also that

$$\begin{aligned} A\int _{K_{ij}} q_h^2 \rho d\rho d\tau \ge 0. \end{aligned}$$

Therefore, we can derive (2.26) and complete the proof. \(\square \)

The \(L^2\) stability of the numerical method is a corollary as follows.

Proposition 3

The numerical solution to the scheme (2.13)–(2.16) satisfies:

$$\begin{aligned} \frac{d}{d\sigma } \int _\Omega \rho p_h^2 d\rho d\tau \le 0. \end{aligned}$$
(2.32)

Proof

We sum up (2.26) over i and j and obtain

$$\begin{aligned}&\int _\Omega \left( p_h\right) _\sigma p_h\rho d\rho d\tau + \sum _{i = 1}^{N_{\tau }}\left( H_{i, N_{\rho }+\frac{1}{2}} - H_{i, \frac{1}{2}}\right) +\sum _{j = 1}^{N_{\rho }}\left( J_{N_{\tau }+\frac{1}{2}, j} - J_{\frac{1}{2}, j}\right) \\&\quad +\sum _{j = 1}^{N_{\tau }}\left( I_{N_{\tau }+\frac{1}{2}, j} - I_{\frac{1}{2}, j}\right) + \frac{1}{4G}\int _{\Omega }\frac{1}{2}\left( \partial ^{-1}_\tau s_h\right) ^2_\tau \rho d\rho d\tau \le 0. \end{aligned}$$

Following the definition of fluxes at the boundary (2.20)–(2.23), we can obtain

$$\begin{aligned} H_{i, N_{\rho }+\frac{1}{2}} = H_{i, \frac{1}{2}} = J_{N_{\tau }+\frac{1}{2}, j} = J_{\frac{1}{2}, j} = 0. \end{aligned}$$

We also have

$$\begin{aligned} I_{N_\tau +\frac{1}{2}, j}&= -\frac{N}{2} \int ^{p_h^-\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } \left( \widehat{p_h^2}-p_h^2\right) dp_h\\&= -\frac{N}{2} \int ^{p_h^+\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } \left( \widehat{p_h^2}-p_h^2\right) dp_h+\frac{N}{2} \int ^{p_h^+\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } _{p_h^-\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } \left( \widehat{p_h^2}-p_h^2\right) dp_h\\&= 0 +\frac{N}{2} \int ^{p_h^+\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } _{p_h^-\left( \tau _{N_{\tau }+\frac{1}{2}}\right) } \left( \widehat{p_h^2}-p_h^2\right) dp_h\\&\ge 0, \end{aligned}$$

\(I_{\frac{1}{2}, j} = 0\), and

$$\begin{aligned} \frac{1}{4G}\int _{\Omega }\frac{1}{2}(\partial ^{-1}_\tau s_h)^2_\tau \rho d\rho d\tau = \frac{1}{4G}\int _{\rho _{min}}^{\rho _{max}} \frac{1}{2} \left( \int _{\tau _{min}}^{\tau _{max}} s_h \, d\tau \right) ^2 \rho d\rho \ge 0. \end{aligned}$$

Finally we can obtain

$$\begin{aligned} \frac{d}{d\sigma } \int _\Omega \rho p_h^2d\rho d\tau \le 0. \end{aligned}$$

\(\square \)

Remark 1

In the case when the boundary conditions (2.6) are changed to periodic boundary conditions, the stability inequalities (2.25), (2.26) and (2.32) still hold.

3 Numerical Experiments

In this section, we implement the previously described LDG algorithm together with an explicit second order TVD Runge–Kutta integration. We will show the accuracy tests to verify the rate of convergence, and also examine the performance of our scheme on the KZK equation with the diffraction term only, for which exact solutions exist. Full KZK equation will be simulated and the performance of our LDG methods will also be compared with the results of the finite difference methods in Lee [14]. Here let us briefly summarize Lee’s method first. Lee used central difference method to approximate the spatial derivatives and trapezoidal rule to approximate the integral. In the near field along the propagation of the wave, he used implicit backward Euler method to update the solution, and used Crank–Nicolson method in the far-field.

3.1 Example 1: KZK Equation with the Diffraction Term Only

3.1.1 Accuracy Test

We start by considering the KZK equation with the diffraction term only, which contains both the derivative and integral. In this example, we perform a convergence test to check the accuracy of our algorithm. By manufacturing an exact solution, we can construct a source term to be added to the equation. The equation, after we add an extra term \(h(\tau ,\rho ,\sigma )\), becomes:

$$\begin{aligned} p_\sigma =\frac{1}{4G\rho }\int _{\tau _{min}}^{\tau }(\rho p_\rho )_\rho d\tau +h(\tau ,\rho ,\sigma ), \quad \pi \le \rho \le 3\pi ,\quad 0\le \tau \le 2\pi , \end{aligned}$$
(3.1)

where

$$\begin{aligned} h(\tau , \rho , \sigma ) \!=\! e^{-\sigma }\left( -\sin (\tau +\rho ) \!-\!\frac{1}{4G\rho }(\sin (\tau +\rho ) - \sin (\rho ) +\rho (\cos (\tau +\rho )\! -\! \cos (\rho )))\right) . \end{aligned}$$

We assume the periodic boundary conditions for \(\tau \) and \(\rho \):

$$\begin{aligned} p(\tau , \pi , \sigma ) = p(\tau , 3\pi , \sigma ), \qquad p(0, \rho , \sigma ) = p(2\pi , \rho , \sigma ), \end{aligned}$$
(3.2)

and source condition at \(\sigma =0\):

$$\begin{aligned} p(\tau , \rho , 0) = \sin (\tau +\rho ). \end{aligned}$$
(3.3)

Therefore, this problem has the exact solution of the form

$$\begin{aligned} p(\tau , \rho , \sigma ) = e^{-\sigma }\sin (\tau +\rho ). \end{aligned}$$
(3.4)

In the simulation, we use the following parameters:

$$\begin{aligned} \sigma _{end} = 0.01, \quad \Delta \sigma = 4 \times 10^{-3}, \end{aligned}$$
(3.5)

where \(\sigma _{end}\) is the final stopping point and \(\Delta \sigma \) is the initial step size for the case \(N = 20\), and we choose \(G=0.25\). The mesh size is halved when we double N. We perform the accuracy test for both \(Q^0\) and \(Q^1\) spaces. The first order accuracy for \(Q^0\) space and second order accuracy for \(Q^1\) space are expected. Error Tables 1 and 2 clearly show that the expected accuracy are achieved for the unknown \(p_h\) in both cases. We observed that the convergence rate of \(s_h\) is 1.5 for \(Q^1\) space for the equation with the diffraction term only. Various numerical experiments show that, if the diffusion term \(p_{\tau \tau }\) is included, the convergence rate of \(s_h\) will improve, which can also be seen in Table 4.

Table 1 Example 1 with \(Q^0\) space: numerical errors and orders with uniform meshes
Table 2 Example 1 with \(Q^1\) space: numerical errors and orders with uniform meshes

3.1.2 Linear Lossless KZK Equation

Next, let’s consider the linear lossless KZK equation, which contains only the diffraction term, with a focused circular source of uniform amplitude distributions, where the exact solution in the axial wave forms exists. Consider a Gaussian modulated sinusoid source wave form with radius a in (2.4) by specifying f and g:

$$\begin{aligned} f(t) = \exp \left[ -\left( \frac{\omega _0t}{3}\right) ^2\right] \sin (\omega _0t), \end{aligned}$$
(3.6)

and

$$\begin{aligned} g(r) = \left\{ \begin{array}{ll} 1, &{}\quad r \le a,\\ 0, &{}\quad r \ge a. \end{array}\right. \end{aligned}$$
(3.7)

In dimensionless parameters, this source condition becomes

$$\begin{aligned} p(\tau ,\rho ,0) = \left\{ \begin{array}{ll} \displaystyle \exp \left[ -\left( \frac{\tau +G\rho ^2}{3}\right) ^2\right] \sin \left( \tau +G\rho ^2\right) , &{}\quad \rho \le 1,\\ \displaystyle 0, &{}\quad \rho \ge 1. \end{array}\right. \end{aligned}$$

The boundary condition (2.6) is used.

As shown in [11, 13], the exact axial solution (at \(\rho = 0\)) takes the form of

$$\begin{aligned} p(\tau ,\rho= & {} 0,\sigma ) = \frac{1}{1-\sigma }\left( \exp \left( - \left( \frac{\tau }{3}\right) ^2 \right) \sin (\tau ) -\exp \left( -\frac{1}{9}\left( \tau +G-\frac{G}{\sigma }\right) ^2\right) \right. \\&\qquad \qquad \quad \left. \sin \left( \tau +G-\frac{G}{\sigma }\right) \right) . \end{aligned}$$

In our simulation, we used the following parameters:

$$\begin{aligned}&G = 10, \quad \tau _{min} = -10\pi , \quad \tau _{max} = 24\pi , \quad \Delta \tau = 0.1, \\&\rho _{max} = 4, \quad \Delta \rho = 0.01, \quad \Delta \sigma _1 = 5\times 10^{-5}, \quad \Delta \sigma _2 = 2\times 10^{-4}, \end{aligned}$$

where \(\Delta \sigma _1\) is used for \(\sigma \le 0.1\), and \(\Delta \sigma _2\) is used for \(\sigma > 0.1\). In the far-field when \(\sigma >0.1\), the pressure p usually varies smoothly, which allows us to choose a larger step size.

We compare the performance of our LDG method with Lee’s algorithm. For fair comparison, when we use LDG method with \(Q^1\) space, we choose the spatial mesh that is two times less dense than Lee’s to ensure that both algorithms have the same degree of freedom. For LDG method with \(Q^0\) space, we use the same spatial mesh size as in Lee’s method. The time evolution plots from different schemes are overlaid and compared with the exact solution in Fig. 1.

Fig. 1
figure 1

Comparison of LDG, Lee’s method and exact solution for axial wave forms for a focused uniform piston source with a Gaussian modulated pulse, at \(\sigma =0.1,0.2,0.3,0.5,0.7,2\)

Some oscillations can be seen when \(\sigma \) is small, which are caused by the discontinuity in the source condition. At \(\sigma = 0.2\), LDG method in both \(Q^0\) and \(Q^1\) space produces oscillated waves coming from the right. Notice here the horizontal axis represents the dimensionless retarded time. Note that Lee’s algorithm has no visible oscillated waves on the right since it used the implicit backward temporal method which is effective in suppressing oscillations. The visual effect that two major waves traveling closer as \(\sigma \) becomes greater agrees with the fact that the difference of the arrival time of the axial wave and edge wave diminishes in the far-field. If we concentrate on the magnitude of the edge wave spike (the right spike for \(\sigma =0.2, 0.3, 0.5\)), we can observe that the LDG scheme in \(Q^1\) space resulted in a much better approximation, while the result from Lee’s method only becomes comparable when \(\sigma \ge 0.5\). A zoomed-in view at the pressure at \(\sigma = 2\) is shown in Fig. 2, where we can observe that the difference between results of LDG with \(Q^1\) space and the exact solution is almost indistinguishable at the exhibited measure, while discrepancy is more obvious between the exact solution and LDG scheme with \(Q^0\) space and Lee’s finite difference method.

Fig. 2
figure 2

Zoomed-in plot for Fig. 1 at \(\sigma =2\)

3.2 Example 2: Accuracy Test for the Full KZK Equation

Next, we consider the full KZK equation with all three terms on the right hand side. To check the accuracy of the proposed methods, we again manufacture an exact solution, and, as a result, add an extra source term to the KZK equation. We consider the following equation:

$$\begin{aligned}&p_\sigma =\frac{1}{4G\rho }\int _{\tau _{min}}^{\tau }(\rho p_\rho )_\rho d\tau \!+\! Ap_{\tau \tau }+\frac{N}{2}(p^2)_{\tau } \!+\!h(\tau , \rho , \sigma ),&\pi \le \rho \le 3\pi ,\quad 0 \le \tau \le 2\pi , \end{aligned}$$
(3.8)

where the extra source term is given by

(3.9)

We again assume the periodic boundary conditions as in (3.2), and the source conditions in (3.3). This problem has the same exact solution as in (3.4).

The parameters in (3.5) are also used here. The error tables are displayed in Tables 3 and 4, where we obtain the first order accuracy with \(Q^0\) space and second order accuracy with \(Q^1\) space as expected.

Table 3 Example 2 with \(Q^0\) space: numerical errors and orders with uniform meshes
Table 4 Example 2 with \(Q^1\) space: numerical errors and orders with uniform meshes
Fig. 3
figure 3

Comparison of axial wave forms of KZK equation with focused source simulations from Lee’s algorithm and LDG method with \(Q^1\) space

3.3 KZK Equation with Focused Source

In this example, we investigate the propagation of a non-linear ultrasound beam generated by a focused circular short tone bursts (pulses with only a few cycles). Consider the wave form (2.5) with f(t) given by

$$\begin{aligned} f(t) = \exp \left[ -\left( \frac{\omega _0t}{3\pi }\right) ^2\right] \sin (\omega _0t). \end{aligned}$$
(3.10)

and g(r) defined in (3.7). Written with respect to the dimensionless parameters, the source form becomes

$$\begin{aligned} p(\tau ,\rho ,0) = \exp \left[ -\left( \frac{\tau +G\rho ^2}{3\pi }\right) ^2\right] \sin (\tau +G\rho ^2). \end{aligned}$$

We impose the boundary condition (2.6). The parameters used in this example are

$$\begin{aligned}&A = 0.1, \quad N = 1,\quad G = 5, \\&\rho _{max} = 4, \quad \tau _{min} = -15\pi , \quad \tau _{max} = 23\pi , \\&\Delta \rho = 0.02, \quad \Delta \tau = 0.1, \quad \Delta \sigma = 5\times 10^{-5}. \end{aligned}$$

These settings are in accordance with the original setting in (2.7) from [14]. Again, we use a mesh size that is half of that in the simulation of finite difference algorithm, in order to provide a fair comparison with Lee’s results.

In Fig. 3, it can be observed that at \(\sigma = 0.1\), both the solutions of LDG and Lee’s method have a wave coming from the right boundary. That is similar to the propagation of the edge wave. However, the solution of the finite difference algorithm has much smaller magnitude for such wave than that of our LDG method. As the wave propagates, the central wave and the edge wave merge. The maximal positive pressure appeared at \(\sigma = 0.7\) in Lee’s solution, while with LDG method, this appears at \(\sigma = 0.8\). The solutions of the LDG scheme and the finite difference scheme agree relatively well afterwards. We can clearly observe from Fig. 3 that the major difference between the two solutions occurs at \(\sigma =0.1\). In order to determine which one is more accurate, we refine the mesh for these two methods and compare the solutions. As we decrease \(\Delta \rho \), \(\Delta \tau \) and \(\Delta \sigma \), the magnitude of the edge wave for both methods increases. When the mesh size is small enough, the two solutions eventually approach each other. Figure 4 shows the solution by our LDG method with \(\Delta \rho = 0.01\), \(\Delta \tau = 0.05\) and \(\Delta \sigma = 3 \times 10^{-5}\), which is about half the size of the parameters in Fig. 3. In contrast, for the Lee’s method, we have to use three times finer mesh size than that of LDG method to achieve similar solution. Such observations indicate that our LDG method is more efficient than Lee’s method for this numerical example. In Fig. 5, we display the three-dimensional view of waveforms at different \(\sigma \).

Fig. 4
figure 4

Comparison of axial wave forms of KZK equation with focused sources simulations at \(\sigma =0.1\) using refined mesh. \(\Delta \rho = 0.01\), \(\Delta \tau = 0.05\), \(\Delta \sigma = 3 \times 10^{-5}\) are used for LDG method. \(\Delta \rho = 0.01/3\), \(\Delta \tau = 0.05/3\), \(\Delta \sigma = 1 \times 10^{-5}\) are used for Lee’s method

Fig. 5
figure 5

Three-dimensional plot of the evolution of a focused piston source

Fig. 6
figure 6

Comparison of axial wave forms of KZK equation with unfocused source simulations from Lee’s algorithm and LDG method with \(Q^1\) space

Fig. 7
figure 7

Comparison of wave forms of KZK equation with unfocused source simulations from Lee’s algorithm and LDG method with \(Q^1\) space when \(\sigma = 9\)

Fig. 8
figure 8

Comparison of wave forms of KZK equation with unfocused source simulations from Lee’s algorithm and LDG method with \(Q^1\) space when \(\sigma = 13\)

3.4 Unfocused Pulsed Sound Beams

In this last example, we investigate the propagation of unfocused, pulsed, finite amplitude sound beams in the thermoviscous fluids. The LDG algorithm can deal with any axisymmetric sound sources, that is, the amplitude distribution g(r) in the source condition can be arbitrary under the constraints imposed by the parabolic approximation. For simplicity, here we consider the source with a uniform amplitude evolution.

The equation for the unfocused source is given by (2.8). The algorithm (2.13)–(2.16) can be applied with a slight modification on the coefficients. We use the step and mesh sizes suggested by Lee [14]. The source waveforms defined in (2.5) and (3.7) are considered in this example. Written with respect to the dimensionless parameters after the variable transformation, the source becomes:

$$\begin{aligned} p(\tau ,\rho ,0) =\left\{ \begin{aligned}&\exp \left( -\left( \frac{(\tau +\rho ^2)}{3\pi }\right) ^2\right) \sin \left( \tau +\rho ^2\right) ,&\quad \rho < 1,\\&0,&\quad \rho \ge 1. \end{aligned}\right. \end{aligned}$$
(3.11)

We use (2.6) as the boundary conditions. The following parameters are used in this example:

$$\begin{aligned}&A = 1, \quad N = 1, \\&\rho _{max} = 8, \quad \tau _{min} = -13\pi , \quad \tau _{max} = 23\pi , \\&\Delta \rho = 0.03, \quad \Delta \tau = 0.2, \quad \Delta \sigma = 5\times 10^{-5}. \end{aligned}$$

The comparison of the results of LDG methods and Lee’s finite difference algorithm is shown in Figs. 6, 7, and 8. We can observe that these two methods provide similar results both on and off axis.

4 Concluding Remarks

In this paper, a LDG method was proposed for solving the KZK equation, which is widely used in medical ultrasound simulations. \(L^2\) stability analysis of our LDG method has been provided. Because the solutions of the KZK equation have stronger oscillations in the near field (with relatively small \(\sigma \)) than in the far field (with large \(\sigma \)), we choose smaller step size for \(\sigma \le 0.1\) and larger step size elsewhere in our simulations. Such choice is good to capture the correct magnitude of the oscillations and keep the simulations efficient. In the future, time integrator such as implicit temporal method will be implemented to further accelerate the calculation. Based on our numerical results, we observe that our scheme provides more accurate results for the case of a focused uniform piston source with a Gaussian modulated pulse, when compared with the solution by an existing finite difference approach. For the unfocused pulsed sound beams, our numerical solutions match well with the benchmark solutions. These numerical results indicate that our LDG scheme has great potential in various applications of the KZK equation.