Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/merck/rtdpy
Residence Time Distribution modeling in Python.
https://github.com/merck/rtdpy
process-development python residence-time-distribution
Last synced: about 2 months ago
JSON representation
Residence Time Distribution modeling in Python.
- Host: GitHub
- URL: https://github.com/merck/rtdpy
- Owner: Merck
- License: mit
- Created: 2019-03-15T14:02:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T13:11:27.000Z (over 3 years ago)
- Last Synced: 2024-09-24T03:18:59.397Z (3 months ago)
- Topics: process-development, python, residence-time-distribution
- Language: Python
- Homepage: https://merck.github.io/rtdpy/
- Size: 2.06 MB
- Stars: 7
- Watchers: 6
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# rtdpy
Residence Time Distribution modeling in Python.
[https://merck.github.io/rtdpy](https://merck.github.io/rtdpy/)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.01621/status.svg)](https://doi.org/10.21105/joss.01621)
## A simple example
Create a family of tanks in series (N-CSTRs) and analyze them
```python
import matplotlib.pyplot as plt
import rtdpy
for n in [1, 2, 5, 10, 100]:
a = rtdpy.Ncstr(tau=1, n=n, dt=.001, time_end=5)
plt.plot(a.time, a.exitage, label="n={}".format(n))
plt.legend()
plt.xlabel('Time')
plt.ylabel('Exit Age Function')
plt.title('Impulse Responses')
```![N-Cstr RTDs](images/ncstr.png?raw=true "N-Cstr RTDs")
## Installation
```bash
pip install rtdpy
```## Issues/Requests/Contributions
See [CONTRIBUTING.md](CONTRIBUTING.md)## Testing
Tests are written using `pytest`. `numpy` and `scipy` must also be installed in the environment if using `pytest` directly. `tox` can also be used to test against Python versions 3.5, 3.6, and 3.7. See [pytest documentation](https://docs.pytest.org/en/latest/) for how to use and interpret pytest results.It is recommended to use a virtual environment for developing/testing.
```bash
git clone https://github.com/Merck/rtdpy.git # or use your forked repo
cd rtdpy
python3 -m venv .venv
source .venv/bin/activate
pip install -e . # will also install numpy and scipy dependencies
pip install pytest tox# run all tests
pytest# run tests and style check for Python versions 3.5, 3.6, and 3.7, if available.
tox
```Author: Matthew Flamm
Email: