Skip to main content

Module acoustics_continuum

Module acoustics_continuum 

Expand description

3D Continuum Acoustic & Elastic Solvers, Helmholtz, Room Acoustics & Kramers-Kronig Dispersion.

Canonical etalon-sim continuum acoustics kernel suite (Packet N02):

  • fdtd_fluid: 3D staggered-grid acoustic pressure-velocity leapfrog solver, 3D Courant stability gate, explicit spatiotemporal collocation for energy density $e$ and intensity $\mathbf{I}$, and Periodic, Rigid, Pressure-Release, Engquist-Majda, and multi-layer CPML boundaries with bit-exact restart bytes and 64-byte record helper (PressureVelocityRecord).
  • elastic_virieux: 3D Virieux staggered-grid full 6-component symmetric Cauchy stress $(\sigma_{xx},\sigma_{yy},\sigma_{zz},\sigma_{xy},\sigma_{yz},\sigma_{xz})$ and velocity solver, tensor strain $\varepsilon_{ij}$ vs engineering shear strain $\gamma_{ij}=2\varepsilon_{ij}$, active Hamilton quaternion rotation $\boldsymbol{\sigma}’ = \mathbf{R}\boldsymbol{\sigma}\mathbf{R}^T$, free-surface ($\boldsymbol{\sigma}\cdot\mathbf{n}=\mathbf{0}$) and fluid-solid interfaces, normal-incidence impedance reflection/transmission, and 64-byte record helper (ElasticStressVelocityRecord).
  • helmholtz: 3D frequency-domain Helmholtz operator $(\nabla^2 + k^2)\hat{p} = -\hat{s}$ with 7-point and 27-point isotropic dispersion-minimizing stencils, zero-allocation damped Jacobi and BiCGSTAB solvers, free-space 3D Green’s function $G(r)=\frac{e^{ikr}}{4\pi r}$, and rectangular cavity eigenmode oracles.
  • room_acoustics: Sabine, Eyring-Norris, and Millington-Sette $T_{60}$ reverberation calculators and ISO 3382-1 Schroeder backward integration ($\text{EDT}, T_{20}, T_{30}, C_{50}, C_{80}, D_{50}, T_s$).
  • attenuation_kk: Kramers-Kronig causal attenuation-dispersion consistency for power-law media ($0 < y < 3$, including $y=1$ logarithmic branch) and multi-relaxation atmospheric ($\text{O}_2/\text{N}_2$) and ocean seawater ($\text{B(OH)}_3/\text{MgSO}_4$) profiles.

Modules§

attenuation_kk
Kramers-Kronig Acoustic Attenuation-Dispersion Consistency.
elastic_virieux
3D Elastic Stress-Velocity Virieux Solver & Tensor Mechanics (QAC Mode 0x0001).
fdtd_fluid
3D Staggered Acoustic Pressure-Velocity FDTD Solver (QAC Mode 0x0000).
helmholtz
3D Helmholtz Frequency-Domain Solver & Green’s Function Oracle.
room_acoustics
Room Acoustics: Sabine / Eyring-Norris / Millington-Sette $T_{60}$ & Schroeder RIR Integration.

Structs§

CauchyStress6
Six-component symmetric Cauchy stress tensor in canonical QAC order: [\sigma_{xx}, \sigma_{yy}, \sigma_{zz}, \sigma_{xy}, \sigma_{yz}, \sigma_{xz}] in Pascals (tensile-positive).
Complex64
Complex double-precision scalar re + i * im.
ElasticMedium
Isotropic linear elastic solid (or explicit $\mu=0$ fluid-limit) medium parameters (Schema 200).
ElasticStressVelocityRecord
Mode 0x0001 (elastic_stress_velocity_continuum) 64-byte wire record.
ElasticVirieuxConfig
Configuration for the 3D Virieux staggered-grid elastic velocity-stress solver.
ElasticVirieuxState
Complete state of the 3D Virieux staggered-grid velocity-stress solver.
FluidFdtdConfig
Configuration for the 3D staggered-grid fluid acoustic FDTD solver.
FluidFdtdState
Complete restartable state for the 3D staggered fluid acoustic FDTD solver.
FluidMedium
Stationary homogeneous fluid medium parameters (Schema 200 subset).
HamiltonQuaternionXyzw
Active local-to-parent Hamilton quaternion [x, y, z, w] (C02-C04 / CROSS-A01).
HelmholtzConfig
Configuration for the 3D Helmholtz operator $(\nabla^2 + k^2)\hat{p} = -\hat{s}$.
HelmholtzSolveReport
Convergence summary for an iterative 3D Helmholtz solve.
HelmholtzWorkspace
Caller-owned workspace for zero-allocation BiCGSTAB and Jacobi Helmholtz solves.
MultiRelaxationMedium
Multi-relaxation + classical thermoviscous causal acoustic medium.
NormalIncidenceInterface
Normal-incidence planar acoustic / longitudinal impedance reflection and transmission across an interface from medium 1 ($Z_1 > 0$) into medium 2 ($Z_2 \ge 0$).
PowerLawAttenuation
Power-law causal acoustic attenuation and Kramers-Kronig dispersion model.
PressureVelocityRecord
Mode 0x0000 (pressure_velocity_continuum) 64-byte wire record.
RelaxationProcess
Single molecular/chemical acoustic relaxation mechanism.
RirAcousticsReport
Complete ISO 3382-1 room impulse response (RIR) decay and clarity analysis.
RoomGeometry
Room geometry and acoustic boundary model for $T_{60}$ calculations.
StaggeredFluidOffsets
Staggered component offsets in fractions of grid spacing and solver clock ticks (AQ-02).
SurfacePatch
Surface patch with area $S_i$ ($\text{m}^2$) and random-incidence absorption coefficient $\alpha_i$.
TensorStrain6
Six-component symmetric small-strain tensor in canonical QAC order: [\varepsilon_{xx}, \varepsilon_{yy}, \varepsilon_{zz}, \varepsilon_{xy}, \varepsilon_{yz}, \varepsilon_{xz}].

Enums§

ElasticBoundaryCondition
Boundary condition for the 3D Virieux staggered-grid elastic solver.
FluidBoundaryCondition
Boundary condition kind for the 3D fluid FDTD solver.
HelmholtzBoundary
Boundary condition for the 3D Helmholtz grid.
HelmholtzStencil
Finite-difference stencil choice for the 3D Helmholtz operator.
NumericalError
Errors raised by QAC numerical continuum and room/dispersion solvers.

Constants§

B32_UNIT_ROUNDOFF
Single-precision unit roundoff constant $u_{32} = 2^{-24}$ defined by the C02 B32 arithmetic budget.
ELASTIC_STRESS_VELOCITY_RECORD_STRIDE
Exact record stride in bytes for Mode 0x0001.
ESV_DEFINED_VALIDITY_MASK
Mask of all defined validity bits in Mode 0x0001.
ESV_VALID_DISPLACEMENT
Validity bit for particle displacement displacement_m.
ESV_VALID_STRESS
Validity bit for 6-component Cauchy stress stress_xx_yy_zz_xy_yz_xz_pa.
ESV_VALID_VELOCITY
Validity bit for particle velocity velocity_m_s.
MODE_ELASTIC_STRESS_VELOCITY_CONTINUUM
Canonical QAC mode identifier for elastic_stress_velocity_continuum.
MODE_PRESSURE_VELOCITY_CONTINUUM
Canonical QAC mode identifier for pressure_velocity_continuum.
PRESSURE_VELOCITY_RECORD_STRIDE
Exact record stride in bytes for Mode 0x0000.
PV_DEFINED_VALIDITY_MASK
Mask of all defined validity bits in Mode 0x0000.
PV_VALID_ENERGY_DENSITY
Validity bit for collocated energy density energy_density_j_m3.
PV_VALID_INTENSITY
Validity bit for collocated acoustic intensity intensity_w_m2.
PV_VALID_POSITION
Validity bit flags for PressureVelocityRecord.
PV_VALID_PRESSURE
Validity bit for acoustic pressure perturbation pressure_pa.
PV_VALID_VELOCITY
Validity bit for particle velocity vector particle_velocity_m_s.
RT60_NUMERATOR_55_25
Canonical numerator constant $55.25 = \frac{60 \times 4}{\ln(10)^{-1}} \approx 24\ln(10)$ used in the Sabine/Eyring/Millington formulas.
RT60_NUMERATOR_EXACT_24LN10
Exact theoretical numerator $24\ln(10) \approx 55.2620422318571$.

Functions§

analyze_room_impulse_response
Perform full ISO 3382-1 analysis on a discrete room impulse response $h[n]$ sampled at sample_rate_hz.
apply_helmholtz_operator
Apply the 3D discrete Helmholtz operator $A\hat{p} = (\nabla_h^2 + k^2)\hat{p}$ into out.
assert_b32_scalar_budget
Assert that actual agrees with y_ref within the C02 B32 budget at characteristic scale scale_s.
b32_scalar_tolerance
Compute the C02 B32 scalar absolute error tolerance for a reference value y_ref at characteristic physical scale scale_s: $$\text{tol}(y_{\text{ref}}, S) = 8 u_{32} S + 2\times 10^{-6} |y_{\text{ref}}|, \qquad u_{32} = 2^{-24}$$
collocate_fluid_cell
Interpolate staggered velocities in space and time to cell center (ix, iy, iz) at step $n$.
evaluate_direct_energy_and_intensity
Evaluate collocated energy density and intensity only when the offsets are collocated; rejects direct multiplication of staggered fields without interpolation (C02 Mode 00).
fit_decay_rt60_s
Fit linear least-squares decay slope on edc_db between start_db (e.g. -5.0) and end_db (e.g. -35.0) and return the extrapolated $-60\text{ dB}$ decay time $T_{60}$ in seconds.
helmholtz_greens_function_3d
Analytical 3D free-space outgoing Green’s function $$G(r) = \frac{e^{i k r}}{4\pi r}, \qquad r = |\mathbf{x} - \mathbf{x}_0|_2 > 0$$ Rejects $r \le 0$ singularity per C02.
rectangular_cavity_eigenfrequency_hz
Analytical eigenfrequency $f_{n_x,n_y,n_z}$ (in Hz) of a 3D rectangular acoustic cavity with side lengths $(L_x, L_y, L_z)$, sound speed $c$, and mode indices $(n_x, n_y, n_z)$: $$f_{n_x,n_y,n_z} = \frac{c}{2}\sqrt{\left(\frac{n_x}{L_x}\right)^2 + \left(\frac{n_y}{L_y}\right)^2 + \left(\frac{n_z}{L_z}\right)^2}$$
rectangular_cavity_eigenmode_value
Evaluate the analytical standing-wave eigenmode shape in a 3D rectangular cavity at pos_m:
schroeder_backward_integration_db
Compute the normalized Schroeder backward energy integration curve in dB: $$E(k) = \sum_{n=k}^{N-1} h[n]^2, \qquad L_{\text{EDC}}(k) = 10\log_{10}!\left(\frac{E(k)}{E(0)}\right)$$ Rejects empty, non-finite, or all-zero silent impulse responses (C02-C01 / AQ-04).
solve_helmholtz_bicgstab
Solve $(\nabla_h^2 + k^2)\hat{p} = -\hat{s}$ (where rhs is $-\hat{s}$) using BiCGSTAB over caller-owned workspace with zero heap allocations inside the loop.
step_elastic_virieux_in_place
Advance the 3D Virieux staggered-grid elastic state by one full leapfrog step $\Delta t$ with zero heap allocations on the hot path.
step_fluid_fdtd_in_place
Advance the 3D staggered-grid fluid FDTD state by one full leapfrog step $\Delta t$ with zero heap allocations on the hot path.
step_helmholtz_jacobi
Damped Jacobi relaxation step for the 3D Helmholtz operator over caller-owned workspace.