Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/computationalphysiology/circulation
Cardiac Circulation Models
https://github.com/computationalphysiology/circulation
Last synced: about 2 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 (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T20:29:09.000Z (about 2 months ago)
- Last Synced: 2024-11-28T21:27:03.298Z (about 2 months ago)
- Language: Python
- Homepage: https://computationalphysiology.github.io/circulation/
- Size: 90.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
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()
```
![_](https://raw.githubusercontent.com/ComputationalPhysiology/circulation/main/docs/_static/regazzoni.png)See more examples in the [documentation](https://computationalphysiology.github.io/circulation).
# License
MIT