Skip to main content

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.

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] m2 with wave speed of 38 m/s and grid spacing of 1 cm
  • point source of frequency 29 Hz located at the center of the domain
  • the second-order Engquist-Majda absorbing boundary condition is used to prevent boundary reflections
  • second-order finite-difference (FD) schemes are used
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

Here is another example in which several parameters were manually set. These include the grid spacing h = 10 m, the horizontal and vertical domain limits = [0,1000], [0,500], respectively, the wave speed = 1000 m/s, the point source frequency = 10 Hz and location = [500, 250]. In addition, the perfectly matched layer (PML) is used as the absorbing boundary method, and the fourth-order FD schemes are used in the calculation.

import pyhelmholtz as ph
domain = ph.Domain(h=10, limits=[0,1000,0,500], v=1000)
source = ph.PointSource(freq=10, xs=500, ys=250)
ho = ph.Helmholtz(domain=domain, abm=ph.PML(), source=source, fd=ph.FD(4))
ho.solve()
ho.viz()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for pyhelmholtz 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhelmholtz 0.1.11
File Size Uploaded Provenance Actions
pyhelmholtz-0.1.11.tar.gz 31.0 kB Without provenance Details for pyhelmholtz-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyhelmholtz 0.1.11
File Interpreter ABI Platform Actions
pyhelmholtz-0.1.11-py3-none-any.whl Python 3 none any Details for pyhelmholtz-0.1.11-py3-none-any.whl

Total release size: 52.1 kB

Release files / pyhelmholtz-0.1.11.tar.gz

Download URL pyhelmholtz-0.1.11.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c5c577f3a4ec53667e34f2612e46f00c948476f5d6729e8da4d3f42c3383c889
BLAKE2b-256 checksum
How to use checksums
0d1a587536fa30804df9af9b796382d06aad6791b9998e8823341b3b71b0bd49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / pyhelmholtz-0.1.11-py3-none-any.whl

Download URL pyhelmholtz-0.1.11-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5debd03daac957637f3428d056dc27639ad8505fa142190919a915d2e605985
BLAKE2b-256 checksum
How to use checksums
9d7549efa7fb3a1912a247d9555645f6a1b80830bf4791cf4c5e6a89a2a7f356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Security for pyhelmholtz 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page