Code Monkey home page Code Monkey logo

rtdpy's Introduction

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

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 for how to use and interpret pytest results.

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
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: [email protected]

rtdpy's People

Contributors

farisachugthai avatar matthewflamm avatar xuanxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rtdpy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.