1 Introduction

The modeling of nonlinear effects arising in the presence of high intensity acoustic fields is one of the central subjects of nonlinear acoustics [11]. One widely used model in this area is the Westervelt equation [13, 20] which in dimensionless form can be written as

$$\displaystyle \begin{aligned} \partial_{tt} \psi - \Delta \psi = \alpha \Delta (\partial_t \psi) + \beta \partial_t (\partial_t \psi)^2. \end{aligned} $$
(1)

The two terms on the right hand side, scaled with constants α, β ≥ 0, account for viscous and nonlinear effects of the medium and constitute the deviations from the standard linear wave equation. Equation (1) is written here in terms of the velocity potential ψ which is related to the acoustic velocity and pressure variations by

$$\displaystyle \begin{aligned} v = -\nabla \psi \qquad \text{and} \qquad p = \partial_t \psi. \end{aligned} $$
(2)

Similar to the linear wave equation, the Westervelt equation also encodes the principle of energy conservation. Using (2), the dimensionless acoustic energy contained in a bounded domain Ω can be expressed in terms of the velocity potential by

$$\displaystyle \begin{aligned} \mathcal{E}(\psi,\partial_t \psi) = \int_\Omega \tfrac{1}{2} |\nabla \psi|{}^2 + \left(\tfrac{1}{2} - \tfrac{2\beta}{3} \partial_t \psi\right) |\partial_t \psi|{}^2 dx \end{aligned} $$
(3)

One can verify by elementary computations that solutions of (1), when complemented, e.g., by homogeneous boundary conditions n ψ = 0, satisfy

$$\displaystyle \begin{aligned} \frac{d}{dt} \mathcal{E}(\psi,\partial_t \psi) = -\alpha \int_\Omega |\nabla (\partial_t \psi)|{}^2 dx. \end{aligned} $$
(4)

This energy identity states that in a closed system the acoustic energy is conserved exactly up to dissipation caused by viscous effects. For α ≥ 0, the Westervelt equation (1) thus models a passive system. This property is of fundamental importance not only for the analysis of the problem [13] but also for the accuracy and long-term stability of discretization schemes; see [15] and the references given there.

Various discretization schemes for the linear wave equation can be extended to nonlinear acoustics. Among the most widely used approaches are the finite-difference-time-domain method [10, 14, 17], finite-volume schemes [5, 19], and finite-element methods together with Newmark time-stepping [2, 12, 18]. To the best of our knowledge, none of the mentioned approaches is capable to exactly reproduce the energy identity (4) on the discrete level in the presence of nonlinearities.

In this paper, we propose a systematic strategy for the high-order approximation of nonlinear acoustics in space and time which exactly satisfies an integral version of the energy identity (4) on the discrete level. Our approach utilizes the fact that the Westervelt equation (1) can be written as a generalized gradient system

$$\displaystyle \begin{aligned} \mathcal{C}(u) \partial_t u = - \mathcal{H}'(u) \end{aligned} $$
(5)

with u = (ψ, t ψ) denoting the state and \(\mathcal {H}(u)=\mathcal {E}(\psi ,\partial _t\psi )\) the energy of the system. The energy identity (4) is then a direct consequence of the particular structure of this system; see below. As illustrated in [4], the structure-preserving discretization of (5) can be obtained in a systematic manner by Galerkin approximation in space and time. For the space discretization, we utilize a finite-element approximation with mass-lumping. The time-integration resulting from our approach can be interpreted as a variant of particular Runge-Kutta methods and is strongly related to discrete gradient and average vector field collocation methods [7, 8, 16].

The remainder of the manuscript is organized as follows: In Sect. 2, we rewrite the Westervelt equation (1) into the non-standard canonical form (5). Our discretization strategy is then introduced in Sect. 3, and we show that the energy identity remains valid after discretization. In Sect. 4, we briefly discuss some details of the numerical realization and the connection to other discretization methods. In Sect. 5, we illustrate the exact energy-conservation in the absence of viscous effects for one-dimensional example.

2 A Canonical Form of the Westervelt Equation

We introduce p =  t ψ as new variable and write u = (ψ, p) and \(\mathcal {H}(u)=\mathcal {E}(\psi ,p)\). The derivative \(\mathcal {H}'(u)\) of the energy in direction v = (η, q) is then given by

$$\displaystyle \begin{aligned} \begin{array}{rcl} \langle \mathcal{H}'(u),v\rangle = \langle \mathcal{E}'(\psi,p), (\eta,q) \rangle = \int_\Omega \nabla \psi \cdot \nabla \eta + (1-2\beta p) p \cdot q \, dx. \end{array} \end{aligned} $$

Using integration-by-parts for the first term under the integral and homogeneous boundary conditions n ψ = 0 on  Ω, we can now formally represent the negative derivative of the energy functional as a two-component function

$$\displaystyle \begin{aligned} -\mathcal{H}'(u) = \left(\Delta \psi, -(1-2\beta p) p\right). \end{aligned} $$
(6)

In order to bring equation (1) into the canonical form (5), we should thus derive an equivalent first order system with right hand sides given by \(-\mathcal {H}'(u)\). By elementary computations, one can verify the following statements.

Lemma 1

The Westervelt equation (1) is equivalent to the system

$$\displaystyle \begin{aligned} \begin{array}{rcl} (1-2\beta p) \partial_t p - \alpha \Delta \partial_t \psi & =&\displaystyle \Delta \psi. {} \end{array} \end{aligned} $$
(7)
$$\displaystyle \begin{aligned} \begin{array}{rcl} -(1-2\beta p) \partial_t \psi & =&\displaystyle - (1-2\beta p) p. {} \end{array} \end{aligned} $$
(8)

Proof

Differentiating the last term in (1) yields

$$\displaystyle \begin{aligned} \beta \partial_t (\partial_t \psi)^2 = 2 \beta (\partial_t \psi) \partial_{tt} \psi. \end{aligned}$$

Using this identity and a slight rearrangement of terms, the Westervelt equation can thus be rewritten equivalently as

$$\displaystyle \begin{aligned} (1 - 2\beta \partial_t \psi) \partial_{tt} \psi - \alpha \Delta (\partial_t \psi) = \Delta \psi. \end{aligned}$$

By replacing t ψ and tt ψ in the first term by p and t p, we already obtain (7). The second equation (8) is an immediate consequence of the identity p =  t ψ. □

Remark 1

Abbreviating u = (ψ, p) and \(\mathcal {H}(u)=\mathcal {E}(\psi ,p)\) as above, the system (7)–(8) can be seen to formally be in the canonical form (5) with

$$\displaystyle \begin{aligned} \mathcal{C}(u)=\begin{pmatrix} -\alpha \Delta & (1-2\beta p) \\ -(1-2\beta p) & 0 \end{pmatrix}. \end{aligned}$$

The somewhat unconventional form of the system (7)–(8) is dictated by the underlying energy, whose derivative has to appear in the right hand side of the equations.

Our discretization will be based on the following weak formulation of (7)–(8).

Lemma 2

Let (ψ, p) denote a smooth solution of the system (7)(8) on Ω with homogeneous boundary values ∂ n ψ = 0 on ∂ Ω for 0 ≤ t  T. Then

$$\displaystyle \begin{aligned} \begin{array}{rcl} \langle (1-2\beta p(t)) \partial_t p(t), \eta\rangle + \alpha \langle \nabla \partial_t \psi(t), \nabla \eta\rangle & =&\displaystyle -\langle \nabla \psi(t), \nabla \eta\rangle {} \end{array} \end{aligned} $$
(9)
$$\displaystyle \begin{aligned} \begin{array}{rcl} -\langle (1-2\beta p(t)) \partial_t \psi(t), q \rangle & =&\displaystyle -\langle(1-2\beta p(t)) p(t), q\rangle {} \end{array} \end{aligned} $$
(10)

for all test functions η, q  H 1( Ω) and all 0 ≤ t  T. The bracketu, v〉 =∫Ω uv dx is used here to denote the scalar product on L 2( Ω).

Proof

The two identities follow by multiplying (7)–(8) with appropriate test functions, integrating over Ω, and integration-by-parts for the terms with the Laplacian. The boundary terms vanish due to the homogeneous boundary conditions. □

We now show that the energy identity (4) follows directly from this weak formulation.

Lemma 3

Let (ψ, p) denote a solution of the weak formulation (9)(10). Then

$$\displaystyle \begin{aligned} \frac{d}{dt} \mathcal{E}(\psi(t),p(t)) = -\alpha \int_\Omega |\nabla (\partial_t \psi(t))|{}^2 dx. \end{aligned}$$

Proof

Formal differentiation of the energy yields

$$\displaystyle \begin{aligned} \begin{array}{rcl} \frac{d}{dt} \mathcal{E}(\psi,p) & =&\displaystyle \langle \mathcal{E}'(\psi,p), (\partial_t \psi,\partial_t p)\rangle \\ & =&\displaystyle \langle \nabla \psi, \nabla \partial_t \psi\rangle + \langle (1-2\beta p) p, \partial_t p\rangle, \end{array} \end{aligned} $$

where we used the representation of the energy derivative derived above. The two terms correspond to the right hand sides of the weak formulation (9)–(10) with test functions η =  t ψ and q =  t p. Using the weak formulation, we thus obtain

$$\displaystyle \begin{aligned} \begin{array}{rcl} \frac{d}{dt} \mathcal{E}(\psi,p) & =&\displaystyle -\langle (1-2\beta p) \partial_t p, \partial_t \psi\rangle - \alpha \langle \nabla \partial_t \psi, \nabla \partial_t \psi \rangle + \langle (1-2\beta p) \partial_t \psi, \partial_t p \rangle. \end{array} \end{aligned} $$

Now the first and last term on the right hand side cancel out and the assertion follows by noting that 〈∇ t ψ, ∇ t ψ〉 =∫Ω|∇ t ψ|2 dx by definition of the bracket. □

Remark 2

The proof of the previous lemma reveals that the energy identity (4) is a direct consequence already of the particular structure of the weak formulation (9)–(10). Since this form is preserved automatically under projection, one can obtain a structure preserving discretization by Galerkin approximation; see [4] for details. In the following section, we discuss a particular approximation based on finite elements.

3 Structure-Preserving Discretization

Let \(\mathcal {T}_h = \{K\}\) denote a mesh, i.e., a geometrically conforming and uniformly shape-regular simplicial partition, of the domain Ω. We write h K and h =maxK h K for the local and global mesh size. We further denote by

$$\displaystyle \begin{aligned} V_h = \{ v \in H^1(\Omega) : v|{}_K \in P_k(K) \quad \forall K \in T_h\} \end{aligned}$$

the standard finite element space consisting of continuous piecewise polynomial functions of degree ≤ k. Let I τ = {0 = t 0 < t 1 < … < t N = T} denote a partition of the time interval [0, T] into elements [t n−1, t n] of size τ n = t n − t n−1 and, as before, write τ =maxn τ n for the global time step size. We denote by

$$\displaystyle \begin{aligned} P_q(I_\tau;X) = \{v : v|{}_{[t^{n-1},t^n]} \in P_q([t^{n-1},t^n];X)\} \end{aligned}$$

the space of piecewise polynomial functions in time of degree ≤ q with values in X. As approximation for the Westervelt equation (1) we now consider the following inexact Galerkin-Petrov Galerkin approximation of the weak formulation (9)–(10).

Problem 1

Find ψ h, p h ∈ P q(I τ;V h) ∩ H 1([0;T];V h) such that ψ h(0) = ψ h,0, p h(0) = p h,0, for given initial values ψ h,0, p h,0 ∈ V h, and such that

$$\displaystyle \begin{aligned} \begin{array}{rcl} & &\displaystyle \int_{t^m}^{t^n} \langle (1-2\beta p_h) \partial_t p_h, \widetilde \eta_h\rangle_h + \alpha \langle \nabla \partial_t \psi_h, \nabla \widetilde \eta_h\rangle \, dt = -\int_{t^m}^{t^n} \langle \nabla \psi_h, \nabla \widetilde \eta_h\rangle \, dt {}\\ & &\displaystyle -\int_{t^m}^{t^n} \langle (1-2\beta p_h) \partial_t \psi_h, \widetilde q_h \rangle_h \, dt = -\int_{t^m}^{t^n} \langle(1-2\beta p_h) p_h, \widetilde q_h\rangle_h \, dt. {} \end{array} \end{aligned} $$

for all 0 ≤ t m ≤ t n ≤ T and all \(\widetilde \eta _h, \widetilde q_h \in P_{q-1}(I_\tau ;V_h)\). Here 〈u, vh is a symmetric positive definite approximation for 〈u, v〉 obtained by numerical integration.

Due to the inexact realization of the scalar product in some of the terms, we have to modify the discrete energy accordingly and define

$$\displaystyle \begin{aligned} \mathcal{E}_h(\psi_h,p_h) = \langle \tfrac{1}{2} \nabla \psi_h, \nabla \psi_h \rangle + \langle (\tfrac{1}{2} - \tfrac{2\beta}{3} p_h) p_h,p_h \rangle_h. \end{aligned}$$

Note that \(\mathcal {E}_h(\psi _h,p_h) = \mathcal {E}(\psi _h,p_h)\) when the scalar products are computed exactly, so this defines a natural modification of the energy on the discrete level. With similar arguments as used in Lemma 3, we now obtain the following discrete energy identity.

Lemma 4

Let (ψ h, p h) denote a solution of Problem1 . Then one has

$$\displaystyle \begin{aligned} \mathcal{E}_h(\psi_h(t^n),p_h(t^n)) = \mathcal{E}_h(\phi_h(t^m),p_h(t^m))) - \alpha\int_{t^m}^{t^n} \int_\Omega |\nabla \partial_t \psi_h(s)|{}^2 dx \, ds, \end{aligned}$$

for all 0 ≤ t m ≤ t n ≤ T, which is the discrete equivalent of the integral form of (4).

Proof

Let u n = u(t n) denote the value of a function a time t n. Then by the fundamental theorem of calculus and the expression of the energy derivative, we obtain

$$\displaystyle \begin{aligned} \begin{array}{rcl} \mathcal{E}_h(\psi_h^n,p_h^n) -\mathcal{E}_h(\psi_h^m,p_h^m) & =&\displaystyle \int_{t^m}^{t^n} \frac{d}{dt} \mathcal{E}_h(\psi_h,p_h) dt \\ & =&\displaystyle \int_{t^m}^{t^n} \langle \nabla \psi_h,\nabla \partial_t \psi_h\rangle + \langle (1-2\beta p_h) p_h,\partial_t p_h\rangle_h \, dt. \end{array} \end{aligned} $$

The two terms in the second line correspond to the negative of the right hand side in Problem 1 with test functions \(\widetilde \eta _h = \partial _t \psi _h\) and \(\widetilde q_h = \partial _t p_h\), which directly leads to

$$\displaystyle \begin{aligned} \begin{array}{rcl} \mathcal{E}_h(\psi_h^n,p_h^n) -\mathcal{E}_h(\psi_h^m,p_h^m) & =&\displaystyle -\alpha\int_{t^m}^{t^n} \langle \nabla \partial_t \psi_h,\nabla \partial_t \psi_h\rangle \, dt. \end{array} \end{aligned} $$

The assertion of the lemma now follows from the definition of the bracket 〈⋅, ⋅〉. □

Remark 3

Let us note that, exactly in the same way as in the previous section, the discrete energy identity is a direct consequence of the particular structure of the weak formulation used in the definition of Problem 1, which adequately accounts for the underlying nonlinear discrete energy.

4 Remarks on the Implementation

Before we proceed to numerical tests, let us briefly comment on the implementation of the method resulting from Problem 1. For ease of presentation, we consider piecewise linear approximations in space and time, i.e., k = q = 1. We choose the standard nodal basis for the finite elements in space and utilize the vertex rule for numerical integration in 〈u, vh, which gives rise to diagonal matrices associated with these integrals. The system to be solved on every time step then takes the form

$$\displaystyle \begin{aligned} \begin{array}{rcl} & &\displaystyle D(1-2\beta p^{n+1/2}) \frac{p^{n+1}-p^n}{\tau} + \alpha K(1) \frac{\psi^{n+1}-\psi^n}{\tau} = -K(1) \psi^{n+1/2} \\ & &\displaystyle -D(1-2\beta p^{n+1/2}) \frac{\psi^{n+1}-\psi^n}{\tau} = -D(1-2\beta p^{n+1/2}) p^{n+1/2} - \tfrac{\beta}{6} D(p^{n+1}-p^n) (p^{n+1}-p^n) \end{array} \end{aligned} $$

with \(u^{n+1/2}=\frac {1}{2}(u^n+u^{n+1})\) denoting the value at the midpoint of the time interval. Furthermore, the matrices D(a), K(b) represent the integrals 〈au, vh and 〈bu, ∇v〉.

Remark 4

Apart from the last term in the second equation, the time-step iteration amounts to the Gauß-Runge-Kutta method with s = 1 stages and could also be interpreted as an inexact realization of the Lobatto-IIIA method with s = 2 stages. Similar statements can be made for and order q ≥ 1 in Problem 1. Using an inexact computation of the time integrals arising on the left-hand side in Problem 1 leads to the average vector field collocation methods discussed in [9]. The inexact realization 〈⋅, ⋅〉h of the scalar product in space allows to utilize mass-lumping strategies which facilitates the handling of the nonlinear terms in the numerical realization, since they only appear in the diagonal matrices D(⋅). Using the considerations of [2, 6], mass lumping can be achieved in principle for any order of approximation k ≥ 1 in space.

5 Numerical Tests

For illustration of our results, we now report about numerical tests for a simple example. We consider the Westervelt equation (1) on the domain Ω = (0, 16) with homogeneous boundary conditions x ψ = 0 at  Ω. The model parameters are set to α = 0 and β = 0.3, i.e., we consider a problem without dissipation. By Lemma 3, the acoustic energy of the system is then preserved for all times. As initial conditions for our computational tests, we choose ψ 0(x) = 0 and \(p_0(x)=e^{-0.2 x^2}\). Some snapshots of the numerical solution obtained with the method of Problem 1 with polynomial orders k = q = 2 are depicted in Fig. 1. In comparison to the solution of the linear wave equation, which corresponds to (1) with α = β = 0, the presence of the nonlinear terms (β = 0.3) leads to a steepening of the wave front. In the absence of viscous damping, this leads to the formation of a shock in the long run. For the linear wave equation (β = 0), our method coincides with the Lobatto-IIIA method and the energy is preserved exactly for both schemes. While the proposed method still yields exact energy preservation also in the nonlinear case (β > 0), the Lobatto-IIIA method fails to do so. Similar statements also hold for the Gauß-Runge-Kutta and the Newmark scheme.

Fig. 1
figure 1

Solution p h(t) of the Westervelt equation with α = 0, β = 0.3 (red) and the linear wave equation with α = β = 0 (black dashed) at time steps t = 1, t = 4, and t = 8

From the usual error analysis of Galerkin methods [1], we expect that the error

$$\displaystyle \begin{aligned} \mbox{err} = \max_{0 \le t_n \le T} \|p(t^n) - p_h^n\|{}_{h} \end{aligned}$$

of the method resulting from Problem 1 with approximation orders q = k converges with order p = k + 1 in space and time. In Table 1, we report about the corresponding convergence rates observed in our numerical tests. For our numerical tests, we use polynomial orders k = q = 2 in space and time, and thus would expect third order convergence. As can be seen in Table 1, we here even observe fourth order convergence on grid-points. This kind of super-convergence on uniform grids can be observed also for finite-difference approximations of linear wave equations [3].

Table 1 Convergence rates for discrete error in the pressure at gridpoints for the nonlinear wave equation β = 0.3 (left) and the linear wave equation β = 0 (right) for comparison