https://github.com/computationalPhysiology/circulation
Cardiac Circulation Models
https://github.com/computationalPhysiology/circulation
Last synced: 3 months ago
JSON representation
Cardiac Circulation Models
- Host: GitHub
- URL: https://github.com/computationalPhysiology/circulation
- Owner: ComputationalPhysiology
- License: mit
- Created: 2024-09-03T14:39:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-13T07:57:46.000Z (3 months ago)
- Last Synced: 2025-11-13T09:22:59.595Z (3 months ago)
- Language: Python
- Homepage: https://computationalphysiology.github.io/circulation/
- Size: 166 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome - circulation - 0D/1D blood flow simulator (Simulation software / Cardiac mechanics)
README
# Cardiac circulation models
This package provides a set of models for the circulation of blood in the heart and the rest of the body.
## Install
```
python -m pip install circulation
```
## Documentation
See https://computationalphysiology.github.io/circulation
# Usage
```python
import matplotlib.pyplot as plt
import circulation
# Create a model
model = circulation.regazzoni2020.Regazzoni2020()
# Solve the model for 5 seconds with a time step of 1 ms and an evaluation time step of 10 ms
results = model.solve(T=5.0, dt=1e-3, dt_eval=0.01)
# Print some information about the pressure, flows and volumes inside the model
model.print_info()
# Plot the pressure-volume loop
fig, ax = plt.subplots()
ax.plot(results["V_LV"], results["p_LV"])
ax.set_xlabel("V [mL]")
ax.set_ylabel("p [mmHg]")
plt.show()
```

See more examples in the [documentation](https://computationalphysiology.github.io/circulation).
# License
MIT