usnistgov / teqp

A highly efficient, flexible, and accurate implementation of thermodynamic EOS powered by automatic differentiation
https://pages.nist.gov/teqp-docs/en/latest/index.html
Other
51 stars 13 forks source link
cpp python

Intro

This library implements advanced derivative techniques to allow for implementation of EOS without any hand-written derivatives. The name TEQP comes from Templated Equation of State Package. A paper about teqp is published in Ind. Eng. Chem. Res.:

Screenshot of paper front page

Why?

So far the following EOS are implemented:

What is teqp not?:

Docs are on ReadTheDocs: Documentation Status

Written by Ian Bell, NIST, with the help of colleagues and collaborators

Changelog

PyPI version

Install

For all users, you should be able to install the most recent version from PYPI with

pip install teqp

Tests

Catch tests via Github Actions

Build (cmake based)

Try it in your browser: Binder

Be aware: compiling takes a while in release mode (multiple minutes per file in some cases) thanks to the use of generic typing in the models. Working on making this faster...

For example to build the critical line tracing example in visual studio, do:

mkdir build
cd build
cmake .. 
cmake --build . --target multifluid_crit --config Release
Release\multifluid_crit

On linux/OSX, similar:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target multifluid_crit
./multifluid_crit

Random notes for future readers: