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.

APPENDIX B. PROGRAM LISTINGS 193<br />

*/<br />

The complex radiation impedance.<br />

complex flangedZ(double f, double c, double rho, double a);<br />

/*<br />

Calculates the radiation impedance <strong>of</strong> a flanged pipe.<br />

Refer to Dalmont (2001) JSV 244, 505-34.<br />

Parameters:<br />

f: the frequency.<br />

c: the speed <strong>of</strong> sound.<br />

rho: the density <strong>of</strong> air.<br />

a: the radius <strong>of</strong> the tube in metres.<br />

Returns:<br />

The complex radiation impedance.<br />

*/<br />

TransferMatrix tubeMatrix(double f, double c, double rho, double L,<br />

double a, double alphacorrection);<br />

/*<br />

Calculates the transfer matrix <strong>of</strong> a cylindrical tube.<br />

The transfer matrix T relates pressure <strong>and</strong> flow at the input<br />

to the pressure <strong>and</strong> flow at the output. Flow is positive<br />

into the input <strong>and</strong> out <strong>of</strong> the output.<br />

Parameters:<br />

f: the frequency.<br />

c: the speed <strong>of</strong> sound.<br />

rho: the density <strong>of</strong> air.<br />

L: the length <strong>of</strong> the tube in metres.<br />

a: the radius <strong>of</strong> the tube in metres.<br />

alphacorrection: the multiplicative attenuation coefficient<br />

factor.<br />

Returns:<br />

The transfer matrix <strong>of</strong> the tube.<br />

*/<br />

TransferMatrix coneMatrix(double f, double c, double rho, double L,<br />

double a1, double a2, double alphacorrection);<br />

/*<br />

Calculates the transfer matrix <strong>of</strong> a truncated cone.<br />

The transfer matrix T relates pressure <strong>and</strong> flow at the input<br />

to the pressure <strong>and</strong> flow at the output. Flow is positive<br />

into the input <strong>and</strong> out <strong>of</strong> the output.<br />

Parameters:<br />

f: the frequency.<br />

c: the speed <strong>of</strong> sound.<br />

rho: the density <strong>of</strong> air.<br />

L: the length <strong>of</strong> the pipe in metres.<br />

a1: the radius <strong>of</strong> the pipe at input in metres.<br />

a2: the radius <strong>of</strong> the pipe at output in metres.<br />

alphacorrection: the multiplicative attenuation coefficient<br />

factor.<br />

Returns:<br />

The transfer matrix <strong>of</strong> the pipe.<br />

*/<br />

TransferMatrix discontinuityMatrix(double f, double c, double rho,<br />

double a1, double a2);<br />

/*

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

Saved successfully!

Ooh no, something went wrong!