Pytzer v0.3.1

Pytzer is a Python 3.6+ implementation of the Pitzer model for chemical activities in aqueous solutions [P91].

Installation

If using Conda, first create and activate a new environment with Python v3.6+, NumPy v1.15+ and SciPy v1.2+. Other versions are probably fine, but untested. Activate the environment, and then enter:

pip install pytzer
pip install git+https://github.com/mvdh7/autograd#egg=autograd --upgrade --no-cache-dir

The second line above is strongly recommended, but optional. It upgrades Autograd to the latest version that has been tested with Pytzer, which eliminates some deprecation warnings that may appear when using the relatively old Autograd version available from PyPI. You could also switch mvdh7 in the URL to HIPS to get the very latest Autograd straight from the horse's mouth.

See the quick-start guide for more detailed instructions and examples.

Development status

Pytzer is in beta. Tests of the accuracy of its coefficients and equations are underway, so results may change. API may change and functions may be added or removed. Use at your own peril!

Modules

  • .io - imports and exports data;
  • .model - implements the Pitzer model;
  • .cflibs - defines combinations of model coefficients (i.e. coefficient libraries) to use in the model;
  • .coefficients - defines interaction coefficients as functions of temperature and pressure;
  • .tables - stores tables of model coefficient values;
  • .debyehueckel - defines functions for Debye-Hückel limiting slopes;
  • .jfuncs - defines unsymmetrical mixing functions;
  • .properties - defines universal solute properties;
  • .constants - defines physicochemical constants;
  • .teos10 - calculates properties of pure water;
  • .matrix - implements an alternative matrix-based Pitzer model;
  • .meta - stores metadata about the Pytzer package.

Acknowledgements

Pytzer is maintained by Dr Matthew P. Humphreys at the Centre for Ocean and Atmospheric Sciences, School of Environmental Sciences, University of East Anglia, Norwich, UK.

Its ongoing development is funded by the Natural Environment Research Council (NERC, UK) through grant NE/P012361/1: NSFGEO-NERC: A Thermodynamic Chemical Speciation Model for the Oceans, Seas, and Estuaries.

License

Pytzer is licensed under the GNU General Public License version 3 (GPLv3).