11.07.2014 Views

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

Flute acoustics: measurement, modelling and design - School of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

332 APPENDIX B. PROGRAM LISTINGS<br />

/* calculate complex end corrections */<br />

d_flanged = divz(arctanz(divz(Z_flanged, multz(j, Z0))),real(k));<br />

d_cyl = subz(d_flanged, real(0.47 * a * pow(a / b, 0.8)));<br />

/* add empirical correction */<br />

d_cyl = addz(d_cyl, real(CORR_OPEN_FINGER_HOLE_LENGTH * a));<br />

Z = multz(j, multz(Z0, tanz(multz(real(k), d_cyl))));<br />

return Z;<br />

}<br />

complex openKeyedHoleLoadZ(double f, Hole hole) {<br />

double a, d, q, h, e, w;<br />

double d_corr, d_e_on_a, k;<br />

complex Z_circ, Z0, d_circ, d_disk, Z, R;<br />

Key key = hole->key;<br />

a = hole->radius;<br />

d = key->radius;<br />

q = key->holeRadius;<br />

h = key->height;<br />

e = key->thickness;<br />

w = key->wallThickness;<br />

/* hack for classical flutes since the keyed holes have no<br />

chimneys */<br />

if (key->chimneyHeight == 0) w = DBL_MAX;<br />

k = (2*M_PI*f)/hole->c;<br />

/* calculate the characteristic impedance */<br />

Z0 = charZ(hole->c, hole->rho, a);<br />

/* Dalmont et al. (2001) Radiation impedance <strong>of</strong> tubes with different<br />

flanges: Numerical <strong>and</strong> experimental investigations, Journal <strong>of</strong><br />

Sound <strong>and</strong> Vibration 244(3), 505--534, eqs. (48, 51, 52) */<br />

d_corr = a / (3.5 * pow(h/a, 0.8) * pow(h/a + 3 * w/a, -0.4) + 30<br />

* pow(h/d, 2.6));<br />

/* add empirical length correction */<br />

d_corr = d_corr + CORR_OPEN_KEYED_HOLE_LENGTH * a;<br />

if (q > 0) {<br />

d_e_on_a = 1.64*a/q - 0.15*a/d - 1.1 + e*a/(q*q);<br />

d_corr = d_corr / (1 + 5*pow(d_e_on_a, -1.35)*pow(h/a, -0.2));<br />

}<br />

Z_circ = radiationZ(f, hole->c, hole->rho, a, w/a);<br />

/* calculate complex end corrections */<br />

d_circ = divz(arctanz(divz(Z_circ, multz(j, Z0))),real(k));<br />

d_disk = addz(d_circ, real(d_corr));<br />

Z = multz(j, multz(Z0, tanz(multz(real(k), d_disk))));<br />

/* add empirical resistance */<br />

R = multz(Z0, real(0.4 * pow(k * a, 2)));<br />

Z = addz(Z, R);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!