All Projects → CalebBell → Thermo

CalebBell / Thermo

Licence: mit
Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Thermo

Version3-1
Version 2020 (3.1) of Chem4Word - A Chemistry Add-In for Microsoft Word
Stars: ✭ 14 (-94.98%)
Mutual labels:  chemistry, cheminformatics, molecule
MolecularGraph.jl
Graph-based molecule modeling toolkit for cheminformatics
Stars: ✭ 144 (-48.39%)
Mutual labels:  chemistry, cheminformatics, molecule
Version3
Version 3 of Chem4Word - A Chemistry Add-In for Microsoft Word
Stars: ✭ 53 (-81%)
Mutual labels:  chemistry, cheminformatics, molecule
Kekule.js
A Javascript cheminformatics toolkit.
Stars: ✭ 156 (-44.09%)
Mutual labels:  chemistry, cheminformatics, molecule
xyz2graph
Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.
Stars: ✭ 36 (-87.1%)
Mutual labels:  chemistry, molecule
mongodb-chemistry
Ideas for chemical similarity searches in MongoDB.
Stars: ✭ 23 (-91.76%)
Mutual labels:  chemistry, cheminformatics
pylj
Teaching Utility for Classical Atomistic Simulation.
Stars: ✭ 23 (-91.76%)
Mutual labels:  chemistry, physics
molml
A library to interface molecules and machine learning.
Stars: ✭ 57 (-79.57%)
Mutual labels:  chemistry, cheminformatics
AutoForce
Sparse Gaussian Process Potentials
Stars: ✭ 17 (-93.91%)
Mutual labels:  chemistry, physics
opem
OPEM (Open Source PEM Fuel Cell Simulation Tool)
Stars: ✭ 107 (-61.65%)
Mutual labels:  chemistry, physics
Atomic-Periodic-Table.Android
Atomic - Periodic Table
Stars: ✭ 33 (-88.17%)
Mutual labels:  chemistry, physics
pytopomat
Python Topological Materials (pytopomat) is a code for easy, high-throughput analysis of topological materials.
Stars: ✭ 19 (-93.19%)
Mutual labels:  chemistry, physics
molecules
chemical graph theory library for JavaScript
Stars: ✭ 83 (-70.25%)
Mutual labels:  chemistry, cheminformatics
py4chemoinformatics
Python for chemoinformatics
Stars: ✭ 78 (-72.04%)
Mutual labels:  chemistry, cheminformatics
GLaDOS
Web Interface for ChEMBL @ EMBL-EBI
Stars: ✭ 28 (-89.96%)
Mutual labels:  chemistry, cheminformatics
cellpy
extract and tweak data from electrochemical tests of cells
Stars: ✭ 46 (-83.51%)
Mutual labels:  chemistry, physics
pem-dataset1
Proton Exchange Membrane (PEM) Fuel Cell Dataset
Stars: ✭ 48 (-82.8%)
Mutual labels:  chemistry, physics
PyAbel
A python package for Abel and inverse Abel transforms
Stars: ✭ 74 (-73.48%)
Mutual labels:  chemistry, physics
Itensor
A C++ library for efficient tensor network calculations
Stars: ✭ 269 (-3.58%)
Mutual labels:  physics, chemistry
AMPL
The ATOM Modeling PipeLine (AMPL) is an open-source, modular, extensible software pipeline for building and sharing models to advance in silico drug discovery.
Stars: ✭ 85 (-69.53%)
Mutual labels:  chemistry, cheminformatics

====== Thermo

.. image:: http://img.shields.io/pypi/v/thermo.svg?style=flat :target: https://pypi.python.org/pypi/thermo :alt: Version_status .. image:: http://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat :target: https://thermo.readthedocs.io/ :alt: Documentation .. image:: http://img.shields.io/badge/license-MIT-blue.svg?style=flat :target: https://github.com/CalebBell/thermo/blob/master/LICENSE.txt :alt: license .. image:: https://img.shields.io/coveralls/CalebBell/thermo.svg :target: https://coveralls.io/github/CalebBell/thermo :alt: Coverage .. image:: https://img.shields.io/pypi/pyversions/thermo.svg :target: https://pypi.python.org/pypi/thermo :alt: Supported_versions .. image:: https://badges.gitter.im/CalebBell/thermo.svg :alt: Join the chat at https://gitter.im/CalebBell/thermo :target: https://gitter.im/CalebBell/thermo .. image:: https://zenodo.org/badge/62404647.svg :alt: Zendo :target: https://zenodo.org/badge/latestdoi/62404647

.. contents::

What is Thermo?

Thermo is open-source software for engineers, scientists, technicians and anyone trying to understand the universe in more detail. It facilitates the retrieval of constants of chemicals, the calculation of temperature and pressure dependent chemical properties (both thermodynamic and transport), and the calculation of the same for chemical mixtures (including phase equilibria) using various models.

Thermo runs on all operating systems which support Python, is quick to install, and is free of charge. Thermo is designed to be easy to use while still providing powerful functionality. If you need to know something about a chemical or mixture, give thermo a try.

Installation

Get the latest version of thermo from https://pypi.python.org/pypi/thermo/

If you have an installation of Python with pip, simple install it with:

$ pip install thermo

Alternatively, if you are using conda <https://conda.io/en/latest/>_ as your package management, you can simply install thermo in your environment from conda-forge <https://conda-forge.org/>_ channel with:

$ conda install -c conda-forge thermo

To get the git version, run:

$ git clone git://github.com/CalebBell/thermo.git

Documentation

thermo's documentation is available on the web:

http://thermo.readthedocs.io/

Getting Started

The library is designed around base SI units only for development convenience. All chemicals default to 298.15 K and 101325 Pa on creation, unless specified. All constant-properties are loaded on the creation of a Chemical instance.

.. code-block:: python

>>> from thermo.chemical import Chemical
>>> tol = Chemical('toluene')
>>> tol.Tm, tol.Tb, tol.Tc
(179.2, 383.75, 591.75)
>>> tol.rho, tol.Cp, tol.k, tol.mu
(862.2380125827527, 1706.0746129119084, 0.13034801424538045, 0.0005521951637285534)

For pure species, the phase is easily identified, allowing for properties to be obtained without needing to specify the phase. However, the properties are also available in the hypothetical gas phase (when under the boiling point) and in the hypothetical liquid phase (when above the boiling point) as these properties are needed to evaluate mixture properties. Specify the phase of a property to be retrieved by appending 'l' or 'g' or 's' to the property.

.. code-block:: python

>>> tol.rhog, tol.Cpg, tol.kg, tol.mug
(4.032009635018902, 1126.5533755283168, 0.010736843919054837, 6.973325939594919e-06)

Creating a chemical object involves identifying the appropriate chemical by name through a database, and retrieving all constant and temperature and pressure dependent coefficients from Pandas DataFrames - a ~1 ms process. To obtain properties at different conditions quickly, the method calculate has been implemented.

.. code-block:: python

>>> tol.calculate(T=310, P=101325)
>>> tol.rho, tol.Cp, tol.k, tol.mu
(851.1582219886011, 1743.280497511088, 0.12705495902514785, 0.00048161578053599225)
>>> tol.calculate(310, 2E6)
>>> tol.rho, tol.Cp, tol.k, tol.mu
(852.7643604407997, 1743.280497511088, 0.12773606382684732, 0.0004894942399156052)

Each property is implemented through an independent object-oriented method, based on the classes TDependentProperty and TPDependentProperty to allow for shared methods of plotting, integrating, differentiating, solving, interpolating, sanity checking, and error handling. For example, to solve for the temperature at which the vapor pressure of toluene is 2 bar. For each property, as many methods of calculating or estimating it are included as possible. All methods can be visualized independently:

.. code-block:: python

>>> Chemical('toluene').VaporPressure.solve_property(2E5)
409.5909115602903
>>> Chemical('toluene').SurfaceTension.plot_T_dependent_property()

Mixtures are supported and many mixing rules have been implemented. However, there is no error handling. Inputs as mole fractions (zs), mass fractions (ws), or volume fractions (Vfls or Vfgs) are supported. Some shortcuts are supported to predefined mixtures.

.. code-block:: python

>>> from thermo.chemical import Mixture
>>> vodka = Mixture(['water', 'ethanol'], Vfls=[.6, .4], T=300, P=1E5)
>>> vodka.Prl,vodka.Prg
(35.13075699606542, 0.9822705235442692)
>>> air = Mixture('air', T=400, P=1e5)
>>> air.Cp
1013.7956176577836

Roadmap

The author's main development item is phase equilibrium, a particularly tricky area.

Latest source code

The latest development version of thermo's sources can be obtained at

https://github.com/CalebBell/thermo

Bug reports

To report bugs, please use the thermo's Bug Tracker at:

https://github.com/CalebBell/thermo/issues

License information

See LICENSE.txt for information on the terms & conditions for usage of this software, and a DISCLAIMER OF ALL WARRANTIES.

Although not required by the thermo license, if it is convenient for you, please cite thermo if used in your work. Please also consider contributing any changes you make back, and benefit the community.

Citation

To cite thermo in publications use::

Caleb Bell and Contributors (2016-2021). Thermo: Chemical properties component of Chemical Engineering Design Library (ChEDL)
https://github.com/CalebBell/thermo.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].