Skip to main content

A package to manage thermodynamic states

Project description

ThermoState

This package provides a wrapper around CoolProp that integrates Pint for easy state management in any unit system.

Installation

Conda

The preferred installation method is to use conda. Using Conda, ThermoState can be installed for either Python 3.5, 3.6, or 3.7. If you have an existing Conda environment with one of those Python versions, installing ThermoState can be done by

conda install -c bryanwweber thermostate conda-forge::pint

This installs Pint from the conda-forge channel; if you would like to use another channel to install Pint, change the conda-forge to be the name of the channel you prefer. If Pint is already installed in your environment, the conda-forge::pint can be omitted entirely.

If you do not have an environment with Python 3.5, 3.6, or 3.7, you can create a new environment with

conda create -n thermostate -c bryanwweber thermostate conda-forge::pint

Pip

Alternatively, ThermoState can be installed with pip.

pip install thermostate

From Source

ThermoState is a pure-Python package that supports any Python version 3.5 and higher. To install from source, clone the source code repository and install using pip.

git clone https://github.com/bryanwweber/thermostate
cd thermostate
pip install .

Documentation

Documentation can be found at https://bryanwweber.github.io/thermostate/. The documentation contains a short tutorial, examples, and API documentation for the package.

Citation

If you have used ThermoState in your work, we would appreciate including a citation to the software! ThermoState has been published in JOSE, available at the link below.

DOI

For those using Bib(La)TeX, you can use the following entry

@article{weber_thermostate_2018,
    title = {{ThermoState}: {A} state manager for thermodynamics courses},
    volume = {1},
    issn = {2577-3569},
    shorttitle = {{ThermoState}},
    url = {https://jose.theoj.org/papers/10.21105/jose.00033},
    doi = {10.21105/jose.00033},
    number = {8},
    urldate = {2018-10-24},
    journal = {Journal of Open Source Education},
    author = {Weber, Bryan},
    month = oct,
    year = {2018},
    pages = {33}
}

Code of Conduct & Contributing

We welcome contributions from anyone in the community. Please look at the Contributing instructions for more information. This project follows the Contributor Covenant Code of Conduct, version 1.4. In short, be excellent to each other.

Continuous Integration Status

TravisCI: Build Status Appveyor: Build status codecov

Anaconda Package Version

Anaconda-Server Badge Version Anaconda-Server Badge Downloads

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.5.3 - 04-MAR-2019

Added

  • Check if temperature, pressure, and specific volume are positive (in absolute units)
  • Check if the quality is between 0 and 1

Changed

  • Bump maximum allowed version of Pint

0.5.2 - 01-FEB-2019

Added

  • Install conda-verify on Travis when building tags to fix a warning from conda-build

Changed

  • Formatted thermostate.py with the Black formatter

Fixed

  • Broken link in CONTRIBUTING.md to LICENSE.md
  • Installation instructions for CoolProp updated for Python 3.7
  • Equality checking for States now considers the substance [#17]. Resolves #16 (Thanks @egurra!)

0.5.1 - 05-JAN-2019

Added

  • JOSE badge to README

Changed

  • Allow version 6.2.* of CoolProp
  • Install CoolProp package for Python 3.7 from conda

Fixed

  • License year in LICENSE.md. Happy new year! :tada:

0.5.0 - 23-OCT-2018

Added

  • Add JOSE paper
  • Add installation, documentation, code of conduct, and contributing links to README
  • Document the classes in the abbreviations module
  • Example of a cascade refrigeration cycle using EE units
  • Test on Python 3.7 using the nightly version of CoolProp

Changed

  • Use the generic Python 3 for the intersphinx config rather than version specific

Fixed

  • Fix numpy and matplotlib need to be installed on Travis to build the docs
  • Fix typo in code of conduct

Removed

  • Don't load the Sphinx coverage extensions

0.4.2 - 21-SEP-2018

Fixed

  • Travis PyPI password

0.4.1 - 21-SEP-2018

Added

  • Add codemeta.json

Fixed

  • Fix builds in .travis.yml
  • Can't use Python 3.6 type hinting with Python 3.5

0.4.0 - 21-SEP-2018

Added

  • _render_traceback_ function added to StateError to improve formatting of the traceback in IPython and Jupyter
  • Add several examples demonstrating the use of ThermoState

Changed

  • Bump intersphinx mapping to Python 3.7
  • Change docs license to CC-BY 4.0

Fixed

  • Ignore more pytest files

0.3.0 - 09-JUL-2018

Fixed

  • Added flake8 configuration to setup.cfg since linter-flake8 reads it and ignores built-in options
  • Only define _render_traceback_ if IPython is installed

0.2.4 - 08-JUL-2018

Added

  • Added _render_traceback_ function to improve traceback formatting of pint.DimensionalityError

Fixed

  • Added oxygen, nitrogen, and carbondioxide as available substances to the Tutorial

0.2.3 - 24-SEP-2017

Added

  • Distributions are now uploaded to PyPI

Changed

  • Conda packages are noarch builds
  • Appveyor tests run in a single job to speed them up
  • Minimum Python version is 3.5

0.2.2 - 13-APR-2017

Added

  • Oxygen (O2) is available as a substance
  • Nitrogen (N2) is available as a substance

Fixed

0.2.1

Added

  • Carbon dioxide is available as a substance
  • The software version is available as the module-level __version__ attribute

0.2.0

Added

  • Equality comparison of State instances

Changed

  • Improve several error messages
  • Refactor property getting/setting to use less boilerplate code
  • Preface all class attributes with _
  • Refactor _set_properties to use CoolProp low-level API

0.1.7

Added

  • Phase as a gettable attribute of the State
  • Isobutane is an available substance
  • Add cp and cv to Tutorial

Changed

  • Updated Tutorial with more detail of setting properties
  • Fail Travis when a single command fails

0.1.6

Added

  • Tutorial in the docs using nbsphinx for formatting
  • Specific heat capacities at constant pressure and volume are now accessible via cp and cv attributes

Changed

  • Offset units are automatically converted to base units in Pint

0.1.5

Changed

  • Unknown property pairs are no longer allowed to be set

0.1.4

Fixed

  • Rename units module to abbreviations so it no longer shadows units registry in thermostate

0.1.3

Added

  • Common unit abbreviations in thermostate.EnglishEngineering and thermostate.SystemInternational

Fixed

  • Typo in CHANGELOG.md

0.1.2

Fixed

  • Fix Anaconda.org upload keys

0.1.1

Fixed

  • Only load pytest-runner if tests are being run

0.1.0

Added

  • First Release

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
thermostate-0.5.3-py3-none-any.whl (13.9 kB) Copy SHA256 hash SHA256 Wheel py3
thermostate-0.5.3.tar.gz (19.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page