Python API for Fluid-solid interaction FEM simulations
Project description
LoudPy
LoudPy is an open-source Python solver dedicated to loudspeaker finite element simulation, released under the GPL-3.0 license.
Overview
Designing a loudspeaker with FEM means choosing between complex general-purpose tools that require deep expertise, or expensive commercial software. LoudPy is a free, Python-based alternative built specifically for loudspeaker/transducer engineers and researchers.
Starting from a CAD file of your loudspeaker, LoudPy lets you:
- run harmonic frequency-domain simulations (structural, acoustic, or fully coupled FSI)
- extract eigenfrequencies and mode shapes of the mechanical structure
- simulate nonlinear transient behaviour under single-tone or multi-tone excitation
- post-process and plot results directly as NumPy arrays
It is built entirely on NumPy and SciPy — no external FEM library required.
This project was developed by Romain Degraeve as part of the IMDEA Master's programme in Acoustics (International Master Degree in Acoustics).
Installation
The easiest way to install LoudPy is via pip:
pip install loudpy
For development installation, see the Developer Setup section below.
Examples
The LoudPy_exemples/ folder contains ready-to-run scripts:
| Example | Description |
|---|---|
Frequency_study/FSI |
Coupled structural–acoustic frequency sweep |
Frequency_study/Meca |
Mechanical-only frequency sweep |
Eigen_study |
Complex eigenfrequency analysis |
Time_study/Single_tone |
Nonlinear time-domain simulation, single tone |
Time_study/Multitone |
Nonlinear time-domain simulation, multi-tone |
Publication
LoudPy will be presented at Acousticum 2026 — paper link (ref. 226).
Contributing
If you want to contribute to this open-source project, feel free to reach out:
- Email: rom2graeve@gmail.com
- LinkedIn: Romain Degraeve
Technical Details
Workflow
LoudPy handles 2D axisymmetric geometries. The full pipeline is:
- Import — a STEP file is loaded and converted to BREP format by LoudPy
- Physical entity assignment — the Gmsh standalone app is used to
assign named physical groups: closed curve loops define subdomains, individual curves define
boundaries. This produces two paired files: a
.brep(geometry) and a.geo(named entities) - Meshing — LoudPy loads both files, links named entities to materials and boundary conditions, and generates the mesh via the Gmsh Python API (bundled — no separate install needed)
- Solve — the chosen study assembles and solves the FEM system
- Export — results are saved to HDF5 (
.h5) files; fields and coordinates are stored as NumPy arrays and reloaded with the built-in reader classes
Solvers
| Study | Class | Description |
|---|---|---|
| Frequency-domain FSI | FreqStudy |
Coupled structural–acoustic harmonic solver |
| Frequency-domain meca | FreqStudy |
Mechanical-only harmonic solver |
| Complex eigenvalue | EigenStudy |
Complex eigenfrequency analysis (mechanical domain) |
| Nonlinear time-domain | TimeStudy |
Geometrically nonlinear transient solver |
Physics
- Structural domain — 2D axisymmetric linear elasticity, T6 elements
- Acoustic domain — pressure-based formulation, T6 elements
- Fluid-structure coupling —
InterfaceAcouMecacoupling assembled automatically - Damping — Rayleigh (
α,β) and hysteretic (η), both supporting non-proportional formulations - Radiation — Perfectly Matched Layer (PML) for free-field acoustic radiation
Material Library
Built-in materials (materials.json): Polypropylene, Paper, Copper, Rubber, Kapton,
PhenolicCloth, Air, SolidGlue. Custom materials can be added to the JSON file or defined
directly in the study script.
Post-processing
FreqReader/EigenReader/TimeReader— context-managed HDF5 readersextract_subdomain(snap, name, field)— field values restricted to a named subdomainextract_interface(snap, name, field)— field values along a coupling interface- Built-in plotting: SPL sweeps, field maps, deformed interface, mechanical sweeps
Developer Setup
LoudPy uses PDM for package management.
Install PDM via pipx (recommended — keeps PDM isolated):
pipx install pdm
Or via uv:
uv pip install pdm
Verify:
pdm --version
Install LoudPy in editable mode:
pdm install -e .
LoudPy is developed under Python 3.13. To install it with uv:
uv python install 3.13
Project details
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 loudpy-0.0.6.tar.gz.
File metadata
- Download URL: loudpy-0.0.6.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.27.0 CPython/3.13.9 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a8084e7b5f22112ff3179c5394d1d5c1668250e74923cdb0325803cdcd7d9f
|
|
| MD5 |
825baca9cc167d03aecf7c4a5f55ce5f
|
|
| BLAKE2b-256 |
84f34985ff71713112531ceb1c34b9d3602e232e2c6d31ec3058ed8080b33511
|
File details
Details for the file loudpy-0.0.6-py3-none-any.whl.
File metadata
- Download URL: loudpy-0.0.6-py3-none-any.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.27.0 CPython/3.13.9 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
032d7d30915cd33a22316515579e0d60e583b3d0e5bf429497db9a7f7833cb6d
|
|
| MD5 |
595515fb74b7c595eafdbda118f24c8b
|
|
| BLAKE2b-256 |
6af5e1ba65e9e996e296ff4072cd9f9bc0427c271fd41b03456cc7d750be34a6
|