ᴄBHBᴅ
A fast code for simulating star clusters and black hole dynamics.
ᴄBHBᴅ can be used for
- the evolution of a star cluster with black holes in a tidal field
- population synthesis of binary black hole mergers in a time-evolving star cluster
If you use ᴄBHBᴅ in any publication, please cite it as follows:
ᴄBHBᴅ (Antonini & Gieles 2020; Antonini et al. 2023), with the updates of Fronimos Pouliasis et al. (2025), Chattopadhyay et al. (2026), and Marín Pina et al. (in prep)
ᴄBHBᴅ stands for the combination of ᴄʟᴜsᴛᴇʀBH (the code for the cluster evolution) and BHBᴅʏɴᴀᴍɪᴄs (the code for the black hole mergers).
Installation
The cBHBd package can be installed using pip:
pip install cbhbd
All required dependencies will be installed automatically.
You can also simply download the ᴄBHBᴅ package source from this repository and install or place it into your path:
git clone https://github.com/cBHBd/cBHBd
Running ᴄBHBᴅ
You can run ᴄBHBᴅ as
from cbhbd.cbhbd import CBHBD
c = CBHBD(...)
with the following arguments:
N: Initial number of stars orM0: Initial cluster massrhoh0: Initial half-mass density [Msun/pc^3] orrh0: Initial half-mass radius [pc]Z: Metallicity orFeH: Metallicity as in [Fe/H]kwargs: Additional parameters to override defaults (see code comments in theCBHBDclass and theClusterclass)
If you only want to run the cluster evolution, you can use compute_mergers=False for efficiency
Analysing the ᴄBHBᴅ output
The output of the simulations is stored in a CBHBD object. The cluster properties can be accessed from c.cluster.
See cluster.py for the full documentation.
c.cluster.Mst # Total stellar mass in the cluster as function of time
c.cluster.Mbh # Total BH mass in the cluster as function of time
c.cluster.rh # Half-mass radius of the cluster as function of time
...
c.cluster.Mst_interp(t) # For convenience, you can also interpolate the cluster properties at any time using the interpolating functions
The merger properties are stored in a pandas.Dataframe in c.mergers. See mergers.py for the full documentation.
c.mergers # The merger data, use print(c.mergers) to see a table of the merger properties
c.mergers.m1 # The mass of the primary
c.mergers.merger_type # The type of merger (ejected, gw_capture, ...), see the code for the full documentation
...
c.mergers.to_numpy() # You can also export the merger data to a numpy array
Metadata
Release files for cbhbd 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cbhbd-1.0.3.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cbhbd-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / cbhbd-1.0.3.tar.gz
| Download URL | cbhbd-1.0.3.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60c3da0b423443222623d4b6d186389690f24322dd701e9992d2d041542dceca
|
|
BLAKE2b-256 checksum How to use checksums |
1f792727ac7d97354219b72549f9ddb3f8253885427c02e5c52a16a242b0eddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / cbhbd-1.0.3-py3-none-any.whl
| Download URL | cbhbd-1.0.3-py3-none-any.whl |
|---|---|
| Size | 64.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4f0cbc925a9aa7a4d629dd2d601e71aa8548c9f714d2c3d54538b126c6884d8
|
|
BLAKE2b-256 checksum How to use checksums |
8fa790ecbd33540c28b625c2a10501d18268d5b4986af9e595342330c3be842a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log