PyHelmholtz is a framework for benchmarking absorbing boundary methods for 2D Helmholtz equation.
Project description
PyHelmholtz
A Python package for solving the 2D Helmholtz equation and benchmarking absorbing boundary methods.
Features
- Fast frequency-domain wave propagation modeling.
- Support for standard sparse direct solvers via SciPy.
- Optional high-performance nested dissection algorithms via SuiteSparse.
- Optional parallel direct solver acceleration via MUMPS.
Installation
PyHelmholtz provides three installation tiers depending on your performance needs and platform.
1. Standard Installation (Recommended)
If you only need standard solvers using SciPy's spsolve(), you can install PyHelmholtz instantly with no external C-library or compiler requirements:
pip install pyhelmholtz
2. With Nested Dissection Support (Optional)
To enable advanced nested dissection algorithms, the package requires scikit-sparse. Because this depends on underlying SuiteSparse C-libraries, it is highly recommended to install the dependencies via Conda first to avoid compilation issues (especially on Windows):
# Install the C-libraries and pre-compiled wrapper via Conda
conda install -c conda-forge scikit-sparse
# Install PyHelmholtz with the optional suitesparse feature flag
pip install pyhelmholtz[suitesparse]
3. With MUMPS Acceleration (Optional, Linux only)
For large-scale problems requiring parallel direct solvers, PyHelmholtz interfaces with MUMPS via PyMUMPS.
Because this relies on compiled Fortran, MPI, and BLAS/LAPACK binaries, you must install the system MUMPS libraries first before installing the Python package:
# Install system MUMPS and MPI development libraries (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install libmumps-dev
# Install PyHelmholtz with the optional mumps feature flag
pip install pyhelmholtz[mumps]
Quick Start
Here is a quick example of how to use PyHelmholtz to solve the Helmholtz equation using the default parameters:
- homogeneous domain of size [-1,1]x[-1,1] m^2 with wave speed of 3e8 m/s and grid spacing of 1 cm
- point source of frequency 2e9 Hz located at the center of the domain
import pyhelmholtz as ph
ho = ph. Helmholtz () # create an Helmholtz object with default parameters
ho. solve () # SciPy ’s spsolve () is used by default as the sparse linear solver
ho. viz () # visualize the real part of the wave field u
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhelmholtz-0.1.2.tar.gz.
File metadata
- Download URL: pyhelmholtz-0.1.2.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cdc131a8b600234f6c18d156a5a6ac454ccc224fa3a7d1288bd8c331c126644
|
|
| MD5 |
80cf52425fffa4420c372d2f55acddc1
|
|
| BLAKE2b-256 |
881be3fc2bc89c3a1e89472da437e0a94c50429a9dd0021c603d199ac402e042
|
File details
Details for the file pyhelmholtz-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyhelmholtz-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dac845840baa5e61b8fa6349b8cd56d2de6c2c490a9c6552da2b68fc6cf87fa
|
|
| MD5 |
73b5b40e3be7c3119bb9d77d772318f8
|
|
| BLAKE2b-256 |
68fc958eb5bd84b6af88f96830f09a37d21acd49d5d59de6347b283cfaf88717
|