SpectraSim Documentation
Parameter · 08 Mesh

Elements per wavelength

acoustics.elements_per_wavelength Step 08 · Mesh

The number of second-order elements per wavelength the acoustic mesh should have at the highest frequency fmaxf_{max}. On auto it sets the maximum element size, hmax=c/(fmaxNλ)h_{max} = c/(f_{max} N_\lambda).

Last updated

Theory

The acoustic model solves the Helmholtz equation with second-order (P2) tetrahedra. A wave is represented only when the elements are small compared with its wavelength λ=c/f\lambda = c/f; the shortest wavelength is that at fmaxf_{max}. On auto the maximum element size is the shortest wavelength divided by NλN_\lambda, equation (1), passed to the mesher Gmsh as its maximum size Mesh.MeshSizeMax (Gmsh reference manual, 2025). With the medium mapped from the flow solution, the sound speed varies with the temperature and each point uses its own value, hmax(x)=c(x)/(fmaxNλ)h_{max}(\mathbf{x}) = c(\mathbf{x})/(f_{max} N_\lambda), so a hot region is meshed more coarsely than a cold one.

With mean-flow convection on, a wave travelling against a flow of Mach number MM has the shorter wavelength c(1−M)/fc(1 - M)/f. NλN_\lambda is therefore raised to Nλ/(1−Mmax)N_\lambda/(1 - M_{max}), equation (2), with MmaxM_{max} the largest Mach number of the mapped flow (clipped at 0.5).

On compact mufflers the Curvature factor usually sets the element size rather than the wavelength: on case V1 (a 2.0 m multi-chamber muffler with a perforated pipe and three absorptive packings) at 500 Hz, raising NλN_\lambda from 10 to 16 changes the mesh from 21k to 23k tetrahedra.

After meshing, the resolution gate counts the elements per wavelength the mesh actually has, equation (3): the wavelength at fmaxf_{max} (the local one with a mapped medium) divided by the mean edge length of each element, judged on the worst element. Delaunay tetrahedra come out up to about 1.3 times the requested maximum size, so the gate is applied to the mesh as built, not to the setting.

Equations

hmax=λminNλ=cfmax Nλh_{max} = \frac{\lambda_{min}}{N_\lambda} = \frac{c}{f_{max}\,N_\lambda}
(1)
Nλ′=Nλ1−Mmax(mean-flow convection only)N_\lambda' = \frac{N_\lambda}{1 - M_{max}} \quad \text{(mean-flow convection only)}
(2)
Nλ,e=ce/fmaxlˉe,gate: min⁡eNλ,e≥4 (fail), ≥5 (warning)N_{\lambda,e} = \frac{c_e / f_{max}}{\bar{l}_e}, \qquad \text{gate:}\ \min_e N_{\lambda,e} \ge 4\ \text{(fail)},\ \ge 5\ \text{(warning)}
(3)
wheremeaningunit
NλN_\lambdaElements per wavelength (setting)-
hmaxh_{max}Maximum element size given to the mesherm
λmin\lambda_{min}Shortest wavelength, at fmaxf_{max}m
ccSound speed (smallest in the model, or local with a mapped medium)m/s
fmaxf_{max}Highest frequency of the sweepHz
MmaxM_{max}Largest Mach number of the mapped mean flow, at most 0.5-
Nλ,eN_{\lambda,e}Elements per wavelength of element ee as built-
cec_eSound speed at the element (local with a mapped medium)m/s
lˉe\bar{l}_eMean length of the six edges of element eem

Default and rule

Default
auto: 10Computed by the programMeasured
Rule

Auto = 10. A typed value is used as typed.

Source

The default of 10 is set together with the curvature-driven acoustic mesh settings, based on comparisons with a reference finite-element solution on an extremely fine mesh (case V1); on those models the curvature factor, not NλN_\lambda, decides the agreement. In the expansion-chamber validation the transmission loss is mesh independent to below 0.01 dB for 6, 10 and 16 elements per wavelength (0.8333 / 0.8330 / 0.8325 dB at the worst frequency), because the mesh is curvature limited.

The gate limits 4 and 5 are the program's choice of what P2 elements need; they are not derived from a published criterion. Because of the dispersion error of finite elements for the Helmholtz equation, a fixed count per wavelength is not exact at high frequencies.

Valid range warning below 4; gate: warn below 5, fail below 4 elements per wavelength as built

Values

The program does not limit the number. Below 4 the Mesh step warns that P2 elements need at least 4.

Resolution gate

Fails when the worst element has fewer than 4 elements per wavelength at fmaxf_{max}; warns below 5.

Absorptive packing

Packing regions are meshed with the gas wavelength; their own, shorter wavelength is reported separately by the acoustic quality check.

References 1

  1. Geuzaine, C. and Remacle, J.-F. (2025). Gmsh reference manual, version 4.15. gmsh.info. Web page