Skip to content

Releases: mvdh7/pytzer

Pytzer: the Pitzer model for chemical activities and equilibria in aqueous solutions in Python

24 Oct 10:42
aeeb546
Compare
Choose a tag to compare

Changes in v0.5.3

  • Created new Humphreys22 parameter library and validated its calculations against HWT22.
  • Created new Clegg22 parameter library (but its calculations against CHW22 still need validating).
  • Created new Clegg23 parameter library and validated its calculations against CWTD23.
  • Renamed io module as get.

Pytzer: the Pitzer model for chemical activities and equilibria in aqueous solutions in Python

31 Aug 09:48
Compare
Choose a tag to compare

Changes in v0.5.2

  • Fixed calculation error in convert.solvent_to_solution.
  • Added more ions in properties.ion_to_mass.

Pytzer: the Pitzer model for chemical activities and equilibria in aqueous solutions in Python

17 Aug 13:49
94f21ab
Compare
Choose a tag to compare

Changes in v0.5.1

  • Fixed pz.convert.solvent_to_solution to take and return pK values instead of K values, and to replace any NaNs in the input with 0.
  • Added pz.equilibrate.stoichiometric.get_constants() to calculate stoichiometric equilibrium constants for the carbonic acid equilibria when total dissolved inorganic carbon is zero.

Pytzer: the Pitzer model for chemical activities and equilibria in aqueous solutions in Python

08 Aug 13:04
4cbae31
Compare
Choose a tag to compare

Changes in v0.5.0

  • Switched from Autograd to JAX for faster automatic differentiation and JIT compilation.
  • Renamed and reorganised virtually everything.

Demonstration preparation

11 Sep 10:37
9439dbc
Compare
Choose a tag to compare
Pre-release
  • Added osm function for osmotic coefficient to matrix module;
  • Added io module functions to roughly convert between molinity (mol/kg-solution) and molality (mol/kg-H2O);
  • Added salinity2mols function in io module to estimate molalities from salinity for MZF93 artificial seawater;
  • Switched assemble function in matrix module to use the MarChemSpec parameter library by default.

Basic plotting functions

06 Sep 12:57
Compare
Choose a tag to compare
Pre-release
  • Removed pressure input from thermodynamic equilibrium constant functions;
  • Converted copies from shallow to deep in parameter library modules;
  • Added plot module with some meta-analytical visualisation tools (not yet documented).

Now with carbonate and borate equilibria

13 Aug 14:26
3651486
Compare
Choose a tag to compare
  • Added carbonic acid and boric acid equilibrium solving;
  • Eliminated module tables;
  • Updated functions and parameter libraries noting that ['Cl', 'CO3'] gets sorted to ['CO3', 'Cl'];
  • Fixed incorrect alph1 values for all HMW 1:(>1) electrolytes;
  • Added several new interaction parameter functions;
  • Testing MIAMI parameter library against PM16's model:
    • Adjusted numerical values to fix errors in some parameter functions:
      • bC_Ca_BOH4_SRM87;
      • bC_K_OH_MP98;
      • bC_Mg_BOH4_SRM87;
      • bC_Na_Br_MP98;
      • bC_Na_F_MP98;
      • bC_Na_HSO4_MP98;
      • bC_Sr_Cl_MP98;
      • theta_K_Sr_MP98;
    • Added new MP98 functions until numerical conflicts can be resolved:
      • bC_K_CO3_MP98 should follow SRG87;
      • theta_H_K_MP98 and theta_H_Na_MP98 should follow CMR93.

Equilibrium

03 Aug 10:04
020fe6a
Compare
Choose a tag to compare
Equilibrium Pre-release
Pre-release
  • Module dissociation added with functions to evaluate thermodynamic dissociation constants;
  • Module equilibrate added with an equilibrium solver and associated functions;
  • Added blackbox_equilibrate function to demonstrate equilibration procedure;
  • Fixed indexing error in matrix.assemble for the zeta coefficient matrix;
  • Module jfuncs renamed as unsymmetrical;
  • As a general terminology change, the Pitzer model interaction coefficients are now instead referred to as parameters, for better consistency with the published literature. As a consequence:
    • Module coefficients renamed as parameters;
    • Module cflibs renamed as libraries;
    • Class CoefficientLibrary renamed as ParameterLibrary, and its abbreviation cflib to prmlib;
  • Parameter libraries can now be stored in separate script files.
  • Added complete HMW84 parameter library;
  • Added all interaction coefficients to MIAMI parameter library - but its calculation results have not yet been tested;
  • Fixed multiplier error for Cphi values in PM73_TableVI in tables module;
  • Added presumably missing *1e-3 multiplier to Cphi values in all SRRJ87 binary interaction functions;
  • Added meta-analysis functions in meta module.

Matrix madness

16 Jul 11:23
5eb5a59
Compare
Choose a tag to compare
Matrix madness Pre-release
Pre-release
  • Module props renamed as properties;
  • Module coeffs renamed as coefficients;
  • Class CoeffLib renamed as CoefficientLibrary;
  • Added docstrings to all functions in coefficients module;
  • Added matrix module with alternative, matrix-based Pitzer model implementation;
  • Added none function to jfuncs module to ignore unsymmetrical mixing;
  • Fixed Aϕ bug in CoefficientLibrary method print_coeffs;
  • In preparation for equilibration calculations:
    • Added gettots function to io module.

Under pressure

12 Apr 12:31
bf9e486
Compare
Choose a tag to compare
Under pressure Pre-release
Pre-release
  • Moved Debye-Hückel functions (for Aϕ) from coeffs into new module debyehueckel;
  • Added Archer and Wang (1990) calculation of Aϕ;
  • Added pressure input (pres in dbar) to all relevant functions in coeffs, debyehueckel, model, io and blackbox functions;
  • Added teos10 module to calculate various properties of pure water;
  • Added Seawater coefficient library - like MarChemSpec, but with pressure-dependent Aϕ term (following Archer and Wang, 1990), and other general improvements;
  • Made cflib input optional for all model functions (default = Seawater);
  • Fixed loop index correction for n-n' interactions;
  • Eliminated unnecessary arrays for constant values in coeffs;
  • Adjusted model.B and model.CT function inputs to reduce number of cflib function calls;
  • Rewrote CRP94 Aosm function to make it autograd-able;
  • Added docstrings throughout (except for functions in coeffs).