Estimate wavelength and mesh size
The shortest wavelength in the simulation range controls the first mesh estimate. Use λ = c / fmax and h ≈ λ / 6.
Interpretation
CA03 exercise · Core numerical exercise
Assemble 1D acoustic finite-element matrices, apply boundary conditions, compare with analytical duct resonances and run an editable Python frequency-response model.
Aim
This exercise connects the CA03 theory chapter to a concrete finite-element calculation. You will start from wavelength and mesh resolution, write the local matrices, assemble a very small global system and then run an editable Python model for a 1D duct frequency response.
Given data
Duct length
L = 1.0 m
Sound speed
c = 343 m/s
Maximum frequency
fmax = 1000 Hz
Resolution rule
6 elements / λ
The shortest wavelength in the simulation range controls the first mesh estimate. Use λ = c / fmax and h ≈ λ / 6.
Interpretation
For a linear 1D acoustic element of length le, the weak Helmholtz form gives a gradient matrix and an interpolation matrix:
K_e = (1/le) [[ 1, -1], [-1, 1]] M_e = (le/6) [[ 2, 1], [ 1, 2]] A(ω) = K - k² M
In a physical acoustic model, additional constants and boundary terms may appear depending on the chosen pressure/velocity formulation. For this teaching exercise we focus on the matrix structure and frequency dependence.
Let L = 1 m and use two equal elements, so le = 0.5 m. The local matrices are assembled into three global nodes. Check two representative matrix entries below.
For a duct with both ends closed, pressure maxima occur at both ends and the resonance estimate is fn = n c / (2L). For a closed–open duct, the open end is approximated by a pressure node and the resonances are fn = (2n+1)c / (4L).
For L = 1 m and c = 343 m/s, what is the first closed–open resonance?
Why does this exercise use many more than two elements in the Python frequency response?
Python exercise
The code assembles a 1D finite-element model, applies a pressure-release condition at the right end and computes a receiver response over frequency. Edit num_elements, L or loss and rerun.
Expected observation
The plotted response should show peaks close to the analytical closed–open resonance estimates. Increasing the mesh resolution should make the numerical peaks more stable.
Teaching note
This is a teaching model for the matrix workflow. A production duct model would use carefully scaled physical boundary conditions, source calibration and validation data.
Reflection
Written submission
These written fields convert the in-class exercise into a submit-able solution. They are saved automatically in the local draft and included in the submission record for the supervisor grading page.
Explain the FEM matrices
In your own words, explain the roles of K, M and A(ω)=K−k²M in the 1D duct exercise.
Explain the boundary-condition effect
Why does the closed–open duct have different resonance frequencies than the closed–closed duct?
Validation comment
Before using this teaching model as an engineering prediction, what would you validate or improve?
Submit solution
When a student is logged in, the submission is stored in Supabase and becomes visible to the supervisor grading page across devices. Local browser storage remains as fallback.
Checking login...
Draft status
0%
0 checks · 0 answers · 0 runs
Student identity
Enter temporary identity until login is active.