Interactive webpage version of the HP BASIC duct acoustics code

This page translates the visible HP BASIC “Material” and “Extended” routines into modern JavaScript. It uses the Delany–Bazley / Mechel material model and solves the extended-reaction equation f(w) = w tan(w) + M √(w² + p²) tan(b √(w² + p²)) = 0 across frequency using Newton–Raphson with Muller fallback.

It is designed as a faithful interactive webpage version of the code pages you uploaded, not as a perfect forensic transcription of every line. The visible code pages define the key structure, constants, and solver flow for “Material” and “Extended”.

Material model
Delany–Bazley / Mechel
Primary solver
Newton–Raphson
Fallback solver
Muller

Visible HP BASIC structure used here

3.5 Programme printouts 'Material' and 'Extended' SUB Material A = sigma / (rho * f) IF A < 60 THEN Zr = 1 + .04885 * A^-0.754 Zi = -.087 * A^-0.7307 Gamr = k * .189 * A^-0.6185 Gami = k * (1 + .0978 * A^-0.6929) ELSE Gamma/k = sqrt(-1.4664 + j * 0.2115 / A^-1?) Z = (A/2π + j1.4035) / (Gamma/k) END IF SUB Extended Solve f(w)=0 for each frequency Newton–Raphson first If jump / failure -> Muller Carry previous frequency root forward Compare vector lengths to detect jumps

The scan only shows pages 45–50. This webpage reconstructs the working solver from those pages and the equations earlier in the thesis.

Inputs

Ready.
Peak attenuation proxy
–
Peak frequency
–
Last method used
–

Attenuation proxy vs frequency

Plotted as 8.686 × 2l × Re(Γ), which tracks the thesis attenuation curves in dB/duct width style.

w trajectory (real and imaginary parts)