Skip to main content

ᴄBHBᴅ

CI Tests

A fast code for simulating star clusters and black hole dynamics.

ᴄBHBᴅ can be used for

  1. the evolution of a star cluster with black holes in a tidal field
  2. 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 or M0: Initial cluster mass
  • rhoh0: Initial half-mass density [Msun/pc^3] or rh0: Initial half-mass radius [pc]
  • Z: Metallicity or FeH: Metallicity as in [Fe/H]
  • kwargs: Additional parameters to override defaults (see code comments in the CBHBD class and the Cluster class)

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.4

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

Source distribution (sdist)

Source distribution for cbhbd 1.0.4
File Size Uploaded Provenance Actions
cbhbd-1.0.4.tar.gz 1.2 MB With provenance Details for cbhbd-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cbhbd 1.0.4
File Interpreter ABI Platform Actions
cbhbd-1.0.4-py3-none-any.whl Python 3 none any Details for cbhbd-1.0.4-py3-none-any.whl

Total release size: 1.3 MB

Release files / cbhbd-1.0.4.tar.gz

Download URL cbhbd-1.0.4.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e836c087c68f1f42aa00e02560f28b16dc31387e9c6b5df0f2bfc7b13f56f643
BLAKE2b-256 checksum
How to use checksums
f003ec4fd55aacbc3ac04723f424f743b9a5e35f4df245445b7c92cf1be43767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Release files / cbhbd-1.0.4-py3-none-any.whl

Download URL cbhbd-1.0.4-py3-none-any.whl
Size 64.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4338aec6ee7df9cfdd1e17a55f9d746a4807595b128f72c072318bab0dce8447
BLAKE2b-256 checksum
How to use checksums
02adf4ff07b614cfea19c85eb78aba09748c9450d49cb70fab6e9a7674105008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Security for cbhbd 1.0.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cbhbd-1.0.4.tar.gz

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 Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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