KingsburyLab / pyEQL

A Python library for solution chemistry
Other
64 stars 17 forks source link

Read the Docs testing codecov Supported python versions DOI PyPI version status

pyEQL logo

A python interface for water chemistry

Description

The goal of pyEQL is to provide a stable, intuitive, easy to learn python interface for water chemistry that can be connected to a variety of different modeling engines

Specifically, pyEQL defines a Solution class to represent an aqueous electrolyte solution. The Solution class allows the user to manipulate solutions as Python objects, providing methods to populate them with solutes, calculate species-specific properties (such as activity and diffusion coefficients), and retrieve bulk properties (such as density, conductivity, or volume).

>>> from pyEQL import Solution
>>> s1=Solution({"Na+":"1 mol/L", "Cl-": "1 mol/L"})
>>> s1.density
<Quantity(1.03710384, 'kilogram / liter')>
>>> s1.conductivity
<Quantity(8.09523295, 'siemens / meter')>
>>> s1.osmotic_pressure.to('atm')
<Quantity(46.7798197, 'standard_atmosphere')>
>>> s1.get_amount('Na+', 'ug/L')
<Quantity(22989769.3, 'microgram / liter')>

pyEQL also includes a number of other utilities to support water chemistry analysis, including a built-in property database of diffusion coefficients, activity correction parameters, and other data on a variety of common electrolytes.

It is designed to be customizable and easy to integrate into projects that require modeling of chemical thermodyanmics of aqueous solutions. It aspires to provide a flexible, extensible framework for the user, with a high level of transparency about data sources and calculation methods.

Key Features

Documentation

Detailed documentation is available at https://pyeql.readthedocs.io/

Dependencies

pyEQL is licensed under LGPL.

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see [https://pyscaffold.org/]().