bilbao acustica r2

20
ACTA ACUSTICA UNITED WITH ACUSTICA Vol. 98 (2012) Numerical Modeling of Collisions in Musical Instruments S. Bilbao 1) , A. Torin 1) , V. Chatziioannou 2) 1) Acoustics and Audio Group, King’s Buildings, University of Edinburgh, Edinburgh, United King- dom. sbilbao@staffmail.ed.ac.uk 2) Institute of Music Acoustics, University of Music and Performing Arts, Vienna, Austria Summary Collisions play an important role in many aspects of the physics of musical instruments. The striking action of a hammer or mallet in keyboard and percussion instruments is perhaps the most important example, but others include reed-beating effects in wind instruments, the string/neck interaction in fretted instruments such as the guitar as well as in the sitar and the wire/membrane interaction in the snare drum. From a simulation perspective, whether the eventual goal is the validation of musical instrument models or sound synthesis, such highly nonlinear problems pose various difficulties, not the least of which is the risk of numerical instability. In this article, a novel finite difference time domain simulation framework for such collision problems is developed, where numerical stability follows from strict numerical energy conservation or dissipation, and where a power law formulation for collisions is employed, as a potential function within a passive formulation. The power law serves both as a model of deformable collision, and as a mathematical penalty under perfectly rigid, non- deformable collision. Various numerical examples, illustrating the unifying features of such methods across a wide variety of systems in musical acoustics are presented, including numerical stability and energy conservation/dissipation, bounds on spurious penetration in the case of rigid collisions, as well as various aspects of musical instrument physics. PACS no. 43.75.Zz 1. Introduction Various mechanisms of sound production in musical instruments rely on collisions; the obvious examples are the interaction of a striking object, such as a ham- mer with a string, or a drum stick or mallet with a per- cussive instrument, but more subtle examples include reed-beating effects in wind instruments, string/neck interactions along the fretboard of a guitar, and also in the sitar and tambura, and most dramatically, the wire/membrane interaction in a snare drum. In all cases, the collision interaction is necessarily strongly nonlinear, and simulation design becomes a challeng- ing problem. Such collisions may be grouped into two types. In the first, one of the two objects involved in the col- lision is modelled as lumped—i.e., it is characterized by a single position/velocity pair. Such is the case for most models of the hammer-string [1, 2], mallet-bar [3] and mallet-membrane interactions [4], even if the colliding object occupies a finite interaction region. Received 27 October 2012, accepted 6 December 2012. The perceptual effects of such a nonlinear interaction are major, particularly with regard to the spectral content of the resulting sound. In the second, both objects must be considered to be fully distributed, and the region of contact will vary in a non-trivial manner. Examples include the snare drum [5], sitar [6] and string fret interactions [7] mentioned above. Collision modeling is a branch of the large area of contact mechanics with applications across a variety of disciplines, and especially robotics [8] and computer graphics [9]—see Wriggers et al. [10] for a recent re- view. In musical acoustics and applications in sound synthesis, various techniques have been employed, in- cluding digital waveguides [11, 7], modal methods [6] and time stepping methods in the lumped setting [12, 13, 14], in modeling lumped/distributed collisions [15, 16, 2, 17], the interaction of a distributed object with a rigid barrier [11, 18, 19], and in the collision of deformable objects for synthesis applications [20]. Finite element methods are often used to model col- lisions of complex deformable bodies in mainstream applications [21]; in the present case of musical acous- tics and sound synthesis, where geometries are often simple, finite difference time domain methods [22] are © S. Hirzel Verlag · EAA 1

Upload: marcovillaranreyes

Post on 10-Nov-2015

10 views

Category:

Documents


0 download

DESCRIPTION

aaa

TRANSCRIPT

  • ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    Numerical Modeling of Collisions in MusicalInstruments

    S. Bilbao1), A. Torin1), V. Chatziioannou2)1) Acoustics and Audio Group, Kings Buildings, University of Edinburgh, Edinburgh, United King-

    dom.

    [email protected]) Institute of Music Acoustics, University of Music and Performing Arts, Vienna, Austria

    Summary

    Collisions play an important role in many aspects of the physics of musical instruments. The striking

    action of a hammer or mallet in keyboard and percussion instruments is perhaps the most important

    example, but others include reed-beating effects in wind instruments, the string/neck interaction in

    fretted instruments such as the guitar as well as in the sitar and the wire/membrane interaction in

    the snare drum. From a simulation perspective, whether the eventual goal is the validation of musical

    instrument models or sound synthesis, such highly nonlinear problems pose various difficulties, not

    the least of which is the risk of numerical instability. In this article, a novel finite difference time

    domain simulation framework for such collision problems is developed, where numerical stability

    follows from strict numerical energy conservation or dissipation, and where a power law formulation

    for collisions is employed, as a potential function within a passive formulation. The power law serves

    both as a model of deformable collision, and as a mathematical penalty under perfectly rigid, non-

    deformable collision. Various numerical examples, illustrating the unifying features of such methods

    across a wide variety of systems in musical acoustics are presented, including numerical stability and

    energy conservation/dissipation, bounds on spurious penetration in the case of rigid collisions, as well

    as various aspects of musical instrument physics.

    PACS no. 43.75.Zz

    1. Introduction

    Various mechanisms of sound production in musicalinstruments rely on collisions; the obvious examplesare the interaction of a striking object, such as a ham-mer with a string, or a drum stick or mallet with a per-cussive instrument, but more subtle examples includereed-beating effects in wind instruments, string/neckinteractions along the fretboard of a guitar, and alsoin the sitar and tambura, and most dramatically, thewire/membrane interaction in a snare drum. In allcases, the collision interaction is necessarily stronglynonlinear, and simulation design becomes a challeng-ing problem.Such collisions may be grouped into two types. In

    the first, one of the two objects involved in the col-lision is modelled as lumpedi.e., it is characterizedby a single position/velocity pair. Such is the case formost models of the hammer-string [1, 2], mallet-bar[3] and mallet-membrane interactions [4], even if thecolliding object occupies a finite interaction region.

    Received 27 October 2012,

    accepted 6 December 2012.

    The perceptual effects of such a nonlinear interactionare major, particularly with regard to the spectralcontent of the resulting sound. In the second, bothobjects must be considered to be fully distributed,and the region of contact will vary in a non-trivialmanner. Examples include the snare drum [5], sitar[6] and string fret interactions [7] mentioned above.

    Collision modeling is a branch of the large area ofcontact mechanics with applications across a varietyof disciplines, and especially robotics [8] and computergraphics [9]see Wriggers et al. [10] for a recent re-view. In musical acoustics and applications in soundsynthesis, various techniques have been employed, in-cluding digital waveguides [11, 7], modal methods [6]and time stepping methods in the lumped setting[12, 13, 14], in modeling lumped/distributed collisions[15, 16, 2, 17], the interaction of a distributed objectwith a rigid barrier [11, 18, 19], and in the collisionof deformable objects for synthesis applications [20].Finite element methods are often used to model col-lisions of complex deformable bodies in mainstreamapplications [21]; in the present case of musical acous-tics and sound synthesis, where geometries are oftensimple, finite difference time domain methods [22] are

    S. Hirzel Verlag EAA 1

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    an efficient alternative, and will be employed here.Such methods serve as an alternative to other tech-niques which can in some instances be more efficient(such as, e.g., digital waveguides [23] or modal meth-ods [24]) because they generalize more easily to han-dle distributed interactions, as in the present case ofcollisions.

    In the setting of musical acoustics, previous workon particular cases of collisions using finite differencemethods, such as, for example, the snare membraneinteraction [5] and the reed/lay interaction [17] hasgenerally made use of ad hoc techniquesthat is tosay, there is not any attempt at proving numerical sta-bility under such strongly nonlinear conditions. As inthe case of other types of inherent distributed nonlin-earities in musical instruments (as, e.g., in strings [25]or curved shells [26]), an approach based on energyprinciples [27] is of great utility; energetic methodsare widely used in elastodynamics, whether in a vari-ational setting [28] or when strict energy conservationor dissipation is enforced [29]. The general aim of thispaper, then, is to incorporate the nonlinear collisionmechanism into the energy conservation framework,and use such a formulation in order to arrive at suffi-cient stability conditions for such methods, and showits application to a wide variety of systems, spanningthe range of musical instruments. The mechanism bywhich this is accomplished is through the introductionof a potential energy term corresponding to the col-lision interaction; such a mechanism has indeed beenproposed, in the case of a lumped collision in the semi-discrete case by Rhaouti et al. in [4] and in the fullydiscrete case by Chabassier in [15] and Chabassier etal. [16]. The case of distributed collisions, however,which forms a large part of the present article, has notbeen treated previously within an energy-conservingframework to the knowledge of these authors.

    If the collision is accompanied by some deformationof the colliding object (as for, e.g., the piano ham-mer), then the additional potential has the interpre-tation of energy stored in the deformed object. In thecase of rigid collisions, however, the potential must beinterpreted as a penaltysuch a potential results ina strong opposing force, penalizing penetration, butsome limited interpenetration of the colliding bod-ies is permitted. Such penalty methods [30] can beviewed in contrast with methods based on hard non-penetrative constraints [31]. As long as contact veloc-ities are low (which is generally the case in musicalacoustics applications), the latter approach is justifi-able. Indeed, a second benefit of such an energy-basedformulation, beyond proving stability, is a means ofdetermining bounds on such spurious penetrationaswill be seen, the amount of penetration can be madeas small as desired (and particular, small enough tobe negligible in applications in acoustics). Numericalexistence and uniqueness results in the simple caseof a lumped collision with a rigid barrier have been

    presented recently [14] and will be extended to fullydistributed systems here. The issue of existence anduniqueness for the underlying systems in the presenceof collision mechanisms is a difficult oneit has beenapproached, in the case of lumped collisions with arigid barrier and with a vibrating string, by Joly andRhaouti [32], and is out of the scope of this work.

    In Section 2, the collision of a mass with a rigid bar-rier is used as a test case in the construction of stableenergy conserving methods, accompanied by an ex-tension to the case of a lossy collision. Collisions ofa lumped object with a distributed system are con-sidered next. To this end, some background materialon discrete representations of distributed systems ispresented in Section 3. The case of the hammer stringinteraction is treated first in Section 4, followed byreed beating effects, in a simple model of a wind in-strument in Section 5. A fully distributed collision isconsidered next, in the case of a string in contact witha rigid barrier in Section 6. In 2D, the simplest sys-tem of interest is the mallet/membrane interaction,described in Section 7. Finally, the case of a wire incontact with a membrane, modeling the snare inter-action is described in Section 8. As a nontrivial ex-ample, in this last section, a complete 3D model of asnare drum, including the cavity, membranes, acous-tic field and snares is outlined. As the schemes pre-sented here all require the solution of nonlinear equa-tions, some existence/uniqueness results are providedin Appendix A, along with some comments on the useof iterative methods.

    2. Prelude: Collision of a Mass with aRigid Barrier

    A starting point in many numerical studies of colli-sions [10, 13, 14] is the case of a lumped deformableobject approaching a rigid barrier from below, under anonlinear interaction force. The system may be writ-ten as

    Md2u

    dt2= f , f = d

    du=

    d

    dt/du

    dt. (1)

    Here, u = u(t) is the position of the object at time t R+, andM is its mass. For this second order equation,

    two initial conditions, namely u(0) and du/dt(0) mustbe supplied. f = f(t) is the interaction force, writtenhere in terms of a potential (u) 0. For collisions,with a barrier at u = 0, f is zero for u 0; whenu > 0, a deformable object undergoes compression,and a rigid object can be viewed as penetrating thebarrier. A power law is a useful general choice of thepotential:

    = K, =K[u]+1++ 1

    0 f = K[u]+ . (2)

    2

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    It depends on a stiffness parameter K 0 and anexponent > 1; in this article, the notation []+ indi-cates the positive part of, i.e., [u]+ =

    12 (u+ |u|).

    Such power law nonlinearities are common in mod-els of collisions in many settings, including not justthe present case of the lumped collision, but also inmodels of the hammer string interaction [2], where andK are empirically determined (though for simplersystems, such as the contact of two spheres, Hertzianmodels allow a direct calculation [33]). Such modelsmay be viewed as permitting a certain deformation ofthe colliding object when in contact with the barrier.If the colliding object is perfectly rigid, then such amodel is obviously unphysical, in that some penetra-tion is permittedin this case, the potential maybe interpreted as a penalty, and u > 0 is itself thepenetration; in numerical treatments, = 1 is oftenchosen [30]. Most of what follows here does not dependon a particular choice of the potentialbut existenceand uniqueness in implementation do depend on theform of , and the power law has various advantageswhich will be highlighted.

    2.1. Energy Balance

    The collision model presented above is energy con-serving [13]. Multiplying (1) by du/dt leads to

    Mdu

    dt

    d2u

    dt2= du

    dtf = du

    dt

    d

    du= d

    dt, (3)

    and thus to the energy balance, in terms of total en-ergy H:

    dHdt

    = 0 , H(t) = M2

    (du

    dt

    )2+ . (4)

    Thus H(t), corresponding to the total energy of theobject at time t, is conserved and non-negative:

    H(t) = H (0) 0 . (5)Note that the procedure above, involving multiplica-tion by the velocity, leads to a construction of theenergy conservation law, and can be viewed as the re-verse of the procedure employed in the derivation ofequations of motion from expressions for the energyusing Hamiltons equations [34].For the particular choice of the power law potential

    function = K, from (2), the conservation lawimplies bounds on both u(t) and du/dt at any timet, in terms of the initial energy H(0). These may bearrived at by noting that, as the individual terms ofH in (4) are both non-negative, both are boundedindividually by H(0), leading to:dudt

    2H(0)M

    , u(t) ((+ 1)H(0)

    K

    ) 1+1

    . (6)

    The first bound holds for any non-negative potential, and the second employs monotonicity of the powerlaw K, in u 0.

    2.2. Time Series and Difference Operators

    Moving to a discrete time simulation setting, let u =un represent an approximation to u(t) at t = nk, forinteger n, and for a given time step k.Unit shifts et+ and et are defined as

    et+un = un+1 etu

    n = un1 . (7)

    Forward, backward and centered difference approxi-mations to a first time derivative may thus be definedas

    t+ =et+ 1

    kt =

    1 etk

    t =et+ et

    2k,(8)

    and an approximation to a second time derivative as

    tt =et+ 2 + et

    k2. (9)

    Various averaging operators may be defined as

    t+=et+ + 1

    2t=

    1 + et2

    t=et+ + et

    2.(10)

    2.3. Finite Difference Scheme

    An approximation to (1), at time step n is then

    Mttun = fn , (11a)

    where tt is a second difference operator, as defined in(9), and where fn is a time series defined by

    fn =t

    n+ 12

    tun, n+

    12 = t+ (u

    n) (11b)

    in terms of a discrete potential n+12 , itself defined

    in terms of the potential of the model problem.Note here that the definition of fn here mirrors thatof the continuous time case, from (1); simpler, fullyexplicit forms are available, but can lead to stabilityproblemssee the end of Section 4.4 for an exampleof numerical instability, in the case of a hammer incontact with a string. The backwards and centereddifference operators t and t employed in (11b) aredefined in (8), and the averaging operator t+ is de-

    fined in (10). The time series n+12 is interleaved with

    respect to the time series un itself; thus scheme (11)is centered about time step n and, if stable, is secondorder accurate [22] (note in particular the application

    of the backward difference operator to n+12 , which

    centers the approximation about time step n).Multiplying (11a) by tu

    n, and employing (11b)gives

    Mtunttu

    n = tunfn = tn+ 12 . (12)

    Employing the identity

    tunttu

    n =1

    2t (t+u

    n)2

    (13)

    3

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    leads to the discrete energy balance

    thn+ 1

    2 = 0 hn+ 12 = const. 0 , (14)

    where the discrete energy of the system is defined as

    hn+12 =

    M

    2(t+u

    n)2+n+

    12 0 . (15)

    Bounds on the solution size follow as in the continu-ous case, under the choice of a power law nonlinearityK,:

    |t+un|

    2h

    M, un

    (2 (+ 1)h

    K

    ) 1+1

    ,(16)

    and the scheme is thus unconditionally stable. Noticein particular that the amount of penetration may becontrolled through the choice of K in this case.

    The scheme (11) requires the solution of a nonlinearequation at each time step,

    G(r) = r +m

    r((r + a) (a)) + b = 0 , (17)

    in terms of an unknown r, defined in terms of un as

    r = un+1 un1 , (18)

    where m, a and b are given by

    m = k2/M a = un1 b = 2un + 2un1 . (19)

    At each time step, once r is determined, the next dis-placement un+1 may be determined from r and un1.

    The function G(r), as defined in (17), as well as cer-tain generalized forms, play a central role in all thealgorithms to be described subsequently here in thedistributed case. It has recently been shown [14] thatG(r) = 0 possesses a unique solution for one-sided po-tentials of power law form. An iterative method suchas the Newton-Raphson algorithm may be employed,but conditions for global convergence are not obvious.See Appendix A for more discussion.

    It is worth contrasting this energy-conservingmethod with that presented in [14], which is alsoenergy-conserving, and ultimately distinct from thatpresented here. In this paper, the energy balance is de-rived from the dynamical system; in [14], Hamiltonsequations are taken as a point of departure. Whetherthese two approaches can be unified is an interest-ing question. The key feature, though, that of a non-negative conserved quantity used to bound solutions,is the same in both cases.

    2.4. Nonlinear Losses

    In some more refined collision models [13], a nonlineardamping term is included. From the model of Huntand Crossley [35] the force f in (1) may be augmentedto

    f =d

    du+du

    dt (u) , (20)

    where is defined as in (2), and for some function (u) 0; in particular, the choice of

    K, (u) = K[u]+ (21)

    for some 0 has been employed in previous studiesof collisions. (Other models used in musical acous-tics, particularly in the case of hammer felt are sim-ilar [36].) In this case, the energy balance (4) can begeneralized to

    dHdt

    = Q , Q =(du

    dt

    )2(u) 0 , (22)

    and thus energy is monotonically decreasing, and thebounds on the velocity and displacement hold as be-fore.Scheme (11) may be generalized using

    fn =t

    n+ 12

    tun+ tu

    nn , (23)

    where n = (un). Now the energy balance (14) maybe generalized to

    thn+ 1

    2 = qn , qn = (tun)2 n 0 , (24)and thus energy is monotonically decreasing, and so-lution bounds hold as before. The nonlinear equationto be solved at each time step must be generalized to

    G(r) = (1 + c) r +m

    r((r + a) (a)) + b = 0 (25)

    where r, the unknown, as well as the constants m, aand b are as before, and where c = k(un)/2M .

    2.5. Simulations

    Consider first the collision of a mass with a rigid bar-rier under different choices of the exponent , usingscheme (11), as illustrated in Figure 1, and with atypical value of K (here 108) which is in the range ofvalues used typically in studies of piano hammers [37].The trajectories of the mass are illustrated at top; theobvious effect of the exponent is on the duration of thecontact time, but as the scheme is exactly lossless, theinitial and exiting speeds of the mass are identical tomachine accuracy. As a further indication of the exactenergy conservation property of the scheme, the nor-malized energy variation is plotted against time stepin Figure 1, at bottom; single bit variation of the en-ergy (at double precision floating point) is evident asquantization.

    4

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    0 1 2 3 4 5 6 720

    10

    0

    10

    t (ms)

    u(m

    m)

    = 1.5 = 2 = 2.5

    0 50 100 150 200 250 3002

    0

    2x 1015

    time step n

    Figure 1. Top: trajectory of a mass M = 10 g, collidingwith a rigid barrier, under different values of the exponent, as indicated. Here the mass has initial velocity 10 m/s,and K = 108. Scheme (11) is used, with a sample rateof 44.1 kHz. Bottom: normalized energy variation n =(hn+

    12 h1/2

    )/h1/2, when = 2.5.

    As a further example, the behaviour of the samesystem, under the lossy collision model given in Sec-tion 2.4 is plotted in Figure 2, under difference choicesof the loss parameter . Energy is monotonically de-creasing, illustrating a complex non-exponential losscharacteristic during the collision itself.

    0 1 2 3 4 5 6 710

    5

    0

    5

    t (ms)

    u(m

    m)

    = 0 = 0.5 = 1

    0 50 100 150 200 250 3000

    0.5

    time step n

    Energy

    (J)

    Figure 2. Top: trajectory of a mass colliding with a rigidbarrier, under different values of the loss coefficient , asindicated, with = 2.3. All other conditions are as in the

    caption to Figure 1. Bottom: energy hn+12 , when = 1.

    In the case of a completely rigid collision, some spu-rious penetration (here u > 0) is inevitable. Consid-ering again the system under the choice of parame-ters given in Figure 1. Using values of K = 1016 and = 1.2, approximating such a rigid collision, the pen-etration is under 8108 m, which is negligible in anyacoustics application.

    3. Background: Distributed Systemsand Grid Functions

    In this section, some background material on systemsand grid functions suitable for use in finite difference

    time domain schemes in 1D and 2D is presented, witha focus on energy techniques.

    3.1. Continuous Inner Products and Norms

    Consider real-valued functions (x, t) and (x, t) de-fined over a d-dimensional domain, with x D Rd,and for time t R+. Particular domains of interestin the present setting are, for a given length L, a 1Dinterval DL and the 2D square domain DL,L, definedas

    DL = {x R|0 x L} , DL,L = DL DL ,(26)where indicates a Cartesian product. The L2 spatialinner product and norm are defined as

    , D =D

    dx , D =, D 0 , (27)

    where dx is a d-dimensional differential element.For such an inner product, it is true that

    d

    dt

    1

    22D = , tD , (28)

    where t and d/dt represent partial and total differ-entiation with respect to t, respectively.Integration by parts (or Greens first identity) may

    be written as

    ,D = ,D +D

    n d (29)

    where is the Laplacian operator in d dimensions, is the d-dimensional gradient, and where D is theboundary of the domain D, with outward normal n.3.2. Discrete Domains and Grid Functions

    An N + 1 point discrete 1D spatial domain dN cor-responding to the line segment DL may be definedas

    dN = {l Z, 0 l N} (30)for some integer N such that the grid spacing h =L/N . In a finite difference setting, other domainswhich differ from dN through the removal of endpointsare also of interest:

    dN = dN {N} , dN = dN {0, N} . (31)A 1D grid function unl , defined over l d, for some1D domain d, and for integer n represents an approx-imation to u(x, t) at t = nk and x = lh.Similarly, a 2D discrete domain dN,N corresponding

    to the square region DL,L may be written asdN,N = dN dN , (32)

    and truncated domains follow as

    dN,N = dN dN , dN,N = dN dN . (33)A 2D grid function unl,m, defined over (l,m) d, forsome 2D domain d, and for integer n represents anapproximation to u(x, y, t) at t = nk, x = lh andy = mh.

    5

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    3.3. Difference Operators

    The time difference and averaging operators presentedin Section 2.2 are unchanged in their application togrid functions.In 1D, unit rightward and leftward spatial shifts ex+

    and ex as applied to a grid function unl are defined

    as

    ex+unl = u

    nl+1 , exu

    nl = u

    nl1 . (34)

    Here and henceforth, a reference to a grid point out-side of the domain dN or dN,N indicates a "ghostpoint," the value of which will be set subsequentlyin terms of values over the interior through an appro-priate boundary condition.Forward, backward and centered difference approx-

    imations to a first spatial derivative may be definedin terms of these shifts as

    x+=ex+ 1

    h, x=

    1 exh

    , x=ex+ ex

    2h,(35)

    and centered approximations to second and fourthspatial derivatives as

    xx =ex+ 2 + ex

    h2(36a)

    xxxx =e2x+ 4ex+ + 6 4ex + e2x

    h4. (36b)

    Averaging operators may be defined as

    x+=ex+ + 1

    2, x=

    1 + ex2

    , xx=x+x . (37)

    In 2D, unit shifts ex+, ex, ey+, and ey as appliedto a grid function unl,m are defined as

    ex+unl,m = u

    nl+1,m exu

    nl,m = u

    nl1,m (38)

    ey+unl,m = u

    nl,m+1 eyu

    nl,m = u

    nl,m1 , (39)

    and first difference operators in both x and y maybe defined in analogy with (35) and second differenceoperators xx and yy with (36a). A simple approxi-mation to the Laplacian operator follows as

    = xx + yy . (40)

    3.4. Inner Products

    For 1D grid functions nl and nl , defined over a do-

    main d, an L2 inner product and norm may be definedas

    , d =ld

    hnl nl d =

    , d 0 . (41)

    For 2D grid functions nl,m and nl,m, defined over a

    domain d, the inner product and norm may be definedas

    , d =

    (l,m)d

    h2nl,mnl,m , d =

    , d 0 .(42)

    In both cases, other choices of inner products arepossible (perhaps scaling the boundary grid values byan appropriate amount, such as 1/2 in the 1D case).Distinct choices of inner product lead to distinct nu-merical boundary conditions, and the choice madehere is for simplicity only. See Section 5.2.9 of [17]for more on this point.

    3.5. Identities and Bounds

    The following identities hold for grid functions u de-fined over a domain d:

    u, tud = t 12u, etud (43)

    tu, ttud = t 12t+u2d , (44)

    where here, the spatial and temporal indices havebeen suppressed. Furthermore, the following inequal-ity holds:

    u, etud k2

    4tu2d . (45)

    Various discrete counterparts to integration by parts(29) are available; here are various forms of interest,written in terms of two grid functions nl and

    nl . In

    1D, one has:

    n, xxndN = x+n, x+ndN (46a)n0 xn0 + nNx+nN

    n, xxxxndN = xxn, xxndN (46b)n0 xxxn0 + x+n0 xxn0+nNx+xx

    nN xnNxxnN .

    In 1D, the action of spatial difference operators maybe bounded as

    xxudN 2

    hx+udN

    4

    h2udN . (47)

    Similarly, in 2D, summation by parts in the two di-rections x and y, may be written as

    n, xxndN,N = x+n, x+ndN,N (48a)

    +N

    m=0

    h2(nN,mx+

    nN,m n0,mxn0,m

    )n, yyndN,N = y+n, y+ndN,N (48b)

    +

    Nl=0

    h2(nl,Ny+

    nl,N nl,0ynl,0

    ),

    and the following bounds hold:

    x+udN,N , y+udN,N 2

    hudN,N . (49)

    See Chapter 5 of [17] for a fuller discussion of suchidentities and bounds.

    6

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    4. The Hammer-Linear String Inter-action

    The nonlinear interaction of a striking hammer with astring has seen a good deal of investigation [1], and anenergy conserving method (distinct from that whichfollows here) has been presented recently [15].Consider a stiff string in contact with a hammer

    striking from below, defined by

    sttu = Lsu+ gf , M d2uhdt2

    = f . (50)

    Here, u(x, t) is the transverse displacement of thestring in a single polarization, as a function of timet R+ and x DL as defined in (26), where L isthe string length. s is linear density in kg/m, and ttrepresents second partial differentiation with respectto time. For both members of (50), which are secondorder in time, initial conditions must specified (i.e.,u(x, 0), tu(x, 0), uh(0) and duh/dt(0)).f = f(t) is the force imparted to the string by a

    colliding hammer, of mass M and at vertical heightuh = uh(t), and where g = g(x) is a distribution se-lecting the region of impact of the hammer over thestring. For a pointwise impact at a location x = x0,one may use a Dirac distribution g(x) = (x x0),but for a hammer of finite width, a normalized distri-bution with

    DL

    gdx = 1 may be employed.

    The linear operator Ls in (50) is defined by

    Ls = TsxxEsIsxxxx2s,0st+2s,1stxx ,(51)

    where Ts is string tension in N , Es is Youngs modu-lus in Pa, Is is the moment of inertia of the string inm4 (and equal to pir4s/2 for a string of circular crosssection, where rs is the string radius), and s,0 0and s,1 0 are parameters allowing for frequencydependent losswhen s,0 = s,1 = 0, the system islossless. Such a system [38] is similar to that whichhas been used in models of lossy string vibration[39, 2], but without recourse to higher time deriva-tives. Boundary conditions of various types may beconsidered, but for the present investigation clampedconditions of the type

    u = 0 , xu = 0 (52)

    at the domain endpoints x = 0 and x = L are suffi-cient.The force f depends on a measure of distance

    between the string and the hammer:

    f =d

    d, = uh g, uDL . (53)

    The notation , DL represents an L2 inner productover DL, as defined in (27). (Note that if g representsa distribution such as a Dirac delta function, whichis not in L2, then the inner product above is to be

    interpreted as a duality pairing between a distributionand a test function which reduces to an L2 when gis square integrable.) Here again, () is a potentialfunction, typically modeled as a power law of the formof K, [2], with K and set from experiment; lossymodels, using a force term of the form given in (20)are also used in studies of hysteresis of the felt in pianohammers.

    4.1. Energy Balance

    The time derivative of the total energy of the com-bined string/hammer system may be derived by tak-ing an inner product of the first of (50) with tu overDL:

    stu, ttuDL = tu,LsuDL + tu, gDLf . (54)

    Using identities (28) and integration by parts (29),and noting from (53) that, for a fixed distribution g,

    tu, gDL =d

    dtu, gDL =

    d

    dt(uh ) , (55)

    then the following energy balance results:

    dHdt

    = Qs + BsL0

    , H = Hs +Hh . (56)

    Here, the string energyHs, hammer energyHh, powerdissipated in the string Qs and supplied at the bound-ary Bs are given by

    Hs = s2tu2DL+

    Ts2xu2DL+

    EsIs2

    xxu2DL(57a)

    Hh = M2

    (duhdt

    )2+ (57b)

    Qs = 2s,0stu2DL + 2s,1stxu2DL (57c)Bs = Tstuxu EsIstuxxxu (57d)

    +EsIstxuxxu+ s,1stutxu ,

    where Hs,Hh,Qs 0. Under the clamped conditions(52), Bs vanishes, and the system is strictly dissipa-tive, i.e., dH/dt 0. As the individual terms in theenergy balance are non-negative, it is again possibleto arrive at bounds on uh and u in terms of the totalenergy.

    4.2. Finite Difference Scheme

    Employing the difference operators mentioned in theprevious section, an approximation to (50) over thegrid dN , of spacing h, is then

    sttunl = lsu

    nl + glf

    n , Mttunh = fn , (58)

    where unl is a grid function approximating the stringdisplacement, and where unh and f

    n are time series ap-proximating the hammer displacement and force re-spectively. gl is an approximation to the spatial dis-tribution of the hammer. As in the continuous case,

    7

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    the grid function gl is chosen normalized such thatNl=0 hgl = 1.

    The operator ls is an approximation to Ls:

    ls = TsxxEsIsxxxx2s,0st+2s,1stxx(59)

    and the force f may be written in terms of a discretepotential n+

    12 as

    fn =t

    n+ 12

    tn, n = unh g, undN , (60)

    where n+12 = t+(

    n), and where , dN is a dis-crete 1D inner product, as defined in (42).

    Scheme (58) accompanied by (60), as in the case ofthe lumped collision, requires the solution of a scalarnonlinear equation of the form (17), in r = n+1 n1, where

    m = k2

    (g2dN

    s (1 + s,0k)+

    1

    M

    )a = n1 (61)

    b = 2(unh un1h ) +k2

    1 + s,0kg, ndN , (62)

    where

    nl =

    (2

    kt+

    TssxxEsIs

    sxxxx+2s,1txx

    )unl ,(63)

    which again possesses a unique solution. Notice in par-ticular that, given values of u and uh through timestep n, a and b may be computed explicitly, and thusonly a single scalar nonlinear equation must be solvedin order to solve for r; once r is known, fn may be cal-culated, and the scheme (58) may be advanced to timestep n+1. Such methods are similar in terms of com-putational expense to other methods which have beenproposed in the context of nonlinear acoustic simula-tion (such as, e.g. the K method [40], which also re-quire the solution of a nonlinear algebraic equation),but now with an energy-based stability condition.

    4.3. Numerical Energy and Stability Condi-tion

    An energy balance for scheme (58) follows from an in-ner product with tu, and using summation by partsidentities (46), as

    thn+ 1

    2 = qns bns,0 + bns,N , (64)

    where hn+12 , the total numerical energy is defined as

    h = hs + hh, and

    hn+ 1

    2s =

    s2t+un2dN +

    Ts2x+un, x+un+1dN (65a)

    +EsIs2

    xxun, xxun+1dN s,1ks

    2t+x+un2dN

    hn+ 1

    2

    h =M

    2(t+uh)

    2+n+

    12 (65b)

    qns = 2s

    (s,0tun2dN + s,1tx+un2dN

    )(65c)

    bns,0 = Tstun0xu

    n0 EsIstun0xxxun0 (65d)

    +EsIstx+un0 xxu

    n0 + 2s,1stu

    n0 txu

    n0

    bns,N = TstunNx+u

    nN EsIstunNx+xxunN (65e)

    +EsIstxunNxxu

    nN + 2s,1stu

    nNtx+u

    nN .

    Here, under (for example) discrete clamped bound-ary conditions

    un0 = x+un0 = 0 , u

    nN = xu

    nN = 0 , (66)

    then the system is numerically dissipative because(65d) and (65e) vanish. For numerical stability, allthat remains is to find a condition under which theenergy function is non-negativenotice that h

    n+ 12

    s isof indeterminate sign. To this end, using the inequal-ities (45) and (47), it may be bounded as

    hn+ 1

    2s

    (s2Tsk

    2

    h2 4EsIsk

    2

    h4 2s,1sk

    h2

    )t+un2dN .(67)

    For a given time step k, this term is non-negativeunder the condition h hmin, where

    h2min =Tsk

    2

    2s+ks,12

    +k

    2

    (Tsk

    s+4s,1

    )2+16EsIss

    ,(68)

    which serves as a stability condition for the completeschemeit is equivalent to the condition arrived atthrough frequency domain (von Neumann) analysis[22] for the string alone, though now under nonlin-ear conditions, and reduces to the familiar CourantFriedrichs Lewy condition [41] in the case of an ideallossless string.

    4.4. Simulations

    As a simple illustration of this scheme, the case of a C4piano string subject to a piano hammer striking actionis considered here, with parameters as drawn fromthe article by Chaigne and Askenfelt [37]. In Figure3, the force history of such a strike is plotted, underhammer velocities corresponding to piano, mezzoforteand forte strikes, illustrating the main features of ageneral decrease in contact time with increasing strikevelocity, and the appearance of secondary humps inthe force history, due to the reflection of waves fromthe string termination.More interesting, in the present context, are more

    delicate features due to hammer width, which can be

    8

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    0 0.5 1 1.5 2 2.5 30

    5

    10

    15

    20

    t (ms)

    f(N

    )

    hammer velocity 0.5 m/shammer velocity 1.5 m/shammer velocity 4 m/s

    Figure 3. Hammer force history f in N, for a struck string,under striking velocities, as indicated. Parameters corre-sponding to a C4 piano string are chosen: s = 0.0063kg/m, Ts = 670 N, Es = 2 10

    11 Pa, rs = 5 104 m,

    s,0 = 0.5 and s,1 = 0.5, and L = 0.62 m. The hammer,of massM = 0.0029 kg strikes pointwise at a position 0.12of the way along the string. The collision potential K,is used, with K = 4.5 109 and = 2.5. The sample rateis 44.1 kHz.

    modeled through a distributed contact region g; sucha choice has little impact on the computational cost ofthe algorithm, and subtle variations in the force his-tory can be observed with increasing contact width,as shown in Figure 4, where g is a simple rectangularwindow. One issue which emerges here is of the rep-resentation of such a function on a relatively coarsegridone solution is to operate at a high sample rate(here 176 kHz), leading to a sufficiently fine spatialgrid resolution; another is to employ a high order ap-proximation to such a finite width distribution overa coarse grid. The former approach has been adoptedhere.

    0 0.5 1 1.5 2 2.5 30

    5

    10

    15

    20

    t (ms)

    f(N

    )

    hammer width 3 mmhammer width 10 mmhammer width 20 mm

    Figure 4. Variations in hammer force history with hammerwidth. Here, the hammer interaction region g is modelledas a rectangular window, of width as indicated, and thestring is as in the caption to Figure 3, and the hammerstrikes with a velocity of 4 m/s. The sample rate is 176kHz.

    Numerical energy conservation is illustrated in Fig-ure 5, under lossless conditions; as in the case of thelumped collision, numerical energy is conserved to ma-chine accuracy (here double precision floating pointarithmetic).

    As a demonstration of the risk of not using a conser-vative method in modeling such collisions, consider acomparison between the results of the scheme (58) us-ing the numerically conservative force definition from(60), with a simpler non-conservative (and fully ex-plicit) scheme. The simplest possible design employs

    0 0.5 1 1.5 2 2.5 30

    0.01

    0.02

    0.03

    t (ms)

    Energy

    (J)

    string energyhammer energy

    0 0.5 1 1.5 2 2.5 310

    5

    0x 1015

    t (ms)

    Energy

    variation

    Figure 5. Top: time evolution of the energy partition be-tween the hammer and string, for the system as givenin the caption to Figure 3, under lossless conditions (i.e.,with s,0 = s,1 = 0). Bottom: normalized variation innumerical energy for the combined system.

    a calculation of fn from previously computed valuesas

    fn = K[unh un, gdN ]+ . (69)Even under mild hammer excitation conditions, thenon-conservative scheme can exhibit severe spuriousoscillations, as illustrated in Figure 6 under losslessand non-stiff conditions. The introduction of losses(or the reduction of the Courant number) always hasan ameliorating effect on such spurious oscillations,so the example described here is to be viewed as aworst case. Conservative methods represent a cautiousapproach to such designs (perhaps too much so inthe present case, but definitely of interest under morecomplex settings such as that of the snare drum, asdescribed in Section 8).

    0 0.5 1 1.5 2 2.5 30

    10

    20

    30

    t (ms)

    f(N

    )

    conservativenonconservative

    Figure 6. Force history, for the system as given in the cap-tion to Figure 3, under lossless and non-stiff conditions,and under a hammer velocity of 1.5 m/s, using a conser-vative scheme, and a nonconservative scheme.

    5. The Single Reed Wind Instrument

    The single reed instrument is an interesting caseof an excitation mechanism incorporating distinctnonlinearitiesone is the usual nonlinear pres-sure/flow relation in the mouthpiece [42], but effectsof collision of the reed with the lay also play a role.Reed-beating effects have been modelled by various

    9

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    authorsin some cases, a non-penetrative constraintis employed [43], and in others, some penetration isallowed [44]. A complete model requires a distributedmodel of the reed itself [45, 46]; only the lumped casewill be treated in this short section. A finite differencemodel of the reed/lay collision has been presented pre-viously (see Section 9.3.1 of [17]); in that case, how-ever, the collision was treated using ad hoc methods,and no stability condition was available. Here, the for-malism presented in the previous section, making useof a penalty potential is employed, leading to strictlydissipative numerical scheme.Consider an acoustic tube, of length L, and cross-

    section S(x), defined again over x DL. Here, x = 0corresponds to the mouthpiece termination, and x =L to the bell. Lossless wave propagation in a planarmode in the tube can be described by Websters equa-tion [47]:

    S

    c2tt = Lw , Lw = x (Sx ) , (70)

    where and c are air density in kg/m3 and soundspeed in m/s, respectively, and where here, (x, t),for x DL, and for t R+, is the velocity potentialin the tube. Acoustic pressure deviation p and volumevelocity u may be derived from as

    p = t , u = Sx . (71)In particular, pin = p(0, t), uin = u(0, t), pb = p(L, t),ub = u(L, t) are the pressure/volume velocity pairs atthe excitation and bell termination, respectively. Ina more realistic model, viscothermal boundary layerloss effects must be included, but will be neglectedhere.The reed is modelled as a second order oscillator in

    displacement z(t), for t R+, as

    Mrd2z

    dt2+ 2Mrr

    dz

    dt+Mr

    2rz = f Srp . (72)

    Here, Mr is reed mass, Sr is effective reed area, r aloss parameter, and r is reed angular frequency. Theforce term f is due to collision with the lay, located atz = H , whereH is the equilibrium distance betweenthe reed and lay, assumed constant here. It may bewritten as

    f =d

    dt/d

    dt, = z H , (73)

    for some potential (), such as = K,, whichmay be viewed as a penalty. p is a pressure differenceacross the reed, and may be written as

    p = pm pin , (74)where pm is the mouth pressure supplied by theplayer. Furthermore, from Bernoullis law, one has forthe flow um through the mouthpiece,

    um = w[]+

    2|p|

    sign(p) , (75)

    where w is the width of the reed channel, assumedconstant here, and where as before, []+ is the positiveclipping operator as described after (2). By conserva-tion of flow,

    ur = um uin , (76)where ur, the flow induced by the reed is given by

    ur = Srdz/dt (77)

    for an effective surface area Sr . This is distinct fromSr in general, but here, for brevity, we will takeSr = Sr (if they are distinct, all the subsequent en-ergy and stability analysis remains unchanged if (72)is multiplied by the scaling factor Sr/Srindeed, re-cent work indicates that Sr and Sr are identical [48]).The system as whole, for which the unknowns to be

    solved for are (x, t) and z(t), must be complementedby two initial conditions for each of these variables,namely (x, 0), t(x, 0), z(0) and dz/dt(0). Bound-ary conditions for at the domain endpoints will bespecified shortly.

    5.1. Energy Balance

    Through an inner product of Websters equation (70)with t, and employing integration by parts (29), anenergy balance for the acoustic tube may be writtenas

    dHwdt

    = Bw|L0 = pinuin pbub , (78)where

    Hw = 12c2

    St2DL +

    2Sx2DL . (79)

    In this simple study, effects of radiation at the bell areignored, so pb = 0; they may easily be incorporatedinto the analysis presented here (see Section 9.1.5 of[17]).Similarly, by multiplying (72) by dz/dt, and using

    (73) to (77), one may arrive at an energy balance forthe reed:

    dHrdt

    = Qr Qm pinuin + pmuin , (80)where Hr, Qr and Qm, all non-negative, are given by

    Hr = Mr2

    (dz

    dt

    )2+Mr

    2r

    2z2 + (81)

    Qr = 2Mrr(dz

    dt

    )2Qm = w[]+

    2

    |p|3/2 .(82)

    Combining (78) and (80) leads to the total energybalance

    dHdt

    = Qr Qm + pmuin , (83)where H = Hw + Hr is the total energy, again non-negative. Under undriven conditions, it is monotoni-cally decreasing; under usual playing conditions (i.e.,for pm 6= 0), there is a term corresponding to powersupply.

    10

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    5.2. Finite Difference Scheme

    For a grid function nl defined over l dN , a finitedifference approximation to (70) may be written as

    Slc2

    ttnl = lw

    nl , lw = x (x+Sx+ ) , (84)

    where Sl is derived from the continuous bore profileS(x), through sampling at locations x = lh, and us-ing the averaging operation as defined in (37), andwhere Sl = xxSl. Pressure and velocity pairs at themouthpiece and bell may be defined as

    pnin = tn0 u

    nin = xS0xn0 (85a)

    pnb = tnN u

    nb = x+SNx+nN , (85b)

    where the operations in the + and directions for thevelocity terms indicate approximations to derivativesnormal to the endpoints [17]. The assumption of pb =0 is enforced by setting nN = 0.The reed system (72) is approximated as

    Mrttzn+2Mrrtz

    n+Mr2rtz

    n = fnSrpn(86)

    in terms of time series zn, pn, and fn, defined by

    fn =t

    n+ 12

    t, n+

    12 = t+ (

    n) , (87)

    where n = zn H . Equations (74) to (76) remainas written, for time series pnin, u

    nm and p

    nm, which is as-

    sumed sampled from a given mouth pressure functionpm(t). Equation (77) may be approximated as

    unr = Srtzn . (88)

    In contrast with the case of the hammer string in-teraction, due to the presence of two distinct non-linearities, namely the Bernoulli effect and collision,there is now a pair of nonlinear equations to be solvedsimultaneously. To this end, note that when evaluatedat l = 0, the scheme (84) leads to an instantaneousrelationship between pnin and u

    nin:

    pnin = cn0 + c1u

    nin , (89)

    where c1 > 0 is a constant, and cn0 can be computed

    from values of through time step n.Using this relation, in conjunction with (86), (87),

    (88), as well as (74), (75) and (76), when viewed asrelations among time series, one arrives at the pair ofequations:

    G(rn) gpn = 0 , rn R(pn) = 0 , (90)

    with rn = n+1 n1, for a constant g > 0, andwhere

    G(rn) = rn + bn +m

    rn((rn + an) (an)) (91a)

    R(pn) = vn0 v1pnv2[n]+|pn|sign(pn) ,(91b)

    where here, the constantsm, v1 and v2 are all positive,and the values bn, an and vn0 can be computed directlygiven known values of the state through time step n.As previously, under a choice of penalty potential suchas = K,, this pair of equations admits a uniquesolution, as shown in Appendix A. At time step n,once rn and pn are determined, z

    n+1 and n+10 , maybe calculated directly, along with the remaining valuesof nl .An energy balance follows as in the continuous case

    as

    thn+ 1

    2 = qnr qnm + pnmunin , (92)

    where hn+12 = h

    n+ 12

    r + hn+ 1

    2w and where

    hn+ 1

    2w =

    1

    2c2St+2dN (93a)

    +

    2x+Sx+, et+x+dN

    hn+ 1

    2r =

    Mr2

    (t+zn)

    2+Mr

    2r

    2t+ (z

    n)2+n+

    12(93b)

    qnr = 2Mrr (tzn)

    2qnm=w[n]+

    2

    |pn|

    32 .(93c)

    Only hn+ 1

    2w is of indeterminate signas in the case

    of the hammer/string interaction, however, it may beshown to be non-negative (see Section 9.1.5 of [17])under the condition

    h ck , (94)which is again the Courant Friedrichs Lewy condition,now generalized to the case of Websters equationnotice in particular that it is independent of the boreprofile S, and is thus convenient to use in practice.

    5.3. Simulations

    As a simple test of this algorithm, consider a clarinet-like bore profile, as illustrated in the top panel of Fig-ure 7. In this case, the reed parameters are chosen asSr = 1.46104 m2, Mr = 3.37106 kg, r = 1500s1, r = 23250 s

    1, and where the equilibrium dis-tance H of the reed from the lay is 4 104 m andthe reed channel width is w = 0.01 m. Parameters forthe acoustic field are chosen as = 1.2 kg/m3 andc = 340 m/s. For the penalty potential, a choice of = K, is used, with = 1.3 and K = 10

    13. Bothnon-beating, and beating behaviour are shown; underthe beating conditions, and at a sample rate of 88.2kHz (this higher sample rate is used here for plot reso-lution), the maximum penetration of the reed into thebarrier over the duration of the simulation is 1.5108m. As a check on the use of such a penalty potentialfor a rigid collision, plots of reed displacement underdifferent choices of the penalty potential are shown inFigure 8. Rather complex multiple bounce patternsare evident, the character of which is retained regard-less of the choice of the exponent in the potential.

    11

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    0 100 200 300 400 500 60050

    0

    50

    x (mm)

    bore

    radiu

    s(m

    m)

    335 340 345 350 355 360 365

    0.4

    0.2

    0

    y(m

    m)

    t (ms)

    335 340 345 350 355 360 365

    0.4

    0.2

    0

    y(m

    m)

    t (ms)

    Figure 7. Top: clarinet-like bore profile. Middle: steady-state oscillation of the reed position y, under a mouthpressure of pm = 2000 Pa, for which the reed oscillateswithout beating against the lay (illustrated as a grey re-gion at y = 0.4 mm). Bottom: reed position under ahigher pressure of pm = 2500 Pa, illustrating beating ef-fects. The sample rate is 88.2 kHz.

    337 338 339 340 341 342

    0.4

    0.38

    = 1.3

    y(m

    m)

    t (ms)

    337 338 339 340 341 342

    0.4

    0.38

    = 1.8

    y(m

    m)

    t (ms)

    337 338 339 340 341 3421

    0

    1x 103

    difference

    (mm)

    t (ms)

    Figure 8. Detail of the collision interaction of the reed un-der beating conditions, using a penalty potential K,, forK = 1013 and for two different values of the exponent , asindicated, at top and middle. Bottom: difference betweenthe two simulation results, in mm.

    6. The String in Contact with a Dis-tributed Rigid Barrier

    In the previous examples, the colliding object, thoughoccupying a finite region, is best considered aslumpedthe nonlinear interaction force is a scalarfunction of time alone. In some settings, the inter-action force must also be modeled as distributed. Asimple example is the case of the string in contact witha rigid barrier. Though it is possible to perform a geo-metric analysis for the ideal string, defined by the 1Dwave equation, in contact with a barrier of specifiedshape [49, 50], for more realistic systems, time step-ping methods (including not just the FD schemes de-scribed here, but also methods such as digital waveg-uides [19]) are probably a necessity.Consider a stiff and lossy string, defined again over

    x DL, and for t R+, and in contact with a barrierbelow, located at height b(x). A model of this systemis

    sttu = Lsu+ F , (95)where string parameters and operator Ls are as for thesystem described in Section 4, and where F representsthe interaction force/unit length with the barrier. Asbefore, two initial conditions for u must be supplied,namely u(x, 0) and tu(x, 0). If the barrier is assumedto be perfectly rigid, F may be written in terms of apenalty potential density () as

    F = t/t , = b u . (96)A choice of of the form of a one-sided power lawsuch as = K, is a convenient choice.Through an inner product with tu, an energy bal-

    ance

    dHdt

    = Qs + BsL0

    , H = Hs+Hb (97)

    results, where Hs, Qs and Bs are as given in the caseof the hammer string interaction in (57), and wherethe interaction energy Hb is given by

    Hb =DL

    dx 0 , (98)

    and the system is thus strictly dissipative.

    6.1. Finite Difference Scheme

    A finite difference scheme, again defined over l dN ,follows for this system as

    sttunl = lsu

    nl + Fnl , (99)

    where the difference operator ls is as defined in (59),and where the force density Fnl is defined as

    Fnl =t

    n+ 12

    l

    tnl,

    n+ 12

    l =t+(nl ) ,

    nl =blunl .(100)

    12

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    The scheme satisfies an energy balance of the form

    thn+ 1

    2 = qns bns,0 + bns,N , (101)

    where hn+12 = h

    n+ 12

    s + hn+ 1

    2

    b with qns , b

    ns,0 and b

    ns,N

    are as in the hammer string interaction in (65), andwhere

    hn+ 1

    2

    b = n+12 , 1dN 0 , (102)

    where 1" indicates a grid function consisting of ones.Under lossless boundary conditions, the scheme is

    stable under the same condition as previously, namely(68).The scheme (101) now requires the solution of non-

    linear equations along the length of the string. Ifrl =

    n+1l n1l , then one must solve a set of equa-

    tions of the form of (17), i.e. Gl = 0, l dN , where

    Gl = rl +m

    rl((rl + al) (al)) + bl , (103)

    with

    m=k2

    s (1+s,0k), al=et

    nl , bl=

    k

    1+s,0knl , (104)

    where nl is as defined in (63). In this case, exis-tence and uniqueness follow immediately from thescalar case, as the nonlinear equations to be solvedare uncoupledwhich is not the case in more com-plex scenarios where two distributed objects are incontact. See Section 8.In this case, where the string and barrier are as-

    sumed perfectly rigid, the penalty formulation allowssome spurious penetration. This may be bounded, nu-merically, by noting that, because the barrier poten-

    tial hb satisfies 0 hn+12

    b hn+12 when the scheme is

    stable (i.e., under condition (68)), the penetration nlmay be bounded, at all times, by

    nl (2 (+ 1) h1/2

    Kh

    ) 1+1

    . (105)

    Thus the penetration is bounded in terms of the initialenergy, and, furthermore, can be made as small asdesired through the choice of K (within reasonseecomments in the Conclusion). In practice, this boundis in fact very conservativesee the comments at theend of Section 6.2.

    6.2. Simulations

    The collision of a string with a rigid barrier gives riseto a wide variety of complex phenomena. As a simpleexample, consider a string vibrating against a rigidbarrier of parabolic shape, as illustrated in Figure 9.(The parabolic shape has been used in previous stud-ies of string collision [49, 19] as a rough approximationto a bridge termination in various instruments such asthe sitar or tambura; an exaggerated profile has been

    chosen, for illustration). In this case, the string is ini-tialized using a triangular distribution. The potentialK, is employed here, with K = 10

    13 and = 1.3.

    Plots of the time evolution of the string are shownin Figure 9. Notice in particular the intermittent con-tact/recontact phenomena in evidence over the col-lision region, signaling that analysis or synthesis ap-proaches based on a model of such a colliding string interms of a moving end point may pose some difficul-ties, due to the non-contiguity of the freely vibratingportions of the string [49, 11].

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =0ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =0.5ms

    0 0.2 0.4 0.610

    0

    10

    x (m)u(m

    m)

    t =1ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =1.5ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =2ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =2.5ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =3ms

    0 0.2 0.4 0.610

    0

    10

    x (m)

    u(m

    m)

    t =3.5ms

    Figure 9. Snapshots of the time evolution of a vibratingstring in partial contact with a barrier of parabolic shape(in grey). The string is considered to be non-stiff, of lengthL = 0.62 m, with s = 6.3 g/m, Ts = 670 N, s,0 = 0 and1,0 = 5 10

    4, and is initialized in a triangular shapecorresponding roughly to a plucked excitation. The samplerate is 88.2 kHz, so that fine features of the interaction maybe observed.

    One perceptual effect of termination against such asmooth obstacle is an effective change in pitch withamplitude. This is illustrated in Figure 10, showingoutput spectra under triangular initial conditions ofdifferent amplitudes. As amplitude is increased, thespectral peaks migrate towards the higher frequen-cies, reflecting an effective shortening of the vibratingportion of the string, accompanied by a broadeningof the peaks due to the nonlinear interaction. Underlossy conditions, one may expect pitch glide phenom-ena to occur.

    Interesting from a numerical perspective, given theuse of a penalty based approach to rigid collision as

    13

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    0 200 400 600 800 1000 120080

    60

    40

    20

    0

    20

    40

    f (Hz)

    |uo|(dB)

    umax = 0.1 mmumax = 1 mmumax = 10 mm

    Figure 10. Spectrum of string response, for the string col-lision as in Figure 9, under lossless conditions, and undera triangular excitation of amplitude as indicated.

    employed here are questions of the amount of pene-tration, and also of convergence to an exact solutionacross a range of different choices of the penalty po-tential itself. See Figure 11, showing the preservationof fine features of the string profile, after undergoing acollision with the barrier for different values of ; thedifference between the two simulations is also shown,which is small, and has an oscillatory character (as isto be expected) concentrated near the barrier interac-tion region. For = 1.3, and under these conditions,the maximum penetration of the string into the obsta-cle can be bounded, from (105), by nl 2.6105 m.In fact, this bound is rather conservativefor the sim-ulation results shown in Figure 9, the maximum pen-etration over all grid locations, and over the length ofthe simulation is under 3 microns. It should be notedthat it is not claimed here that the existence of an ex-act solution to the model problem has been provedrather, it is illustrated that differences among solu-tions become small, independently of the parameterswhich define the collision, for sufficiently large valuesof the stiffness K when a rigid barrier is considered.

    0 0.1 0.2 0.3 0.4 0.5 0.621

    01

    x (m)

    u(m

    m)

    =1.3

    0 0.1 0.2 0.3 0.4 0.5 0.60.05

    0

    0.05

    x (m)

    difference

    (mm)

    0 0.1 0.2 0.3 0.4 0.5 0.621

    01

    x (m)

    u(m

    m)

    =1.5

    Figure 11. String profile, for the string collision as in Fig-ure 9, after 2.5 ms, under a penalty potential K, withK = 1013, and for two different values of as indicated,as well as the difference between the two simulations.

    7. The Mallet-Membrane Interaction

    The interaction of a mallet with a membrane is a gen-eralization to 2D of the hammer string interaction de-scribed in Section 4, and may be written as

    mttw = Lmw gf , M d2whdt2

    = f . (106)

    Here, w = w(x, y, t) is the transverse displacement ofa square membrane, defined for coordinates (x, y) DL,L, and for t R+. m is membrane density, inkg/m2, and g = g(x, y) represents the region of con-tact between the mallet and the membrane, again nor-malized such that

    DL,L

    gdxdy = 1. wh represents the

    vertical position of the mallet, of mass M . The oper-ator Lm, incorporating effects of tension and simplefrequency-independent loss, is defined as

    Lm = Tm 2m,0mt , (107)where here, is the Laplacian operator, defined by

    =2

    x2+

    2

    y2, (108)

    and where Tm is the membrane tension/unit lengthand m,0 is a loss parameter. The operator in (107)may easily be extended, as in the case of the string,to include effects of stiffness and frequency-dependentloss; these terms will be neglected here for the sake ofbrevity. Boundary conditions are assumed to be offixed type:

    w = 0 over DL,L , (109)where DL,L is the boundary of DL,L. As in previouscases, the system (106) must be complemented by twoinitial conditions each for w and wh, namely w(x, y, 0),tw(x, y, 0), wh(0) and dwh/dt(0).The mallet force f acting from above is defined as:

    f =d

    d, = g, wDL,L wh , (110)

    where , DL,L represents a 2D inner product over thedomain DL,L, and where 0 is again a one-sidedpotential function, sometimes chosen [4] as a powerlaw nonlinearity of the form K,.The expression for conserved energy is directly gen-

    eralized from that of the hammer string system, as:

    dHdt

    =Qm +DL,L

    Bm , H=Hm +Hh . (111)

    Here,

    Hm = m2tw2DL,L +

    Tm2w2DL,L (112a)

    Hh = M2

    (dwhdt

    )2+ (112b)

    Qm = 2m,0mtw2DL,L (112c)Bm = Tmtwn w , (112d)

    where n represents a vector normal to the boundary.Under lossless boundary conditions (such as the fixedcondition given in (109)), the system is dissipative.

    14

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    7.1. Finite Difference Scheme

    The scheme, which is a direct extension of that of thehammer/string system, can be presented briefly here:

    mttwnl,m = lmw

    nl,m gl,mfn Mttwnh = fn , (113)

    where wnl,m, wnh and f

    n are approximations to w (nowdefined over the 2D discrete domain dN,N), wh andf , respectively, and where lm is an approximation toLm:

    lm = Tm 2m,0mt (114)and the force f may be written in terms of a discretepotential n+

    12 as

    fn =t

    n+ 12

    tn, n = g, wndN,Nwnh ,(115)

    where n+12 = t+(

    n).As previously, updating scheme (113) requires the

    solution of a nonlinear equation of the form (17),where

    m = k2

    ( g2dN,Nm (1 + m,0k)

    +1

    M

    )a = et

    n (116)

    b = 2ktwnh

    2k

    1+m,0kg,(t+

    kTm2m

    )wndN,N .

    The energy balance is now, after taking an innerproduct over dN,N with tw, and using (48),

    thn+ 1

    2 = qnm +

    (x,y)dN,N

    bnm,x,y , (117)

    where dN,N indicates the set of grid points lying on

    the boundary of dN,N . hn+ 1

    2 , the total numerical en-ergy is defined as h = hm + hh, where

    hn+ 1

    2m =

    m2t+wn2dN,N + (118a)

    Tm2

    (x+wn, x+wn+1dN,N + y+wn, y+wn+1dN,N )hn+ 1

    2

    h =M

    2(t+wh)

    2+n+

    12 (118b)

    qnm = 2m,0mtwn2dN,N (118c)bnm,x,y = Tmtw

    nx,yb+w

    nx,y . (118d)

    Here, the notation b+ indicates a spatial first differ-ence operation in the direction normal to the bound-ary. At corner points in the domain dN,N , it is to beapplied in both directions and summed. Under thecondition that wnl,m is zero at the boundary, corre-sponding to a fixed termination (109), the system isagain dissipative.A stability condition for scheme (113) follows again

    from the non-negativity of hm. Using bounds (45) and(49) leads to the condition

    h hmin = k

    2Tmm

    , (119)

    which is the same as the bound obtained using fre-quency domain techniques for the membrane schemein isolation.

    7.2. Simulations

    In this section, the results of a simulation for a squaremembrane are shown, corresponding roughly to a typ-ical drum configuration. Force histories are shown inFigure 12 at top, illustrating again the decrease incontact duration with mallet velocity, and at middleand bottom, the energy partition between the mal-let and membrane, as well as the normalized energyvariation are shown. The variation in the energy iscompounded by the number of degrees of freedom ofthe system, which is considerably larger than in theprevious cases.

    0 2 4 6 8 10 120

    50

    100

    150

    t (ms)

    f(N

    )

    mallet velocity 1 m/smallet velocity 5 m/smallet velocity 10 m/s

    0 2 4 6 8 10 120

    1

    2

    3

    t (ms)

    Ener

    gy

    (J)

    membrane energy mallet energy

    0 2 4 6 8 10 12

    2

    0

    2

    x 1014

    t (ms)

    Ener

    gy

    vari

    ati

    on

    Figure 12. Top: Force experienced by a mallet, of mass0.028 kg, and with stiffness parameters K = 1.6108 and = 2.54, striking a membrane under different velocities,as indicated. The membrane, of dimensions 0.6 0.6 m,with m = 0.26 kg/m

    2 and Tm = 3325 N/m, is struck ata location 0.1 m from a corner. Middle: Energy partition.Bottom: normalized energy variation. The sample rate is22.05 kHz.

    8. Fully Distributed Interaction

    The methods described in the previous sections canalso be applied to more complex scenarios involvingdistributed coupling between multiple dynamic ob-jects. In this section, the collision of an ideal stringwith a membrane is described, with an eye towardsfull simulation of the snare drum, which will be brieflyoutlined.

    8.1. The String/Membrane Collision

    Consider the system of an interacting string and mem-brane, defined over the regions DLs and x =(x, y) DLm,Lm , and with transverse displacements

    15

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    u = u(, t) and w = w(x, t), for t R+. The equa-tions of motion are:

    mttw = Lmw+ g,FDLs sttu = LsuF .(120)

    The operators Lm and Ls have been introduced in(107) and (51), respectively. As previously, two ini-tial conditions must be supplied for each of u and w,namely w(x, y, 0), tw(x, y, 0), u(, 0) and tu(, 0).The collision force density F is again a distributedfunction F = F(), and the contribution of F tothe membrane equation must be integrated along thedomain of interaction with the string with a suitabledistribution function. The simplest possible choice isprobably g = (x pi()), where pi : DLs DLm,Lmis the projection from each point of the string to thecorresponding point on the membrane and is a 2DDirac delta function. As before, F may be related to apotential = (()), which depends on the distance between the string and membrane over the regionof interaction:

    F = tt

    , = u g, wDLm,Lm

    . (121)

    Once again, one can derive an expression for energywhich is conserved in the lossless case.

    8.2. Finite Difference Scheme

    A finite difference approximation for (120) and (121)can be written as follows:

    mttwnl,m = lmw

    nl,m + (ismFn)l,m (122a)

    sttunl = lsu

    nl Fnl (122b)

    in terms of grid functions unl , defined over dNs , andwnl,m over dNm,Nm , where Fnl , may be written as

    Fnl =t

    n+ 12

    l

    tnl, nl = u

    nl (imswn)l . (123)

    Here, integrals have been expressed as linear opera-tors:

    g, dNs = ism, g, dNm,Nm = ims . (124)

    Ultimately, the finite difference scheme can be up-dated by solving a non-linear equation in the vectorr:

    G(r) = r+M + b = 0 , (125)

    with the elements of r and given by

    rl = n+1l n1l , l =

    (rl + al) (al)rl

    . (126)

    As before, al = etnl and b depend only on known

    values of w and u. In contrast with the previous cases,

    values of the solution r are now coupled by the pres-ence of a square matrix M defined as:

    M =

    (k2

    s(1+s,0k)1+

    k2

    m(1+m,0k)ImsIsm

    ),(127)

    where 1 represents the identity matrix. Ism and Imsare the matrix forms of the operators ism and ims,respectively, and are required to be the transposes ofone another for energy conservation reasons (see Sec-tion 5.2.4 of [17]). Therefore, M is positive definite,which guarantees existence and uniqueness of the so-lution (see Appendix A). ) The size of M is the sameas the number of points in the snare involved in thecollisions with the membrane. For example, a string of25 cm with a typical grid spacing of 5 mm requires 51points. In a snare drum simulation (see below), thisnumber must be multiplied by the total number ofsnares (generally 10-20).

    8.3. Boundary conditions

    Boundary conditions for the membrane have been dis-cussed in Section 7. For the string, one possibility isto use fixed termination at both ends. In real snaredrums, however, the snares are held in contact withthe membrane by two bridges attached to the rim ofthe drumhead. In a numerical simulation, this com-plex termination can be modelled, as a first crudeapproximation, by attaching the strings directly tothe membrane. In this case, additional force terms re-solved at the boundaries of the string must be addedto the equation for the membrane:

    mttwnl,m = lmw

    nl,m + g

    (0)l,mf

    (0) + g(Ls)l,m f

    (Ls) (128)

    +(ismFn)l,m ,

    where g(0) and g(Ls) are suitable distribution func-tions (e.g., 2D Dirac delta functions) for = 0, Ls.Energy analysis can be applied to find stable bound-ary conditions at = 0 (and similarly at = Ls):

    u0 =g(0), w

    dNm,Nm

    (129)

    f (0) = (Ts EsIs + 2s,1st)u0 .

    The first condition is that displacements are equal atthe snare endpoint and the point on the membrane towhich is connected, and the second that the force ex-erted on the membrane is equal and opposite to thatexerted on the end of the snare. Under these condi-tions, the scheme as a whole is dissipative, and stableunder the separate conditions (68) and (119). The ex-pression for matrixM in (127) is slightly altered, butremains positive definite.

    8.4. Case Study: The Snare Drum

    In this section, an application to the simulation ofthe snare drum is briefly outlined. The snare drum

    16

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    is double-headed, with the distinguishing feature of aset of snares (metal wires) in contact with the lowermembrane, which gives this instrument its character-istic rattling sound.

    Finite difference time domain simulation of thesnare drum has been presented previously [5]; in thatcase, however, the collision of the snares with themembrane was treated using ad hoc methods, andno stability condition was available. Here, again, thepenalty potential formalism described in the previoussections is extended to handle this more complex case,including the interaction between the mallet and theupper membrane, leading to a provably stable algo-rithm.

    A simple model of the snare drum consists of twocircular membranes with fixed boundary conditions,coupled by a rigid cavity and immersed in a box ofair, with a set of snares in contact with the lowermembrane (see Figure 13). The system can be ex-cited through a mallet acting on the upper membrane.Absorbing conditions are applied at the walls of theenclosure, ideally simulating an anechoic space.

    The approach described above may be applied tothe mallet-membrane interaction and to the snarescolliding against the membrane, in order to obtain afully energy conserving model. Figure 14 shows somesnapshots of the time evolution of the system, subjectto an initial strike on the upper membrane. The delayin the excitation caused by the air inside the cav-ity on the lower membrane is apparent. The snaresare launched by the contact with the lower mem-brane; though the movement is at first coherent, it israpidly randomized through multiple collisions. Fig-ure 15 shows the contributions to total energy of thevarious components, with normalized energy varia-tions on the order of machine accuracy.

    Figure 13. Diagram of snare drum geometry, illustratingthe various components. A finite enclosure with absorbingconditions at the walls surrounds the system.

    Figure 14. Snapshots of the evolution of the snare drumsystem at times as indicated. Displacements have beenscaled for illustration purposes. The sample rate is 48 kHz.

    0 10104103102101100

    t (ms)

    Energ

    y(J

    )

    0 104

    0

    4x 1014

    t (ms)

    Energ

    yvari

    ati

    on

    Figure 15. Top: energy partition among the various com-ponents of the snare drum (solid line: upper membrane,bold dashed: mallet, dotted: lower membrane, dashed:air, dot-dashed: snares). Bottom: normalized energy vari-ations.

    9. Concluding Remarks

    This article has explored basic features of time do-main numerical simulation of collision interactionsin musical instruments, with a focus on an energy-

    17

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    conserving (and more generally passive) formulations,within which the collision mechanism may be includedthrough an added potential; such a formulation al-lows for the stable simulation of a wide range of col-lision interactions in musical instruments. It is hopedthat such techniques will aid in the investigation offiner features in musical instrument acoustics. From asound synthesis perspective, one issue which has notbeen touched upon here is aliasingalways present innonlinear models, but somewhat alleviated by physi-cal damping.

    When the colliding objects are assumed to be rigid,the potential has the interpretation of a penalty. Ashas been shown at various instances, a penalty for-mulation of rigid collisions does lead to spurious pen-etration, but generally this is very small by the stan-dard of acoustics applicationsfurthermore, there issome degree of control over the amount of penetra-tion, which may be conveniently bounded, provideda numerical energetic framework is available. Undercontinuously forced conditions (as in, e.g., the case ofthe lip/reed mechanism), however, a bound is not im-mediately available; though a bound on penetrationat a given instant can surely be written in terms ofthe total power supplied up until that instant, a tightbound is not immediately apparent, and it would beof interest to find such a bound. Another aspect wor-thy of further study is the particular choice of sucha penalty; a power law has been used here, for sim-plicity, but many others are available, perhaps withsuperior properties in terms of the reduction of spu-rious penetration.

    The formulations presented here require the solu-tion of nonlinear equations in the main update. Ifthe colliding object is lumped, as in the case of thehammer/string, mallet/membrane and reed interac-tions then a single equation to be solved results. Forfully distributed collisions between two deformableobjects, the solution to a system of coupled equa-tions is required. In all cases examined here, however,the system to be solved possesses a unique solutionsee Appendix A. The Newton Raphson method hasbeen employed here in order to solve such nonlin-ear equations. One aspect of such iterative methodswhich has not been addressed here is convergence,even though a unique solution exists. The NewtonRaphson method employed here has in all cases led toconvergence (easily observed by energy conservationto machine accuracy), but as yet its convergence re-mains unproven for the systems examined here. Somepartial results, however, are availablesee AppendixA. Newton Raphson, however, is but one method ofsolutionmany others are available [51]. Useful also,here, would be bounds on the number of required it-erations. This is particularly important in the case ofrigid collisionthough penetration bounds have beenrepeatedly shown here, these depend on the collisionstiffness Kand indeed, there is a link between in-

    creased stiffness and and increase in the number ofrequired iterations, though it is not fully clear atpresent.Though the energy-conserving framework presented

    here has been applied to the case of finite differencetime domain methods, one might suspect that it ap-plies more generally in different formulations which ul-timately reduce to time stepping methods (includingtime domain finite element methods, spectral meth-ods, as well as modal techniques), though over moregeneral basis functions. Various references are avail-able [52, 53] giving an overview of such families ofnumerical techniques. Another interesting choice inthe interest of efficiency, particularly for synthesisapplications, might involve digital waveguides [23]interesting recent work by Kartofelev et al. [19], deal-ing with the string/barrier problem indicates at leasta partial affirmative answer in the case of an idealnon-stiff string. Such choices will form the basis offuture investigations.Finally, it should be stated clearly that such energy-

    conserving formulations do come at a costnamelythe use of an iterative solver; though relatively mi-nor in the case of lumped collisions, where there isa single nonlinear equation to be solved (or two, inthe case of the beating reed), in the distributed case,and for rigid collisions, the expense incurred is largeleading to perhaps a 10-20 fold increase in the opera-tion count, if a rigid collision interaction is the domi-nant cost. Simpler, fully explicit ad hoc methods areavailable, and can perform very well, again particu-larly in the case of lumped collisions. In the case offully distributed collisions, however, it appears to bethe case that the greater the complexity of the system,the greater the risk of instability using such methods,with the snare drum presented here as an extremeexample. For such systems, the observation of an en-ergy balance would appear to be at least one way ofarriving at well-behaved designs.

    A. Nonlinear Equations: Exis-tence/Uniqueness and Conver-gence

    The solution of the nonlinear equation G(r) = 0, forG(r) as defined in (17), as well as several variants,plays a key role in all of the algorithms described here.It is thus worth outlining here some properties of suchequations, especially with regard to the existence anduniqueness of solutions, as well as the convergence ofthe Newton Raphson method.It has recently been shown [14] that the equation

    G(r) = 0, forG(r) as defined in (17) has a unique solu-tion in r. The essence of the proof is that for a differen-tiable and convex potential , G(r) is non-negative,and bounded away from zero, and thus G(r) = 0 pos-sesses a unique solution. In particular, G(r) 1. Thepower law potential K, is convex and differentiable,

    18

  • Bilbao, Torin, Chatziioannou: Numerical Modeling of Collisions ACTA ACUSTICA UNITED WITH ACUSTICAVol. 98 (2012)

    and thus the numerical methods here that rely on thesolution of such an equation, namely the collisions de-scribed in Sections 2, 4, 6 and 7, admit a unique up-date.The Newton Raphson method can be shown to

    be globally convergent, independent of the startingpoint r, if G(r) is itself convex [54]. Indeed, 2,G(r) = mr3P (r) where P (r) = r

    2(r+a)2r(r+a)+2(r+a)2(a). Now, P (r) = r2(r+a) 0,since K, is convex, hence P (r) is a monotonicallyincreasing function passing through the origin, whichresults in G(r) 0 (which also holds in the limitr 0). When 1 < < 2, ceases to exist forcertain values of r and a. In this case only local con-vergence can be guaranteed, subject to a good initialguess r, which is ensured in practice by choosing theprevious value of r.The case of the beating reed requires the solution

    of a pair of nonlinear equations, as given in (90), withthe functions G and R as defined in (91). First, notethat R is one-to-one, thus possessing an inverse R1,so system (90) may be condensed to

    J(rn) = G(rn) gR1(rn) = 0 . (130)Note that R is negative, and bounded between v1and . and thus (R1) is also negative, andbounded between 0 and 1/v1. Because g > 0, andG 1, J 1, and the system possesses a uniquesolution. It is not, however, convex, and a simple con-clusion regarding the convergence of Newton Raphsonis not easily arrived at.Finally, consider the vector system of non-

    linear equations arising in the case of dis-tributed/distributed interaction in (125). BecauseM > 0, the system to be solved is equivalent to

    G(r) =M1r+ +M1b = 0 . (131)

    The system possesses a unique solution if the Jacobianof G is positive definite. The Jacobian is M1 + ,where is a diagonal matrix, the diagonal entriesof which are the derivatives of the components of which are individually non-negative, and is thus pos-itive semi-definite. Thus the Jacobian is positive def-inite.

    Acknowledgment

    This work was supported by the European ResearchCouncil, under grant number StG-2011-279068-NESS.

    References

    [1] X. Boutillon: Model for piano hammers: Experimen-tal determination and digital simulation. J. Acoust.Soc. Am. 83 (1988) 746754.

    [2] A. Chaigne, A. Askenfelt: Numerical simulations ofstruck strings. I. A physical model for a struck stringusing finite difference methods. J. Acoust. Soc. Am.95 (1994) 11121118.

    [3] A. Chaigne, V. Doutaut: Numerical simulations ofxylophones. I. Time domain modeling of vibratingbars. J. Acoust. Soc. Am. 101 (1997) 539557.

    [4] L. Rhaouti, A. Chaigne, P. Joly: Time-domain mod-eling and numerical simulation of a kettledrum. J.Acoust. Soc. Am. 105 (1999) 35453562.

    [5] S. Bilbao: Time domain simulation of the snare drum.J. Acoust. Soc. Am. 131 (2012) 914925.

    [6] C. Vyasarayani, S. Birkett, J. McPhee: Modelingthe dynamics of a vibrating string with a finitedistributed unilateral constraint: Application to thesitar. J. Acoust. Soc. Am. 125 (2010) 36733682.

    [7] G. Evangelista: Physical model of the string fret inter-action. Proc. Int. Conf. Digital Audio Effects, Paris,France, Sept. 2011, 345351.

    [8] D. Marhefka, D. Orin: A compliant contact modelwith nonlinear damping for simulation of robotic sys-tems. IEEE Trans. Systems, Man and CyberneticsPart A: Systems and Humans 29 (1999) 566572.

    [9] D. Baraff: Fast contact force computation for non-penetrating rigid bodies. Computer Graphics Proc.,Orlando, Florida, July 1994, 2334.

    [10] P. Wriggers, T. Laursen: Computational contact me-chanics. Springer-Verlag Vienna, 2008, 1255.

    [11] A. Krishnaswamy, J. O. Smith III: Methods for sim-ulating string collisions with rigid spatial obstacles.IEEE Workshop on Appl. of Siqnal Processing to Au-dio and Acoust., New Paltz, New York, October 2003,233236.

    [12] F. Avanzini, D. Rocchesso: Modeling collision sounds:Nonlinear contact force. Proc. Int. Conf. on DigitalAudio Effects, Limerick, Ireland, December 2001, 6166.

    [13] S. Papetti, F. Avanzini, D. Rocchesso: Numericalmethods for a nonlinear impact model: A compara-tive study with closed-form corrections. IEEE Trans.on Audio Speech and Language Processing 19 (2011)2933.

    [14] V. Chatziioannou, M. van Walstijn: An energy con-serving finite difference scheme for simulation of colli-sions. Proc. Stockholm Musical Acoust. Conf., Stock-holm, Sweden, 2013.

    [15] J. Chabassier: Modeling and numerical simulation ofthe piano through physical modeling. Dissertation.Ecole Polytechnique, Paris, France, 2012.

    [16] J. Chabassier, A. Chaigne, P. Joly: Modeling and sim-ulation of a grand piano. J. Acoust. Soc. Am. 134(2013) 648665. DOI: 10.1121/1.4809649.

    [17] S. Bilbao: Numerical sound synthesis. John Wileyand Sons, Chichester, UK, 2009, 1456.

    [18] S. Siddiq: A physical model of the nonlinear sitarstring. Arch. Acoust. 37 (2012) 7379.

    [19] D. Kartofelev, A. Stulov, H.-M. Lehtonen, V.Vlimki: Modeling a vibrating string terminatedagainst a bridge with arbitrary geometry. Proc.Stockholm Musical Acoust. Conf., Stockholm, Swe-den, August 2013.

    [20] J. Bensoam: A reciprocal variational approach to thetwo-body frictionless contact problem in elastody-namics. Int. J. of Mech. Sci. 45 (2010) 15301535.

    [21] T. Hughes, R. Taylor, J. Sackman, A. Curnier, W.Kanoknukulchai: A finite element method for a classof contact-impact problems. Comp. Meth. Appl.Mech. Eng. 8 (1976) 249276.

    19

  • ACTA ACUSTICA UNITED WITH ACUSTICA Bilbao, Torin, Chatziioannou: Numerical Modeling of CollisionsVol. 98 (2012)

    [22] J. Strikwerda: Finite difference schemes and partialdifferential equations. SIAM, Philadelphia, 2004, 1435.

    [23] J. O. Smith III: Physical audio signal procesing. Stan-ford, CA, 2004. Draft version. Available online athttp://ccrma.stanford.edu/jos/pasp04/.

    [24] J.-M. Adrien: The missing link: Modal synthesis. In: Representations of Musical Signals. G. DePoli,A. Picialli, C. Roads (eds.). MIT Press, Cambridge,Massachusetts, 1991, 269297.

    [25] B. Bank, L. Sujbert: Generation of longitudinal vi-brations in piano strings: From physics to sound syn-thesis. J. Acoust. Soc. Am. 117 (2005) 539557.

    [26] O. Thomas, C. Touz, A. Chaigne: Non-linear vibra-tions of free-edge thin spherical shells: Modal interac-tion rules and 1:1:2 internal resonance. Int. J. Solidsand Structures 42 (2005) 33393373.

    [27] D. Greenspan: Conservative numerical methods forx = f(x). Journal of Computational Physics 56(1984) 2841.

    [28] E. Vouga, D. Harmon, R. Tamstori, E. Grinspan:Asynchronous variational contact mechanics. Comp.Meth. Appl. Mech. Eng. 8 (2010) 249276.

    [29] J. Simo, N. Tarnow, K. Wong: Exact energy-momentum conserving algorithms for symplecticschemes for nonlinear dynamics. Comp. Meth. Appl.Mech. Eng. 100 (1992) 63116.

    [30] D. Harmon: Robust, efficient, and accurate contactalgorithms. Dissertation. Columbia University, 2010.

    [31] R. Fetecau, J. Marsden, M. Ortiz, M. West: Nons-mooth lagrangian mechanics and variational collisionintegrators. SIAM J. Appl. Dyn. Sys. 2 (2003) 249276.

    [32] P. Joly, L. Rhaouti: A qualitative analysis of a sim-plified model for the nonlinear membrane-mallet in-teraction. Tech. Rept. RR-3234, INRIA, 1997.

    [33] G. Horvay, A. Veluswami: Hertzian impact of twoelastic spheres in the presence of surface damping.Acta Mechanica 35 (1980) 285290.

    [34] H. Goldstein: Classical mechanics. Pearson Educa-tion, 2002.

    [35] K. Hunt, F. Crossley: Coefficient of restitution inter-preted as damping in vibroimpact. ASME J. Appl.Mech. (June 1975) 4405.

    [36] A. Stulov: Dynamic behavior and mechanical featuresof wool felt. Acta Mechanica 169 (2004) 1321.

    [37] A. Chaigne, A. Askenfelt: Numerical simulations ofstruck strings. II. Comparisons with measurementsand systematic exploration of some hammer-stringparameters. J. Acoust. Soc. Am. 95 (1994) 163140.

    [38] J. Bensa, S. Bilbao, R. Kronland-Martinet, J. O.Smith III: The simulation of piano string vibration:From physical models to finite difference schemes anddigital waveguides. J. Acoust. Soc. Am. 114 (2003)10951107.

    [39] P. Ruiz: A technique for simulating the vibrationsof strings with a digital computer. Diploma Thesis.University of Illinois, 1969.

    [40] G. Borin, G. D. Poli, D. Rochesso: Elimination ofdelay-free loops in discrete-time models of nonlinearacoustic systems. IEEE Transactions on Speech andAudio Processing 8 (2000) 597605.

    [41] R. Courant, K. Friedrichs, H. Lewy: On the partialdifferential equations of mathematical physics. Math-ematische Annalen 100 (1928) 3274. In German.

    [42] T. Wilson, G. Beavers: Operating modes of the clar-inet. J. Acoust. Soc. Am. 64 (1974) 15661569.

    [43] P. Guillemain: A digital synthesis model of double-reed wind instruments. EURASIP J. Appl. Sig. Proc.2004 (2004) 9901000.

    [44] S. Karkar, C. Vergez, B. Cochelin: Numerical toolsfor musical instruments acoustics: Analysing nonlin-ear physical models using continuation of periodic so-lutions. Proc. Acoustics 12, Nantes, France, April2012.

    [45] S. Stewart, W. Strong: Functional model of a simpli-fied clarinet. J. Acoust. Soc. Am. 68 (1980) 109120.

    [46] F. Avanzini, M. van Walstijn: Modeling the mechan-ical response of the reed-mouthpiece-lip system of aclarinet. Part I. A one-dimensional distributed model.Acta Acustica united with Acustica 90 (2004) 537547.

    [47] P. Morse, U. Ingard: Theoretical acoustics. PrincetonUniversity Press, Princeton, New Jersey, 1968, 1927.

    [48] M. van Walstijn, F. Avanzini: Modeling the mechani-cal response of the reed-mouthpiece-lip system of aclarinet. Part II: A lumped model approximation.Acta Acustica united with Acustica 93 (2007) 435446.

    [49] J. K. R. Burridge, C. Morshedi: The sitar string, avibrating string with a one-sided inelastic constraint.SIAM J. Appl. Math. 42 (1982) 12311251.

    [50] M. Schatzman: A hyperbolic problem of second orderwith unilateral constraints: The vibrating string witha concave obstacle. J. Math. Anal. Appl. 73 (1980)138191.

    [51] C. Kelley: Iterative methods for linear and nonlinearequations. SIAM, Philadelphia, USA, 1995, 1166.

    [52] G. Evans, J. Blackledge, P. Yardley: Numerical meth-ods for partial differential equations. Springer, Lon-don, UK, 1999, 1290.

    [53] A. Quarteroni, A. Valli: Numerical approximation ofpartial differential equations. Springer, Berlin, 1997,1544.

    [54] J. Ortega, W. Rheinboldt: Iterative solution of non-linear equations in several variables. SIAM, NewYork, 1970, 1572.

    20