SkillAgentSearch skills...

Thermopack

Thermopack is a thermodynamic model library for fluid properties and PVT calculations

Install / Use

/learn @thermotools/Thermopack
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!--- Generated at: 2025-03-07T09:12:41.194860 This is an auto-generated file, generated using the script at thermopack/addon/pyUtils/docs/join_docs.py The file is created by joining the contents of the files /Users/morteham/Documents/codes/thermotools/thermopack/addon/pyUtils/docs/../../../docs/vCurrent/ readme_parts/header.md readme_parts/github_toc.md metapages/please_cite.md readme_parts/structure.md vCurrent/source_build.md vCurrent/getting_started.md vCurrent/more_advanced.md vCurrent/new_fluids.md vCurrent/Component-name-mapping.md --->

ThermoPack homepage

For the full documentation and user guide to ThermoPack, see the ThermoPack homepage. If you are running ThermoPack installed via pip, make sure to check the documentation for the correct version by selecting the version number in the sidebar.

About

Thermopack is a thermodynamics library for multi-component and multi-phase thermodynamics developed at SINTEF Energy Research and NTNU Department of Chemistry. Through decades of research, we have developed a software that performs thermodynamic calculations. A large selection of equations of state has been implemented in this software. Most of these equations of state have been developed by other research groups around the world, but some of them have been developed by us. Thermopack has been a much-appreciated in-house powerhouse.

Thermopack is available for everybody, free of charge under the Apache 2.0 open-source licenses. Thermopack is written in FORTRAN to handle heavy numerical computations associated with process and computational fluid dynamics (CFD) simulations. The thermodynamic framework is easily interfaced from C/C++ and also contains a flexible Python wrapper to make scripting easy.

Table of contents

Please Cite

Thermopack has been developed through many projects, and have produced many articles. If you are writing academic publications, please cite one or more of the following articles:

License

Thermopack is distributed under the Apache 2.0.

Acknowledgments

A number of colleagues at SINTEF Energy Research and NTNU have contributed to the development of thermopack. We gratefully acknowledge their contributions.

Program structure

Each EoS in thermopack is a class, which inherits from the thermopack class found in thermo.py. The primary documentation for the thermopack python wrapper consists of the docstrings of the thermopack class. This class contains all generic methods used to compute thermodynamic properties, phase equilibria, etc. The inheriting classes simply ensure that the correct part of the Fortran-module is linked when performing calculations, and provide some extended functionality for handling EoS parameters and such. See the wiki for more information on this.

Fluid parameters are compiled into the Fortran-module, and are not directly accessible through the Python-wrapper. The entire fluid parameter database used by thermopack may be found in the /fluids directory in the GitHub repo. In order to model fluids not currently supported in the module available through pip, thermopack must be compiled from source with the new parameters. See the wiki for information on how to add new fluids, and the GitHub README for a guide on how to compile from source. Please feel free to leave a PR for new parameter sets such that these can be included in future releases of thermopack.

File System

Brief description of file structure:

  • thermopack/: Main library folder containing make scripts etc.
  • thermopack/src/: Main path for Fortran source code
  • thermopack/unittest/: Test files written for pFUunit
  • thermopack/bin/: Compiled binaries and libraries
  • thermopack/doc/: Memos and doxygen documentation
  • thermopack/fluids/: Pure fluid files
  • thermopack/binaries/: Files containing binary interaction parameters etc.
  • thermopack/MSVStudio/: Microsoft Visual Studio project and solution files
  • thermopack/include/: C/C++ include file
  • thermopack/pyplot/: Example plot-scripts (Plotting text files generated by Thermopack)
  • thermopack/addon/: Add-on functionality
  • thermopack/addon/pycThermopack/: Python interface
  • thermopack/addon/pyUtils/: Python utilities for generating fortran code and makefile input.

Installing the latest version of ThermoPack

Using pip

Thermopack has been compiled for Windows, Linux and macOS and made available on the Python Package Index (pypi), and can be installed using pip

pip3 install thermopack

For documentation on the version available on pypi, refer to the appropriate version number in the sidebar.

Installing from wheels

Pre-built wheels for the latest version of ThermoPack on GitHub are available for download here. Refer to the linked page for instructions on how to install packages directly from a python wheel. Please note that the latest version on GitHub may be less stable, tested, and well documented than the versions distributed on PyPI.

Building from source

The following sections show how to fetch, compile and install Thermopack and the Python frontend pycThermopack. When things are properly installed, it may be useful to look into the examples provided in the getting started guide, and the pyExamples.

Prerequisites

Thermopack source code can be compiled with the GNU Fortran compiler or [Intel FORTRAN](https://softwa

View on GitHub
GitHub Stars96
CategoryDevelopment
Updated20d ago
Forks24

Languages

Fortran

Security Score

80/100

Audited on Mar 10, 2026

No findings