Physical chemistry of seawater
Automatic differentiation for physical chemistry
Pytzer is a Python implementation of the Pitzer model for calculating physicochemical properties of complex aqueous solutions using automatic differentiation.
Many properties of aqueous solutions, such as the chemical activities of the dissolved components, are given by different derivatives of a master equation for the excess Gibbs energy. Pytzer encodes the master equation, and then takes the novel approach of using automatic differentiation (as implemented by Autograd) to evaluate each derivative of interest.
The core of the software and its API are stable, but Pytzer remains in beta for now as new sets of interaction coefficients to the model and tested. The present version also requires the concentration of each solute to be explicitly specified, including those that are involved in chemical equilibria. A future version will solve for these equilibria.
SCOR Working Group 145 and the MarChemSpec project
Pytzer started out its life in the MarChemSpec project.
MarChemSpec is a research project jointly funded by the Natural Environment Research Council (NERC, UK) and National Science Foundation (NSF, USA), with collaborators from the University of East Anglia, Scripps Institution of Oceanography, and Woods Hole Oceanographic Institution. Other project partners include the national metrological institutes of the USA (NIST), France (LNE), Germany (PTB) and Japan (NMIJ), and SCOR Working Group 145.
I worked on MarChemSpec as a postdoc for 2 years at the University of East Anglia. The results of my work were presented at the Ocean Sciences Meeting 2020 in San Diego. You can find my abstract on the meeting website.