Skip to main content

Module helmholtz

Module helmholtz 

Expand description

3D Helmholtz Frequency-Domain Solver & Green’s Function Oracle.

Implements the frequency-domain acoustic wave equation: $$(\nabla^2 + k^2)\hat{p}(\mathbf{x}) = -\hat{s}(\mathbf{x}), \qquad k = \frac{\omega}{c(\omega)} + i\alpha(\omega)$$

  • Complex arithmetic (Complex64) with explicit f64 real/imaginary lanes.
  • 7-point standard second-order and 27-point isotropic dispersion-minimizing 3D finite-difference stencils.
  • Zero-allocation iterative solvers (damped Jacobi and preconditioned BiCGSTAB) operating on caller-supplied HelmholtzWorkspace buffers.
  • Analytical free-space 3D Green’s function $G(r) = \frac{e^{ikr}}{4\pi r}$ ($r > 0$) and rectangular cavity Dirichlet/Neumann eigenfrequencies and eigenmodes.

Structs§

Complex64
Complex double-precision scalar re + i * im.
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.

Enums§

HelmholtzBoundary
Boundary condition for the 3D Helmholtz grid.
HelmholtzStencil
Finite-difference stencil choice for the 3D Helmholtz operator.

Functions§

apply_helmholtz_operator
Apply the 3D discrete Helmholtz operator $A\hat{p} = (\nabla_h^2 + k^2)\hat{p}$ into out.
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:
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_helmholtz_jacobi
Damped Jacobi relaxation step for the 3D Helmholtz operator over caller-owned workspace.