Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

gwbpy

Gravitational-wave visualization for Blender.

Status: alpha (v0.1.0). Not on PyPI yet. Expect rough edges.

Currently one function, animate_binary_physical(): two black holes spiral together and merge, driven by SEOBNRv5HM effective-one-body dynamics.

Tested on

  • Blender 5.0 on Windows, with Ubuntu 24.04 under WSL2
  • The setup script on Ubuntu 24.04

Not tested: macOS, other Linux distributions, Windows without WSL.

How it works

Blender's Python cannot run the physics libraries, so gwbpy builds a separate Python 3.11 environment at ~/.gwbpy/dynamics-env (inside WSL on Windows) containing pyseobnr and lalsuite. Animation calls run a small worker in that environment, read the result back, and keyframe it in Blender.

Install

  1. Install system packages once, in a Linux or WSL terminal:

     sudo apt update && sudo apt install -y python3-venv libgsl-dev swig build-essential libfftw3-dev libhdf5-dev
    
  2. Make gwbpy importable in Blender. Until it is on PyPI, clone this repository and, in Blender's Scripting tab, run (with the folder that contains gwbpy/):

     import sys
     sys.path.insert(0, r"PATH_TO_FOLDER_CONTAINING_gwbpy")
     import gwbpy
    
  3. Build the physics environment, once:

     gwbpy.setup()
    

    The first run builds from source and takes about 10 minutes. Blender may look frozen meanwhile. Window > Toggle System Console shows progress. If system packages are missing, setup stops and prints the exact command to run. Use gwbpy.setup(force=True) to rebuild.

Example

gwbpy.animate_binary_physical(m1=30, m2=15, merge_frame=100, frames=200,
                              f_lower=80.0, meters_per_unit=20000.0)

Main parameters

Parameter Meaning
m1, m2 Masses in solar masses
f_lower Starting GW frequency in Hz. Higher means fewer orbits
initial_separation_km Alternative to f_lower (converted with Kepler's law)
merge_frame Frame at which the dynamics end (merger)
frames Total clip length (default merge_frame + 50)
meters_per_unit Real meters per Blender unit; scales orbit and spheres together
close_merger Schematically close any remaining gap (default True)
show_paths Show motion-path trails

The console reports the real inspiral duration, the slowdown factor, the number of frames per orbit at the start, and how long any schematic closing step is. Read these before putting numbers on a slide.

What is physics and what is not

  • Orbital separation and phase come from the SEOBNRv5HM effective-one-body dynamics. Separation is the EOB radial coordinate, not a literal horizon position.
  • Sphere sizes are the Schwarzschild radii of the two masses. The bodies are non-spinning and do not deform.
  • Each body sits at its Newtonian center-of-mass fraction of the separation.
  • Time is stretched. The slowdown factor is printed.
  • If the data ends slightly short of the horizons touching, a short schematic closing step finishes the merger. It is a visual stand-in, not physics. close_merger=False removes it. The ringdown is not modeled.
  • Non-spinning only for now.

Known limits

  • The model never starts closer than a separation of 10 M. A requested start frequency above about 2044 / (m1 + m2) Hz (masses in solar masses) is lowered to that value, and a note is printed. Every run therefore has at least about 5 orbits.
  • Frames per orbit matters. If the console warns about more than half a turn per frame, the motion will look aliased. Raise merge_frame, or reduce the number of orbits with a higher f_lower.

Citing

pyseobnr asks that results made with it acknowledge the software and the model papers:

  • Mihaylov et al., "pySEOBNR: a software package for the next generation of effective-one-body multipolar waveform models", arXiv:2303.18203
  • Pompili et al., "Laying the foundation of the effective-one-body waveform models SEOBNRv5", arXiv:2303.18039

(Citations copied from the pyseobnr PyPI page. Check them before use.)

License

To be decided. pyseobnr is GPL-3.0-or-later.

Metadata

Release files for gwbpy 0.1.0a1

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

Source distribution (sdist)

Source distribution for gwbpy 0.1.0a1
File Size Uploaded
gwbpy-0.1.0a1.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gwbpy 0.1.0a1
File Interpreter ABI Platform
gwbpy-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / gwbpy-0.1.0a1.tar.gz

Download URL gwbpy-0.1.0a1.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6a3ea4cdc44b5662e271034c42f70454173a5073a515163c4689d04b2d9ad256
BLAKE2b-256 checksum
How to use checksums
4daebd44a37ed9434053e77b99ad5cdf12e26162403be3819aa303957f2ef542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / gwbpy-0.1.0a1-py3-none-any.whl

Download URL gwbpy-0.1.0a1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd3fe99dbbcabdf0dcc85b0d1cf43c84e2c10c46714d68f1526f6ca99d30f565
BLAKE2b-256 checksum
How to use checksums
463315bbf43fc82203b9ab23053a336348d362cf665ed965ae407505a0608c32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

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