Metadata-Version: 2.4
Name: radbondi
Version: 0.3.0
Summary: Time-dependent spherical Bondi accretion with radiative cooling
Project-URL: Homepage, https://github.com/matteocantiello/radbondi
Project-URL: Issues, https://github.com/matteocantiello/radbondi/issues
Author: Matteo Cantiello
License: MIT License
        
        Copyright (c) 2026 Matteo Cantiello and contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: accretion,astrophysics,black-holes,bondi,hydrodynamics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Provides-Extra: dev
Requires-Dist: matplotlib>=3.7; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: plot
Requires-Dist: matplotlib>=3.7; extra == 'plot'
Description-Content-Type: text/markdown

# radbondi

[![tests](https://github.com/matteocantiello/radbondi/actions/workflows/test.yml/badge.svg)](https://github.com/matteocantiello/radbondi/actions/workflows/test.yml)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](pyproject.toml)

Time-dependent spherical Bondi accretion with radiative cooling.

`radbondi` solves the 1D spherical Euler equations with an implicit cooling
source term, evolving the flow from an initial adiabatic Bondi profile to
a self-consistent steady state. It is designed for problems where the standard
ODE shooting method fails — e.g., when cooling is strong enough that the sonic
point becomes a focus (complex eigenvalues) rather than a saddle.

The default microphysics (relativistic bremsstrahlung + e⁺e⁻ and μ⁺μ⁻
pair annihilation) targets accretion onto compact objects in hot, dense
environments such as stellar interiors, but the cooling module is plug-in:
users can add their own processes by subclassing `CoolingProcess`.

## Status

**Alpha.** API may change. See `CHANGELOG.md` for releases.

## Installation

```bash
pip install -e ".[dev]"   # development install
```

## Quickstart

```python
import radbondi as rb

ambient = rb.presets.solar_core()
problem = rb.BondiProblem(M_BH=1e-16 * rb.M_sun, ambient=ambient)
sol = problem.solve(rb.SolverConfig(N=800, x_min=3e-6))

print(f"eta = {sol.eta:.3e}")
sol.plot_profiles()
```

## Documentation

See the [`docs/`](docs/README.md) directory:

- [**usage.md**](docs/usage.md) — installation, quickstart, API, and all
  `SolverConfig` knobs.
- [**physics.md**](docs/physics.md) — equations, Bondi solution,
  microphysics, and feedback models.
- [**scheme.md**](docs/scheme.md) — finite-volume discretization,
  well-balancing, and implicit cooling.

## Citation

If you use `radbondi` in published work, please cite both the software and
the paper describing the underlying physics. See [`CITATION.cff`](CITATION.cff)
for machine-readable metadata; GitHub renders a "Cite this repository" button
on the project page.

> Cantiello et al. (in prep.)

## License

MIT — see [LICENSE](LICENSE).
