SpectraSim Documentation
Parameter · 01 Physics

Acoustic medium

physics.acoustic_medium Step 01 · Physics

The gas the sound travels in. Uniform: one density ρ0\rho_0 and one speed of sound c0c_0 for the whole model, from the Material step. From CFD fields: the solved temperature and absolute pressure of the flow run give a density ρ(x)\rho(\mathbf{x}) and a speed of sound c(x)c(\mathbf{x}) at every point of the acoustic mesh.

Last updated

Theory

The acoustic model solves the Helmholtz equation for the complex pressure amplitude pp at angular frequency ω\omega, equation (1), with the density and the sound speed allowed to vary in space. With the uniform medium both are constants, equation (2): the gas of the Material step at its temperature and at the ambient pressure, with the ideal-gas constant and heat-capacity ratio of the selected gas.

With the medium from the CFD fields, the flow run comes first. Its last solution is converted to VTK (foamToVTK), the temperature TT and the absolute pressure are interpolated onto every node of the acoustic mesh (a node outside the flow mesh takes the nearest flow value), and equation (3) gives ρ\rho and cc there, with the same ideal gas the compressible solver used. The acoustic mesh then follows the local wavelength: a hot region gets larger elements than a cold one (Elements per wavelength). Each port uses the mean ρ\rho and cc of its own face for its modes and powers.

Only the steady compressible solver solves a temperature and an absolute pressure, so this choice locks the Model step to compressible and steady. The mean velocity of the flow is not part of the acoustic equation unless Mean-flow convection is switched on.

Equations

∇⋅(1ρ∇p)+ω2ρc2 p=0\nabla\cdot\left(\frac{1}{\rho}\nabla p\right) + \frac{\omega^2}{\rho c^2}\,p = 0
(1)
ρ0=patmMRuT,c0=γRsT\rho_0 = \frac{p_{atm} M}{R_u T}, \qquad c_0 = \sqrt{\gamma R_s T}
(2)
ρ(x)=p(x)RsT(x),c(x)=γRsT(x)\rho(\mathbf{x}) = \frac{p(\mathbf{x})}{R_s T(\mathbf{x})}, \qquad c(\mathbf{x}) = \sqrt{\gamma R_s T(\mathbf{x})}
(3)
wheremeaningunit
ppAcoustic pressure amplitude (equation 1), absolute static pressure of the flow (equation 3)Pa
ω\omegaAngular frequency, 2πf2\pi frad/s
ρ,c\rho, cDensity and speed of sound of the gaskg/m³, m/s
patmp_{atm}Ambient pressure of the Material stepPa
MMMolar mass of the gaskg/kmol
RuR_uUniversal gas constant, 8314.47J/(kmol K)
RsR_sSpecific gas constant, Ru/MR_u/MJ/(kg K)
TTTemperature (Material step, or the solved field)K
γ\gammaRatio of the specific heats of the gas-

Default and rule

Default
uniform
Rule

Uniform. It needs no flow solution and is exact for a muffler at one temperature.

Source

The mapped medium is validated in two ways. A duct whose temperature rises linearly from 293 to 700 K, solved in 3-D against an exact one-dimensional integration of the same equation, agrees within 0.02 dB at 600-3000 Hz. An expansion chamber with 600 K gas mapped from a real compressible flow run shifts its transmission-loss maxima by the factor 600/293.15=1.4306\sqrt{600/293.15} = 1.4306 within 0.14 % (measured ratios 1.4326 / 1.4316 / 1.4305). The equation is the standard Helmholtz equation for a medium at rest with variable density and sound speed.

Valid range uniform | cfd_fields (needs fluid flow, steady compressible)

Requirements

From CFD fields needs fluid flow, the compressible analysis type and a steady run. A transient run is incompressible and has no temperature field.

Mapping checks

After mapping, the program compares the mass-weighted mean temperature of each port with the flow run's own value (within 0.5 %) and checks that no acoustic node is far outside the flow mesh (fails beyond 2 % of the model size, warns when more than 10 % of the nodes lie outside it).

Medium at rest

The mapped medium changes ρ\rho and cc only. The mean flow's convection of sound is a separate option.