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 explicitf64real/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
HelmholtzWorkspacebuffers. - 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. - Helmholtz
Config - Configuration for the 3D Helmholtz operator $(\nabla^2 + k^2)\hat{p} = -\hat{s}$.
- Helmholtz
Solve Report - Convergence summary for an iterative 3D Helmholtz solve.
- Helmholtz
Workspace - Caller-owned workspace for zero-allocation BiCGSTAB and Jacobi Helmholtz solves.
Enums§
- Helmholtz
Boundary - Boundary condition for the 3D Helmholtz grid.
- Helmholtz
Stencil - 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
rhsis $-\hat{s}$) using BiCGSTAB over caller-ownedworkspacewith zero heap allocations inside the loop. - step_
helmholtz_ jacobi - Damped Jacobi relaxation step for the 3D Helmholtz operator over caller-owned workspace.