• Aucun résultat trouvé

Boundary conditions

Dans le document Numerical Sound Synthesis (Page 134-137)

The 1D wave equation

6.1 Definition and properties

6.1.9 Boundary conditions

The 1D wave equation involves second-order differentiation in space, and, as such, requires the specification of a single boundary condition at any endpoint of the spatial domain. A typical such condition often employed at an endpoint of the domain, such asx=0, is the following:

u(0, t )=0 (6.18)

Such a condition is often referred to as being of Dirichlet type. If the 1D wave equation is intended to describe the displacement of a string, then this is a fixed termination. If u(x, t )represents the pressure variation in an acoustic tube, such a condition corresponds (roughly) to an open end of the tube.

Another commonly encountered condition is the Neumann condition:

ux(0, t )=0 (6.19)

Such a condition is easily interpreted in the context of the acoustic tube as corresponding to a closed tube end, and less easily in the case of the string, where it may be viewed as describing a string endpoint which is free to move in a transverse direction, but not longitudinally (it is best to visualize the end of such a string as constrained to move along a vertical “guide rail”).

The Dirichlet and Neumann conditions are often generalized to include a non-zero constant on

the right-hand side [161]. Both conditions are lossless —in order to get a better idea of what this means (and to gain some insights into how such conditions may be arrived at), energy techniques are invaluable. Consider now the wave equation defined not over the infinite domainD=R, but over the semi-infinite domain4 D=R+=[0,∞]. Taking an inner product of the wave equation withut, and employing integration by parts yields, instead of (6.14),

ut, ut t R++γ2ut x, ux R+ =B−γ2ut(0, t )ux(0, t )

An extra boundary termBhas thus intervened, and one can not proceed to a statement of conser-vation of energy such as (6.15), but rather

dH

dt =B (6.20)

where the definition of H and its constituent terms are taken overR+ rather than R. Now, the lossless interpretation of the Dirichlet and Neumann conditions above should be clear; the boundary term vanishes in either case, and one again has exact energy conservation,5 as per (6.16). (Note, however, that in the case of the Dirichlet condition, the true losslessness condition, from the above, is rather thatut vanish at the boundary, which is implied by the simpler condition thatu itself vanish —in other words, uneed only be specified as a constant, which can be chosen as zero.)

It follows directly that when the spatial domain of the problem at hand is finite, e.g., if D=U=[0,1], as is the case in all musical systems of interest, the energy balance becomes

dH

dt =Bγ2(ut(1, t )ux(1, t )ut(0, t )ux(0, t )) (6.21) The boundary conditions at both ends of the domain come into play.

Lossy boundary conditions

The Dirichlet and Neumann conditions are by no means the only possible boundary conditions for the wave equation; there are an infinite number of possible terminations, some of which possess a reasonable physical interpretation. For example, a lossy condition is given by

ut(0, t )=αux(0, t ) (6.22)

for some constantα >0. In this case, overD=R+, one has B= −αγ2(ux(0, t ))2≤0

implying that the energy is non-increasing. It becomes very simple, using energetic techniques, to categorize sources of loss according to whether they occur at the boundary or over the problem interior. When translated to a numerical setting, it becomes similarly possible to isolate potential sources of numerical instability —some are of global type, occurring over the problem interior, but often instability originates at an improperly set numerical boundary condition. The condition (6.22)

4One of the nice features of energy analysis is that it allows boundary conditions at different locations to be analyzed independently; this is a manifestly physical approach, in that one would not reasonably expect boundary conditions at separate locations to interact, energetically. The same simplicity of analysis follows for numerical methods, as will be seen in the first instance later in this chapter.

5For those with an engineering background, including those familiar with digital waveguides, the boundary term may be interpreted as the power supplied to the system due to interaction at the boundary.

126 THE 1D WAVE EQUATION

above, under a special choice ofα, can lead to a perfectly absorbing (i.e., impedance-matched) boundary condition —see Problem 6.1.

One can go much further along these lines, and analyze nonlinear boundary conditions as well.

See Problem 6.2 for an example.

Energy-storing boundary conditions

The Dirichlet, Neumann, and lossy boundary conditions lead to conservation of energy, as a whole, or to instantaneous dissipation —they do not have “memory,” and are incapable of storing energy.

In some cases, one might expect a boundary termination to exhibit this property —some examples include termination of a string by a mass – spring system or also the open (radiative) termination of an acoustic tube.

One condition, often used in speech applications in order to model such radiation from the open end of a tube [280] atx=0, is the following:

ux(0, t )=α1ut(0, t )+α2u(0, t ) (6.23) for constantsα1≥0 andα2≥0. Now, the energy balance (6.20) becomes

dH

dt = −α1γ2(ut(0, t ))2α2γ2ut(0, t )u(0, t ) or

d (H+Hb)

dt = −Q≤0 where Hb=α2γ2

2 (u(0, t ))2 Q=α1γ2(ut(0, t ))2 (6.24) The total energy of the system is thus that of the problem over the interior,H, plus that stored at the boundary,Hb, and is again non-negative and non-increasing. The term with coefficientα2 is often viewed, in the acoustic transmission line framework, as corresponding to the reactive (i.e., energy-storing) part of the terminating impedance of the tube, and that with coefficientα1 to the resistive part.

This condition will be revisited in the context of tube modeling in Section 9.1.3.

Reflection of traveling waves at a boundary

The result of the choice of boundary conditions on the behavior of the solution to the wave equation is perhaps most easily approached using the traveling wave decomposition. Considering the wave decomposition (6.11), and a boundary condition at x=0 of Dirichlet type, one immediately has that

u(+)(t )= −u(−)(t )

Thus the traveling waves reflect, with sign inversion, at such a boundary. For the Neumann con-dition (6.19), one has that

u(+)(t )=u(−)(t )

Under this condition, traveling waves reflect without sign inversion. It is useful to examine this behavior, as illustrated in Figure 6.6. The simple manner in which boundary conditions may be viewed using a traveling wave decomposition has been exploited with great success in digital waveguide synthesis. It is worth noting, however, that more complex boundary conditions usually will introduce a degree of dispersion into the solution, and traveling waves become distorted upon reflection.

(a)

(b)

0 0.2 0.4

1

0.5 0 0.5 1

0 0.2 0.4

1

0.5 0 0.5 1

0 0.2 0.4

1

0.5 0 0.5 1

0 0.2 0.4

1

0.5 0 0.5 1

u u u u

x x x x

0 0.2 0.4

1

−0.5 0 0.5 1

0 0.2 0.4

1

−0.5 0 0.5 1

0 0.2 0.4

1

−0.5 0 0.5 1

0 0.2 0.4

1

−0.5 0 0.5 1

t = 0.01 s t = 0.02 s t = 0.025 s t = 0.03 s

u u u u

x x x x

Figure 6.6 Reflection of a leftward-traveling pulse at a boundary atx=0, (a) with inversion under Dirichlet, or fixed conditions, and (b) without inversion under Neumann, or free conditions.

In this case, the wave equation is defined with γ =20, and the solution is plotted over the left half of the domain, at the times as indicated.

Dans le document Numerical Sound Synthesis (Page 134-137)