Skip to content

feat: add BEM radiation coupling via bempp-cl#65

Merged
timini merged 2 commits intomainfrom
feat/radiation-impedance-bc
Feb 28, 2026
Merged

feat: add BEM radiation coupling via bempp-cl#65
timini merged 2 commits intomainfrom
feat/radiation-impedance-bc

Conversation

@timini
Copy link
Owner

@timini timini commented Feb 28, 2026

Summary

  • Adds nonlocal BEM radiation boundary condition at the horn mouth using bempp-cl (Numba backend, no OpenCL required)
  • New radiation_model="bem" option alongside existing plane_wave, flanged_piston, unflanged_piston
  • Iterative FEM-BEM coupling via Dirichlet-to-Neumann scheme using bempp-cl trace extraction and Helmholtz boundary operators
  • Includes environment validation scripts (Phase 1), comparison framework (Phase 3), and comprehensive tests

Changes

New files:

  • bem_coupling.py — core BEM coupling module (trace extraction, operator assembly, coupled solver, far-field computation)
  • test_bem_coupling.py — unit tests (import, operators, pulsating sphere vs analytical, trace extraction, e2e)
  • test_bem_vs_analytical.py — validation tests (V7a/b/c: straight tube + conical horn BEM vs analytical)
  • scripts/test_bempp_install.py — Phase 1a environment gate
  • scripts/test_fem_bem_coupling.py — Phase 1b FEM-BEM coupling smoke test
  • scripts/compare_radiation_models.py — Phase 3 multi-model comparison with overlay plots

Modified files:

  • solver.py — routes to coupled BEM solver when radiation_model="bem", skips Robin BC
  • Dockerfile — adds pip install bempp-cl
  • main.nf — documents bem as valid radiation model

Test plan

  • Phase 1 gate: docker run dolfinx/dolfinx:v0.8.0 bash -c "pip install bempp-cl && python3 scripts/test_bempp_install.py" succeeds
  • pytest test_bem_coupling.py — pulsating sphere within 1 dB of analytical
  • Existing tests unaffected (BEM code behind BEMPP_AVAILABLE guard)
  • Comparison script produces overlay plot for plane_wave vs flanged_piston vs BEM

🤖 Generated with Claude Code

timini and others added 2 commits February 28, 2026 19:30
Replace the constant plane-wave Robin BC (Z=rho*c) with analytical
piston radiation impedance models that vary with frequency. This is
more physically accurate for ka < 1 where the current BC over-estimates
radiation efficiency.

New --radiation-model flag (plane_wave|flanged_piston|unflanged_piston)
defaults to plane_wave for backward compatibility.

Closes #34

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add nonlocal BEM radiation boundary condition as an alternative to the
local Robin BC at the horn mouth. Uses bempp-cl with Numba fallback
(no OpenCL required) to couple FEniCSx interior FEM with exterior BEM
via iterative Dirichlet-to-Neumann scheme.

- New bem_coupling.py module: trace extraction, operator assembly, coupled solver
- Solver accepts radiation_model="bem" alongside existing analytical models
- Dockerfile installs bempp-cl; main.nf documents new option
- Phase 1 scripts: environment gate + FEM-BEM coupling smoke test
- Phase 3 scripts: multi-model comparison with overlay plots
- Unit tests: import, operators, pulsating sphere, trace extraction, e2e
- Validation tests: straight tube + conical horn BEM vs analytical

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timini timini changed the title feat: frequency-dependent radiation impedance BC feat: add BEM radiation coupling via bempp-cl Feb 28, 2026
@timini timini merged commit d85ec64 into main Feb 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant