Skip to content

A library for thermodynamic modeling with the Pitzer model and its application in quantification of fluid inclusion data.

License

Notifications You must be signed in to change notification settings

yiping-git/pypitzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPitzer

made-with-python PyPi license

DOI

authors: Yiping Liu, Thomas Wagner, Tobias Fußwinkel

Introduction

This package is for low-temperature themodynamic modeling with the accurate Pitzer model and its application in quantification fluid inclsuion data and calculation of uncertainties propagated in this modeling / quantification process.

To quantify fluid inclusion data, you the following necessary data:

  • microthemometric data
    • accurate last solid phase (e.g. NaCl·H2O)
    • melting temperatre of this last phase (Tm)
  • element/Na ratios from LA-ICP-MS analysis
    • note the elemental/Na refers to molar ratios, some conversion may be needed.

Installation

pip install:

pip install pypitzer

conda install:

conda install pypitzer

Example

After installation. Here is an example:

# import the FluidPitzer class
from Pitzer.models import FluidPitzer

# aqueous species determined in LA-ICP-MS analysis
species = {
    'Na+': 1, # always be 1 if Na is the internal standard
    'K+': 2,  # K/Na = 2
}

# create a fluid object with information from microthemometric and LA-ICP-MS data
fluid = FluidPitzer(
    # the initial guess
    x0=(3, 3),
  
    # species defined before
    species=species,
  
    # the last melting solid
    solids=['KCl'],
  
    # melting temperature of the last solid, °C
    t = 25,
)

result = fluid.optimize()

print(result)

the output will be:

# Na        Cl
1.84525981, 5.53577942

in molality.

Cite this package

...

About

A library for thermodynamic modeling with the Pitzer model and its application in quantification of fluid inclusion data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages