CA03 exercise · Core numerical exercise

1D Acoustic FEM Duct

Assemble 1D acoustic finite-element matrices, apply boundary conditions, compare with analytical duct resonances and run an editable Python frequency-response model.

60–90 minLinked to Finite Element Method for Acoustic FluidsDashboard progress enabled

Aim

What you should learn

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.

  • Use the wavelength to estimate a reasonable element size.
  • Recognise the stiffness-like and mass-like matrices in the Helmholtz weak form.
  • See how boundary conditions change the resonance frequencies.
  • Connect matrix assembly with the frequency response plot.

Given data

Reference duct problem

Duct length

L = 1.0 m

Sound speed

c = 343 m/s

Maximum frequency

fmax = 1000 Hz

Resolution rule

6 elements / λ

1

Estimate wavelength and mesh size

The shortest wavelength in the simulation range controls the first mesh estimate. Use λ = c / fmax and h ≈ λ / 6.

Interpretation

A finer mesh is normally required when the frequency increases. This is one reason why wave-resolving methods become expensive at high frequency.
2

Write the local FEM matrices

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.

3

Assemble a two-element duct by hand

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.

4

Compare boundary-condition resonance formulas

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

Run the 1D FEM duct response

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

What to write in your notes

  1. State the shortest wavelength and the resulting mesh-size estimate.
  2. Write the local element matrices and explain the role of K and M.
  3. Explain why boundary conditions change the analytical resonance frequencies.
  4. Compare the Python response peaks with the closed–open formula.
  5. Explain what would need validation before using this as an engineering model.

Written submission

Answers to submit

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.

0 words
Saved automatically in this browser draft.

Explain the boundary-condition effect

Why does the closed–open duct have different resonance frequencies than the closed–closed duct?

0 words
Saved automatically in this browser draft.

Validation comment

Before using this teaching model as an engineering prediction, what would you validate or improve?

0 words
Saved automatically in this browser draft.

Submit solution

Classroom submission workflow

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.

Supabase not configured

Checking login...

Draft status

0%

0 checks · 0 answers · 0 runs

Student identity

Enter temporary identity until login is active.