Documentation: https://biem-helmholtz-sphere.readthedocs.io
Source Code: https://github.com/ultrasphere-dev/biem-helmholtz-sphere
Acoustic scattering from multiple n-spheres in NumPy / PyTorch
Install this via pip (or your favourite package manager):
pip install biem-helmholtz-sphereuvx biem-helmholtz-sphere serveBoundary Integral Equation Method (BIEM) for the Helmholtz equation.
Let
Asuume that
and scattered wave
The following code assumes
and computes the scattered wave at
>>> from array_api_compat import numpy as xp
>>> from biem_helmholtz_sphere import BIEMResultCalculator, biem, plane_wave
>>> from ultrasphere import create_from_branching_types
>>> c = create_from_branching_types("ba")
>>> uin, uin_grad = plane_wave(k=xp.asarray(1.0), direction=xp.asarray((1.0, 0.0, 0.0)))
>>> calc = biem(c, uin=uin, uin_grad=uin_grad, k=xp.asarray(1.0), n_end=6, eta=xp.asarray(1.0), centers=xp.asarray(((0.0, 2.0, 0.0), (0.0, -2.0, 0.0))), radii=xp.asarray((1.0, 1.0)), kind="outer")
>>> complex(xp.round(calc.uscat(xp.asarray((0.0, 0.0, 0.0))), 6))
(-0.741333-0.669657j)Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
This package was created with Copier and the browniebroke/pypackage-template project template.
