A fast code for simulating star cluster and black hole dynamics
Project description
ᴄ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
Project details
Release history Release notifications | RSS feed
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 cbhbd-1.0.1.tar.gz.
File metadata
- Download URL: cbhbd-1.0.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d75ba1664d52d26347630656f5f04af6fee4b80d7f95b35163d9ea2534f1d5
|
|
| MD5 |
9bc3c4dbb776341fa13df96347ec0142
|
|
| BLAKE2b-256 |
415eb3699ca01b090d2f725d1beb8e9c0974d9fb5b93475efafa9a30cc23cc98
|
Provenance
The following attestation bundles were made for cbhbd-1.0.1.tar.gz:
Publisher:
publish.yml on cBHBd/cBHBd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cbhbd-1.0.1.tar.gz -
Subject digest:
c5d75ba1664d52d26347630656f5f04af6fee4b80d7f95b35163d9ea2534f1d5 - Sigstore transparency entry: 1790228162
- Sigstore integration time:
-
Permalink:
cBHBd/cBHBd@3c1c8b965bb2c1005aa8aa46f3dee7ca2cd64f53 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/cBHBd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3c1c8b965bb2c1005aa8aa46f3dee7ca2cd64f53 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cbhbd-1.0.1-py3-none-any.whl.
File metadata
- Download URL: cbhbd-1.0.1-py3-none-any.whl
- Upload date:
- Size: 55.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ced707620573ea03d078b0d2331dcd18db332fce13aaff3d92cbd33177e6ce1
|
|
| MD5 |
1fb7140bdc6153f73a79ab792399d533
|
|
| BLAKE2b-256 |
cf496a532ca73975ccb3148e8276d7c64e2e124aba587916341dd86bb8b2be09
|
Provenance
The following attestation bundles were made for cbhbd-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on cBHBd/cBHBd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cbhbd-1.0.1-py3-none-any.whl -
Subject digest:
3ced707620573ea03d078b0d2331dcd18db332fce13aaff3d92cbd33177e6ce1 - Sigstore transparency entry: 1790228175
- Sigstore integration time:
-
Permalink:
cBHBd/cBHBd@3c1c8b965bb2c1005aa8aa46f3dee7ca2cd64f53 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/cBHBd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3c1c8b965bb2c1005aa8aa46f3dee7ca2cd64f53 -
Trigger Event:
push
-
Statement type: