Skip to content

Merck/rtdpy

Repository files navigation

rtdpy

Residence Time Distribution modeling in Python.

https://merck.github.io/rtdpy

DOI

A simple example

Create a family of tanks in series (N-CSTRs) and analyze them

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

Installation

pip install rtdpy

Issues/Requests/Contributions

See CONTRIBUTING.md

Development and Testing

It is recommended to use a virtual environment for developing/testing.

git clone https://github.com/Merck/rtdpy.git  # or use your forked repo
cd rtdpy
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"  # install package with dev dependencies

# run all tests with coverage
pytest

Tests are written using pytest and configuration is in pyproject.toml. See pytest documentation for more details.

Author: Matthew Flamm

Email: matthew.flamm@merck.com

About

Residence Time Distribution modeling in Python.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages