Skip to content

The Pitzer model

The functions in pytzer.model use the Pitzer model to calculate various solution properties for a fixed composition.

All examples use the import convention:

import pytzer as pz

Arguments

All the main functions in pytzer.model have the same syntax, and they are all aliased at the top level, for example:

Gibbs_nRT = pz.model.Gibbs_nRT(solutes, **params)
Gibbs_nRT = pz.Gibbs_nRT(solutes, **params)
  • The argument solutes is an OrderedDict containing the molality (in mol/kg) of each solute in the solution. Each molality must be a single scalar value.

  • The other kwargs contained in params can be generated for solutes using the ParameterLibrary method get_parameters().

The result is always either a single scalar value or an OrderedDict with the same keys as in the solutes.

Functions

The properties that can be calculated using the syntax above are:

Excess Gibbs energy

Excess Gibbs energy of the solution.

Gibbs_nRT = pz.Gibbs_nRT(solutes, **params)

Solute activity coefficients

Chemical activity coefficients for every solute or their natural logarithms.

activity_coefficients = pz.activity_coefficients(solutes, **params)
log_activity_coefficients = pz.log_activity_coefficients(solutes, **params)

Water activity

Chemical activity of the solvent (water) or its natural logarithm.

activity_water = pz.activity_water(solutes, **params)
log_activity_water = pz.log_activity_water(solutes, **params)

Osmotic coefficient

Osmotic coefficient of the solution.

osmotic_coefficient = pz.osmotic_coefficient(solutes, **params)