Skip to main content

electroacPy

This module provides a collection of tools designed to streamline prototyping and analysis tasks in the field of electroacoustics. It consists of multiple modules, addressing specific aspects of loudspeaker-system design.

The main GitHub repository is located here. Examples are available in another repository. Documentation of the main repository is available on readthedocs.

Installation

Before Starting

  • The following steps have been verified on Windows and Linux for Python versions 3.9 to 3.12. For macOS, only version 3.9 has been tested. However, in theory, any version of Python should work as long as all dependencies are available.
  • You may want to try out different Python versions by creating multiple Conda environments.

Setting Up Python with Conda

The recommended installation method uses the Conda package manager for Python. You can install Conda through one of the following options:

  1. Anaconda: A full Python development suite that includes Spyder (IDE), Jupyter Notebook/Lab, and other tools.
    • Windows: Use the Anaconda Prompt to follow the installation steps.
    • macOS/Linux: Use your terminal (bash/zsh).
  2. Miniconda: A minimal version of Anaconda, including only the necessary packages for managing environments.
    • Windows: Use the Miniconda Prompt for installation.
    • macOS/Linux: Use your terminal (bash/zsh).
  3. Miniforge: A lightweight version similar to Miniconda, but community-driven, providing better architecture support (e.g., M1/M2 chips on macOS).
    • Windows: Use the Miniforge Prompt for installation.
    • macOS/Linux: Use your terminal (bash/zsh).

Creating a conda environment

If you decide to manage your Python environments with conda, you can setup a specific environment for electroacPy as follow:

  1. Create the environment
conda create -n acoustic_sim
  1. Activate the environment
conda activate acoustic_sim
  1. Install a version of Python compatible with electroacPy, as well as the pip package manager
conda install python=3.12 pip

These 3 steps are all you need to do before installing electroacPy.

The easiest way to install electroacpy is to use the PyPI repository. In your Python/Conda environment:

pip install electroacPy

Install from source

If however, you wish to install from source, you'll need first to download or clone the main repository --- here's a link to help you understand the process. Once you have downloaded what you need, you can use the following command (remember to be in your Python/Conda environment):

pip install /path/to/electroacPy

For development installation:

pip install -e /path/to/electroacPy

You'll need to replace /path/to/electroacPy by the actual location of the toolbox on your computer --- pointing to the folder containing the "pyproject.toml" file. For example, if you use Windows, the path can look like this: C:\Users\yourUsername\Documents\GitHub\electroacPy.

Notes

Using a separate environment: Installing ElectroacPy in its own Conda / Python environment is recommended. This helps prevent conflicts during updates and allows easier management of dependencies.

Selecting environments: In Python IDEs like Spyder or PyCharm, you can choose the specific Conda environment where ElectroacPy is installed.

Additional Steps for Spyder Users

If you plan to use Spyder:

You'll need to install spyder-kernels in the newly created environment:

pip install spyder-kernels

Alternatively, you can install Spyder directly in the environment to avoid needing spyder-kernels:

conda install spyder

OpenCL

In Windows and Linux, you can actually use the OpenCL backend to reduce computing time. In the corresponding Conda environment:

pip install pyopencl

You'll also need to install OpenCL drivers, which you'll find here for intel users. For more information, you can follow the OpenCL section from bempp-cl installation guide.


Modules

electroacPy

The ElectroacPy module is a toolkit for prototyping loudspeaker systems using Lumped Element Method (LEM). It is also a set of wrappers for bempp-cl to solve acoustic radiation problems using Boundary Elements. It offers capabilities to design filters and crossover networks.

bempp-cl

From bempp-cl website:

Bempp is an open-source computational boundary element platform to solve electrostatic, acoustic and electromagnetic problems. Features include:

  • Easy-to-use Python interface.
  • Support for triangular surface meshes.
  • Import and export in a number of formats, including Gmsh and VTK.
  • Easy formulation of acoustic and electromagnetic transmission problems.
  • CPU and GPU parallelisation.
  • A comprehensive operator algebra that makes it easy to formulate complex product operator formulations such as operator preconditioning.
  • Coupled FEM/BEM computations via interfaces to FEniCS.

Documentation

ElectroacPy's handbook can be found here. Full documentation is still in progress.

Contributing

If you encounter any issues or have suggestions for improvements, please feel free to fork and contribute. You can submit issues, pull requests, or even share your usage examples.

Acknowledgments

This toolbox uses the bempp-cl library for Boundary Element Method computations, which is provided directly in this repo. Many thanks to its authors and contributors, without whom this toolbox wouldn't have been available in its current form.

Licence

This toolbox, ElectroacPy, is licensed under the GNU General Public License, Version 3 (GPLv3).

Certain parts of the source code use bempp-cl, which is licensed under the MIT License. The MIT-licensed portions remain under their original license.

Metadata

Release files for electroacPy 2025.7.1

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

Source distribution (sdist)

Source distribution for electroacPy 2025.7.1
File Size Uploaded
electroacpy-2025.7.1.tar.gz 34.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for electroacPy 2025.7.1
File Interpreter ABI Platform
electroacpy-2025.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.0 MB

Release files / electroacpy-2025.7.1.tar.gz

Download URL electroacpy-2025.7.1.tar.gz
Size 34.0 MB
Tags Source
SHA-256 checksum
How to use checksums
669721fdbd578c5e7510a99130ccf5ad38303286f2fe17054787bb4e552bab61
BLAKE2b-256 checksum
How to use checksums
35d4f931636cd4d85f6847b046fca198d481f4f6ac1dd782be5db48a8f80c7f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / electroacpy-2025.7.1-py3-none-any.whl

Download URL electroacpy-2025.7.1-py3-none-any.whl
Size 34.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
131f54a003116bbe9049ffb5dc37264ee46de78d9c7eb62cf9f164e1a25ae857
BLAKE2b-256 checksum
How to use checksums
7fb7e2abb7fd5268348400ab4090c61d2defe57bdc39fd14bbd85289619d73b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12
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