Skip to main content

A python interface for solution chemistry

Project description

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

  • Build accurate solution properties using a minimum of inputs. Just specify the identity and quantity of a solute and pyEQL will do the rest.

  • "Graceful Decay" from more sophisticated, data-intensive modeling approaches to simpler, less accurate ones depending on the amount of data supplied.

  • Not limited to dilute solutions. pyEQL contains out of the box support for the Pitzer Model and other methods for modeling concentrated solutions.

  • Built in database containing hundreds of model parameters and physicochemical properties for different ions.

  • Units-aware calculations (by means of the pint library)

Documentation

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

Dependencies

  • Python 3.10+. This project will attempt to adhere to NumPy's NEP 29 deprecation policy for older version of Python.
  • pint - for units-aware calculations
  • pymatgen - periodic table and chemical formula information
  • phreeqpython - for PHREEQC-based speciation calculations
  • iapws - equations of state for water
  • monty - serialization and deserialization utilities
  • maggma - interface for accessing the property database
  • scipy - for certain nonlinear equation solvers

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/.

Project details


Download files

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

Source Distribution

pyeql-1.2.0.tar.gz (648.1 kB view details)

Uploaded Source

Built Distribution

pyEQL-1.2.0-py3-none-any.whl (290.8 kB view details)

Uploaded Python 3

File details

Details for the file pyeql-1.2.0.tar.gz.

File metadata

  • Download URL: pyeql-1.2.0.tar.gz
  • Upload date:
  • Size: 648.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pyeql-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c23924398be8eb9f507be435208155dc9c6e605eaeef91f600eee2d1f81fb085
MD5 ecc0730f8bba7877576add6d8d9aea8e
BLAKE2b-256 519725cc73fc23a3e9ab5a912f86be2c0a0a4ce9b110e303c2832768f920e355

See more details on using hashes here.

File details

Details for the file pyEQL-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyEQL-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 290.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pyEQL-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 231a635863a36170fd347190a85b8f2d83de8f041fd9cae9a26690f37854fadb
MD5 fed414cbdbb2eb9aa8b502cf88ce5eaa
BLAKE2b-256 d2ac2998f3445c736a5c6be1d5c21aec0d7d13ff63f1f801a77ecdec911067f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page