Functions that can calculate the parameters required to run a Pitzer model from temperature and pressure are compiled into
ParameterLibrarys, which can be imported from
ParameterLibrary that you wish to use with (e.g.):
from pytzer.libraries import Seawater
The options are:
Millero98: MP98, a.k.a. MIAMI
Update unsymmetrical mixing function
ParameterLibrarys are designed for use with different J functions for unsymmetrical mixing. To change which function is being used throughout Pytzer, use (e.g.):
import pytzer as pz from pytzer.libraries import Seawater pz = Seawater.set_func_J(pz)
This step can be slow, as all the model functions must be recompiled afterwards. It only needs to be repeated if the
ParameterLibrary being used is changed.
To generate the
params dict required for various functions in Pytzer, use (e.g.):
from pytzer.libraries import Seawater params = Seawater.get_parameters( solutes=None, temperature=298.15, pressure=10.1023, verbose=True )
The arguments are:
OrderedDictwhere the keys represent the solutes in the solution, as described in the model arguments. If
None, then parameters are evaluated for all solutes represented by the
temperature: in K.
pressure: in dbar.
verbose: do you want to print a warning to stdout whenever there is no function in the
ParameterLibraryfor any interaction between the
If you are running Pytzer over multiple different solutions, then you need to re-run
get_parameters() between each solution only if the temperature, pressure, or combination of solutes has changed. In other words, if only the molality values for the solutes have changed between calculations, then you do not need to re-run