Muffler transmission loss with four open-source FEM codes: Elmer, code_aster, FEniCSx and FreeFEM on cloudHPC

Published by Ruggero Poletto on

Acoustic pressure in the expansion-chamber muffler, still frame

TL;DR

  • We computed the transmission loss (TL) of the classic concentric expansion-chamber muffler (Lee 2005 geometry: D = 164.4 mm, d = 49 mm, L = 257.2 mm) from 10 to 3000 Hz (300 frequencies) with Elmer 26.2, code_aster 17.3.17, FEniCSx 0.6.0 and FreeFEM 4.15, all on the same quadratic tetrahedral mesh.
  • The four codes agree to within 0.023 dB over the whole sweep; code_aster, FEniCSx and FreeFEM agree to within 0.001 dB. A finer mesh moves TL by at most 0.1 dB (at the radial cut-on resonance).
  • Up to 1 kHz the 3D result stays within 0.7 dB of 1D plane-wave theory (15.1 dB domes, 0 dB at kL = nฯ€). Above it the 3D domes rise to 20.2 dB, and above the chamber’s first radial mode (โ‰ˆ 2.55 kHz) the muffler becomes almost transparent: 0โ€“0.6 dB where 1D theory still promises up to 15.1 dB.
  • The whole production series (300 frequencies ร— 4 codes, plus a mesh check) cost โ‚ฌ2.38 on cloudHPC; including smoke tests and debugging, โ‚ฌ2.81.
Pressure field in the muffler at 330, 670 and 2900 Hz
Pressure field in the muffler at 330, 670 and 2900 Hz

Why this comparison

The expansion chamber is the “hello world” of duct acoustics: a pipe, a larger can, a pipe. Its plane-wave transmission loss has a closed form, there is published measured data, and every engineer who has sized an HVAC silencer or an exhaust box has used the 1D formula. That makes it the ideal case to answer two practical questions:

  1. Do the open-source FEM codes available on cloudHPC give the same acoustic answer? Elmer, code_aster, FEniCSx and FreeFEM all solve the Helmholtz equation, but with very different user interfaces and conventions.
  2. Where does the 1D formula stop being trustworthy? The answer is set by the first higher-order mode of the chamber, and a 3D model shows it immediately.

Results at a glance

Quantity 1D theory 3D FEM (all four codes)
TL dome 1 (max, 10โ€“670 Hz) 15.07 dB 15.15 dB at 340 Hz
TL dome 2 (670โ€“1340 Hz) 15.08 dB 15.57 dB at 1010 Hz
TL dome 3 (1340โ€“2020 Hz) 15.08 dB 16.78 dB at 1700 Hz
TL dome 4 (2020โ€“2540 Hz) 15.07 dB 20.23 dB at 2360 Hz
TL dips (kL = nฯ€) 0 dB at 667, 1334, 2001 Hz 0.02โ€“0.09 dB at 670, 1340, 2020 Hz
Peak near radial cut-on โ€” 21.40 dB at 2680 Hz
TL above 2750 Hz up to 15.08 dB 0.0โ€“0.6 dB
Code agreement (FreeFEM as reference) max ฮ”TL max rel. ฮ”|p| at probes
code_aster 17.3.17 0.000002 dB 3 ร— 10โปโธ
FEniCSx 0.6.0 0.0008 dB 5 ร— 10โปโถ
Elmer 26.2 0.023 dB 0.24 %
TL of the four codes vs 1D theory
TL of the four codes vs 1D theory

The case

Case setup
Case setup
  • Geometry (Lee 2005, Section 7.1): inlet and outlet pipes d = 49 mm, chamber D = 164.4 mm, L = 257.2 mm. Inlet and outlet pipes are 200 mm long in the model (our choice, long enough for the higher-order pipe modes to decay; the first non-planar pipe mode cuts on at โ‰ˆ 4.1 kHz).
  • Physics: linear acoustics in air, c = 343 m/s, ฯ = 1.2 kg/mยณ, no mean flow, rigid walls. Time-harmonic Helmholtz equation, 10โ€“3000 Hz in 10 Hz steps.
  • Boundary conditions: unit normal velocity on the inlet face, anechoic impedance Z = ฯc on the outlet face.
  • Transmission loss: two probes in the inlet pipe (x = 60 and 100 mm) separate incident and reflected plane waves; two probes in the outlet pipe (x = 550 and 600 mm) give the transmitted wave and a check of the anechoic termination. TL = 20ยทlogโ‚โ‚€(|p_inc| / |p_trans|). The same Python script post-processes all four codes.
  • Mesh: one gmsh mesh for all codes โ€” 78,177 tetrahedra, 10 mm in the chamber and 5 mm near the axis and in the pipes, quadratic elements with straight edges (113,989 P2 unknowns). Exported as MED (code_aster), Elmer native format, XDMF (FEniCSx) and medit .mesh (FreeFEM).
  • 1D reference (plane-wave theory, e.g. Munjal): TL = 10ยทlogโ‚โ‚€[1 + ยผ (m โˆ’ 1/m)ยฒ sinยฒ(kL)], m = (D/d)ยฒ = 11.26.

How each code was set up

Code cloudHPC app Formulation Outlet impedance Frequency loop
Elmer 26.2 elmerSolver-9.0 HelmholtzSolver, 2-DOF complex pressure, MUMPS Plane Wave BC = True (Z = c) Scanning Loops
code_aster 17.3.17 codeAster-17.3.17_mpi PHENOMENE='ACOUSTIQUE', RIGI/MASS/AMOR_ACOU, DYNA_VIBRA harmonic outlet faces with MODELISATION='3D_ABSO' FREQ list in one DYNA_VIBRA
FEniCSx 0.6.0 FEniCSx-0.6.0-r1 P2 Lagrange, complex PETSc, LU (MUMPS) Robin term iยทkยทp on the outlet Python loop, forms with Constants
FreeFEM 4.15 FreeFEM-4.15 P2 complex, sequential MUMPS int2d(Th,2)(1i*k*p*q) for loop over frequencies

What we learned per code

  • code_aster 17.3.17 โ€” fastest per frequency (6.4 s on 4 vCPU) and identical to FreeFEM to six digits. Two traps: IMPE_FACE no longer exists in AFFE_CHAR_ACOU (the error is Unauthorized keyword: 'IMPE_FACE'); the anechoic outlet is now a modelling, MODELISATION='3D_ABSO' on the outlet faces with the fluid material assigned to them, which is not yet in the AFFE_MODELE documentation. The fluid material must also be assigned to the inlet faces, otherwise VITE_FACE fails with CALCUL_20 (“le matรฉriau est nรฉcessaire”). POST_RELEVE_T prints the modulus of complex fields unless you ask for FORMAT_C='REEL'/'IMAG'.
  • Elmer 26.2 โ€” the shortest input of all (a few lines of .sif) and its anechoic shortcut Plane Wave BC needs no thought about sign conventions. On cloudHPC it currently runs one MPI task per physical core but does not partition the mesh, so we ran it on 2 vCPU (one task): 22.7 s per frequency. Note the app is called elmerSolver-9.0 but the binary reports Elmer 26.2.
  • FEniCSx 0.6.0 โ€” the cloudHPC build uses complex PETSc, so the weak form is written exactly as on paper. 12.3 s per frequency on one rank.
  • FreeFEM 4.15 โ€” compact script, native complex arithmetic; load "MUMPS_seq" is essential (the default UMFPACK ran out of memory on 114k complex unknowns). 16.7 s per frequency.

Where 1D theory breaks

The chamber supports non-planar modes above their cut-on frequencies:

  • first asymmetric mode (1,0): โ‰ˆ 1.22 kHz โ€” not excited by a concentric, axisymmetric inlet;
  • first radial mode (0,1): โ‰ˆ 2.55 kHz โ€” excited, and this is where the 3D and 1D curves part ways completely.

Even below the cut-on, the 3D domes grow from 15.2 to 20.2 dB: the evanescent higher-order modes at the area discontinuities act like an extra end correction that 1D theory ignores. Above 2.55 kHz the energy travels through the chamber as a radial mode (bottom panel of the animation) and TL collapses to 0โ€“0.6 dB, while the 1D formula keeps predicting 15 dB domes. In practice: a concentric expansion chamber of this size is a sub-2.5 kHz device, and a 1D design tool will overstate its performance above that.

Experimental comparison

Pending. Lee (2005, Fig. 7.2) shows measured TL for this chamber (impedance tube, four microphones, ASTM E1050) from 0 to 3000 Hz. The measured curve is published as a plot only; ranges read from the figure will be added here, stated as ranges, without digitising the curve.

Mesh check

The same FreeFEM case on a finer mesh (7 mm / 3.5 mm, 222,004 tetrahedra, 314,386 unknowns) at 30 frequencies changes TL by at most 0.02 dB everywhere except at 2500โ€“2600 Hz, next to the radial cut-on, where the change is 0.1 dB.

What didn’t work (and why it matters for the post)

  • Kratos Multiphysics was on the list, but Kratos 10.4.2 has no acoustics application and no Helmholtz element (the “Helmholtz” classes in the code are the shape-optimisation filter). A time-domain workaround with the compressible Navierโ€“Stokes solver was possible but not like-for-like, so we left it out.
  • On cloudHPC, the FreeFEM and FEniCSx apps initially ended COMPLETED without running (binary hidden by a bind mount, missing container image); both were fixed during this study. Always read the solver log, not only the run status.

Run times and costs

Code Instance Runs Time per frequency Cost (300 frequencies)
code_aster 17.3.17 4 vCPU standard (1 MPI process, 2 threads) 1 6.4 s โ‚ฌ0.26
FEniCSx 0.6.0 4 vCPU standard (1 rank) 4 ร— 75 frequencies 12.3 s โ‚ฌ0.62
FreeFEM 4.15 4 vCPU standard (2 threads) 4 ร— 75 frequencies 16.7 s โ‚ฌ0.64
Elmer 26.2 2 vCPU standard (1 task) 4 ร— 75 frequencies 22.7 s โ‚ฌ0.48
FreeFEM, fine mesh 8 vCPU standard 1 ร— 30 frequencies โ€” โ‚ฌ0.38

Frequencies are independent, so a sweep splits into chunks that run in parallel: all 1200 frequency solves of the production series were done in under an hour of wall time. Times are solver times from the logs; costs are billed costs including boot and upload. The codes did not use the same number of cores, so the times compare setups, not solver efficiency.

How to run this on cloudHPC

  1. Download the case folders (link below): one per code, each with the mesh and the input.
  2. Upload a folder and pick the app: elmerSolver-9.0 (2 vCPU until mesh partitioning is supported), codeAster-17.3.17_mpi, FEniCSx-0.6.0-r1 or FreeFEM-4.15 (4 vCPU standard is plenty).
  3. Each case writes the probe pressures (probes_*.csv / .dat / .txt); tl.py turns them into TL.
  4. To split a sweep, copy the folder and change the frequency list โ€” chunks run side by side.

FAQ

What is transmission loss and how is it different from insertion loss? TL is the ratio of incident to transmitted acoustic power with an anechoic termination; it depends only on the muffler. Insertion loss also depends on source and termination impedances.

Why do the TL dips fall at kL = nฯ€? When the chamber length is a whole number of half wavelengths it becomes acoustically transparent: incident and reflected waves inside the chamber cancel the area-change reflections.

When can I trust the 1D expansion-chamber formula? Well below the first radial cut-on of the chamber, f โ‰ˆ 3.83ยทc/(ฯ€ยทD). For D = 164.4 mm that is about 2.55 kHz. In this case 1D and 3D already differ by more than 1 dB from about 1.2 kHz, and by 5.3 dB at 2.4 kHz.

Do I need a 3D model for an axisymmetric muffler? An axisymmetric 2D model would give the same answer for a concentric chamber. 3D is needed as soon as inlet and outlet are offset or the chamber is not round โ€” which is most real silencers.

Which open-source code should I use for duct acoustics? All four give the same numbers. Elmer has the shortest input, code_aster was the fastest per frequency in this setup, FEniCSx is the most flexible if you write your own formulation, and FreeFEM is the quickest way from equation to script.

References

  1. I. Lee, Acoustic Characteristics of Perforated Dissipative and Hybrid Silencers, PhD thesis, The Ohio State University, 2005 โ€” geometry and measured TL (Section 7.1, Fig. 7.2). https://mae.osu.edu/media/document/2021-11-24/i_lee_thesis.pdf
  2. A. Selamet, P. M. Radavich, The Effect of Length on the Acoustic Attenuation Performance of Concentric Expansion Chambers: An Analytical, Computational, and Experimental Investigation, SAE Technical Paper 950544, 1995. https://saemobilus.sae.org/papers/effect-length-acoustic-attenuation-performance-concentric-expansion-chambers-analytical-computational-experimental-investigation-950544
  3. M. L. Munjal, Acoustics of Ducts and Mufflers, 2nd ed., Wiley, 2014 โ€” plane-wave transmission loss of expansion chambers.
  4. ASTM E1050, Standard Test Method for Impedance and Absorption of Acoustical Materials Using a Tube, Two Microphones and a Digital Frequency Analysis System.
  5. Elmer FEM, HelmholtzSolve source and tests โ€” https://github.com/ElmerCSC/elmerfem
  6. code_aster documentation, acoustic modelling (R4.02.01) and AFFE_CHAR_ACOU (U4.44.04).
  7. FEniCSx / DOLFINx โ€” https://docs.fenicsproject.org
  8. FreeFEM โ€” https://doc.freefem.org

CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.

New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs