SpectraSim Documentation
Parameter · 08 Mesh

Maximum element size

acoustics.mesh.max_element_size Unit: mm Step 08 · Mesh

The largest tetrahedron permitted in the acoustic mesh. On auto, it is the shortest wavelength divided by the number of elements per wavelength; a typed size applies unchanged throughout the model.

Last updated

Theory

The program generates the acoustic mesh with Gmsh (Geuzaine and Remacle, 2009) in three stages: surface mesh, volume mesh, and elevation to second order with the mid-edge nodes placed on the CAD surface. The element size at a point is the smallest of several limits:

No limit may go below Minimum element size, equation (2).

On auto, equation (1) ties the maximum to the wavelength at the highest frequency, so the mesh follows fmaxf_{max} and the gas temperature. When the medium is mapped from the flow solution, each point uses its local sound speed c(x)c(\mathbf{x}), and the coldest gas (smallest cc) receives the smallest elements. A typed maximum overrides this everywhere, including the temperature dependence.

The size is passed to the mesher as Mesh.MeshSizeMax (Gmsh reference manual, 2025). Delaunay elements reach up to about 1.3 times this size (mean edge length); the resolution check evaluates the mesh as built (see Elements per wavelength). If curved second-order elements fold (negative Jacobian), the program regenerates the mesh with every size multiplied by 0.75, for up to four attempts.

Equations

hmax(x)=c(x)fmax Nλ(auto)h_{max}(\mathbf{x}) = \frac{c(\mathbf{x})}{f_{max}\,N_\lambda} \quad \text{(auto)}
(1)
h(x)=max⁡ ⁣(hmin, min⁡(hmax(x), hcurv(x), hgrow(x)))h(\mathbf{x}) = \max\!\Big(h_{min},\ \min\big(h_{max}(\mathbf{x}),\ h_{curv}(\mathbf{x}),\ h_{grow}(\mathbf{x})\big)\Big)
(2)
wheremeaningunit
hmaxh_{max}Maximum element sizem
ccSound speed (uniform medium: the planned value; mapped medium: local)m/s
fmaxf_{max}Highest frequencyHz
NλN_\lambdaElements per wavelength-
hhElement size the mesher uses at a pointm
hminh_{min}Minimum element sizem
hcurvh_{curv}Size from the curvature rulem
hgrowh_{grow}Size allowed by the growth limit (volume only)m

Default and rule

Default
auto: c / f_max / N (N = elements per wavelength)Computed by the program
Rule

Auto. Example: air at 20 °C (cc = 343 m/s), fmaxf_{max} = 500 Hz and NλN_\lambda = 10 give hmaxh_{max} = 68.6 mm. The Mesh step shows the resolved value.

Source

The sizing rule is the program's own: the maximum is exactly c/(fmaxNλ)c/(f_{max} N_\lambda), with no additional safety factor. The Gmsh options are documented in the Gmsh reference manual (Gmsh reference manual, 2025).

Valid range 0 < h_max <= 10 m; above the minimum element size

Values

Above 0 and at most 10 m, and above the minimum element size (checked when the setting is saved). Displayed and entered in mm.

Typed size

A typed size that gives fewer than 5 elements per wavelength at fmaxf_{max} triggers a warning on the Mesh step; the resolution check fails below 4 elements per wavelength as built.

Mapped medium

A typed size ignores the local sound speed: the whole model uses the single size.

References 2

  1. Geuzaine, C. and Remacle, J.-F. (2009). Gmsh: a 3-D finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering, 79(11), 1309-1331. DOI 10.1002/nme.2579
  2. Geuzaine, C. and Remacle, J.-F. (2025). Gmsh reference manual, version 4.15. gmsh.info. Web page