Course: Numerical Modeling and Simulation for Acoustics
Programme: MSc in Music and Acoustic Engineering, Politecnico di Milano
Work Team: Di Lorenzo Giuliano, Ouali Ernest
Three MATLAB assignments covering the theoretical and numerical analysis of acoustic problems: from 1D finite element method (FEM), to leap-frog scheme for implicit equation, and study of flows in finite volume method (FVM).
Solves the frequency-domain wave equation
with variable stiffness
- Weak formulation and Galerkin discretization with piecewise-linear basis functions, leading to the system
$\omega M \cdot U - A \cdot U = F$ . - Mass and stiffness matrix assembly via Gauss-Legendre quadrature.
- Convergence verified against the exact solution
$u_\text{ex}(x) = \sin(2\pi x)$ : measured$L^2$ convergence order$\approx 2$ , consistent with linear FEM. - Sensitivity of accuracy to piecewise-constant
$\mu(x)$ and$\rho(x)$ (material discontinuities), showing negligible influence of the exact material values on the error when the exact solution is fixed by construction. - Frequency sweep over
$\omega \in (0, 20)$ with 10 points-per-wavelength mesh sizing, gain/phase spectra, and identification of resonances for constant and piecewise-constant wave speed$c(x)$ . - 2D space-time visualization of the harmonic solution
$v(x,t) = e^{i\omega t}u(x)$ .
Solves Webster's horn equation for a 1D acoustic tube of variable cross-section
with excitation at
- Explicit finite difference scheme, reduces to the standard leap-frog scheme for constant cross-section, extended to variable
$S(x)$ via a second-order local polynomial approximation of the profile. - Verified against a closed-form exact solution for both constant and variable cross-section, with
$L^2$ -error convergence: linear in time ($O(\Delta t)$), and space-refinement study showing the error plateaus unless the time step is refined first - a coupling effect between space and time discretization worth noting for anyone reusing this scheme. - CFL stability condition derived and demonstrated empirically (unstable configuration blows up almost immediately).
- Applied to a vocal tract simulation: variable cross-section profiles for vowels
eanda, driven by a glottal-pulse-like input, using a staggered finite difference scheme. Output shows pitch-periodic behavior consistent with vowel sounds.
Treats the LWR traffic flow model
as a scalar hyperbolic conservation law, using the analogy between vehicle density and 1D wave propagation.
- Two flux models compared: the standard linear speed-density relation
$u(\rho) = u_\text{max}(1 - \frac{\rho}{\rho_\text{max}})$ , and a logarithmic flux$f(\rho) = \rho \cdot log(\frac{\rho_\text{max}}{\rho})$ that better matches real traffic data. - Finite volume discretization with the Godunov method: first-order (constant reconstruction) and second-order (linear reconstruction with a Monotonized Central slope limiter) schemes.
- Three canonical scenarios - Traffic Jam, Green Light, Traffic Flow - each with physically motivated boundary conditions, comparing shock formation/propagation and rarefaction wave behavior between flux models and scheme orders.
- Discussion of the accuracy/sharpness trade-off: the second-order scheme preserves discontinuities more faithfully, while the first-order scheme is more diffusive.