Back to All Events

Online Course: Applied Geochemical Modeling with Phreeqc and Python - 13, 20, 27 May, 10, 17, 24 Jun and 08 Jul 2022


Phreeqc is a software developed by the USGS written in C++ capable of modeling a variety of aqueous geochemical processes such as mixing of waters, modeling equilibrium between solid and aqueous phase, modeling impact of temperature, calculation of element concentration among others. 

Hatarilabs has developed an applied and unique course of Phreeqc integrated with Python undes a class (object type) that can run, parse and provide Phreeqc output as Pandas dataframes and integrate it to plots and further analysis with other Python libraries on a Jupyter notebook.

Course content

The development of the applications of this course is shown below grouped by session:

Session 1: Speciation calculation

This example covers the simulation of the distribution of species in seawater and the saturation of a set of minerals. In order to demonstrate the capabilities of Phreeqc to simulate new elements, uranium is added to the solution by specifying keywords and with the use of the wateq4f database. The example cover all these cases:

  • Speciate seawater specifying redox reactions.

  • Speciate seawater with calculation of density and pe.

  • Speciate seawater with uranium in the solution and defining phases.

  • Speciate seawater with uranium using the Water4f database.


Session 2: Equilibrium with pure phases

This example covers the solubility of gypsum and anhydrite related to temperature. The Python code runs the Phreeqc example and parses solutions. Concentrations and saturation indexes are analyzed for the initial solution and a given batch reaction, however, for all the reactions a loop is performed to extract the Anhydrite and Gypsum saturation indexes of each reaction to plot the correlation of saturation indices with temperature. 


Session 3: Groundwater and seawater mixing

Example that shows the Phreeqc capabilities to perform geochemical simulations in steps while each simulation takes the output solution from a previous one. This example shows the mixing of pure water in equilibrium with calcite and co2 that is mixed with seawater with standard concentrations of anions and cations. Mixing is specified as percentages and the resulting solution is then equilibrated with calcite and dolomite. Carbon and calcium species and saturation indices for dolomite, gypsum and anhydrite are extracted from every simulation part and plotted as bar diagrams.


Session 4: Irreversible reactions

Applied example of Phreeqc for the simulation of irreversible reactions in the oxidation of pyrite. Pyrite, calcite, and goethite are allowed to dissolve in equilibrium and partial pressure of CO2 is maintained at 10E-3.5. Two species: 02 and NaCl are added into the solution in five different relative proportions of a given concentration. The geochemical simulation was carried out and results were compiled in pure Python and then compared with Phreeqc tools to export specific outputs.


Session 05: Exchange example

An example that demonstrates the Phreeqc capabilities to deal with sorption. This example uses the cation ion exchange approach where only the EXCHANGE keyword is used because EXCHANGE_MASTER_SPECIES and EXCHANGE_SPECIES are included in WATEQ4F.dat database. The model output is parsed as dataframes and the solution composition and description are calculated and compared before and after the exchange.


Session 06: Surface complexation

Phrreqc can model surface complexation and this example simulates the distribution of uranium species in acid mine water when it is treated with oxygen and limestone.The example has 3 simulations where each simulation uses the resulting solution from previous simulations. Concentration of the solution components and species for calcium, fe2+ and uranium are compared from the initial solution, in equilibrium with calcite and o2 and after the surface complexation. Only the SURFACE keyword is defined since the SURFACE_MASTER_SPECIES and SURFACE_SPECIES are located in the wateq4f database.


 Session 07: Reaction kinetics

Phreeqc uses the Kinetics keyword to specify kinetic reactions and parameters for batch-reaction and reactive-transport calculations. This example shows the use of reaction kinetics for the time dependent calcite dissolution where reaction rates are given by a small BASIC program. The example defines a Python function that lists the molarity and saturation of Calcite and plots those values for the different times defined as batch reactions.


Trainer

Saul Montoya M.Sc.

Hydrogeologist - Numerical Modeler

Mr. Montoya is a Civil Engineer graduated from the Catholic University in Lima with postgraduate studies in Management and Engineering of Water Resources (WAREM Program) from Stuttgart University – Germany with mention in Groundwater Engineering and Hydroinformatics. Mr Montoya has a strong analytical capacity for the interpretation, conceptualization and modeling of the surface and underground water cycle and their interaction. 

He is in charge of numerical modeling for contaminant transport and remediation systems of contaminated sites. Inside his hydrological and hydrogeological investigations Mr. Montoya has developed a holistic comprehension of the water cycle, understanding and quantifying the main hydrological dynamic process of precipitation, runoff, evaporation and recharge to the groundwater system. 

Over the last 9 years Saul has developed 2 websites for knowledge sharing in water resources: www.gidahatari.com (Spanish) and www.hatarilabs.com (English) that have become relevant due to its applied tutorials on groundwater modeling, spatial analysis and computational fluid mechanics.

 

Methodology

Here are some details of each methodology:

  • Manuals and files for the exercises will be delivered.

  • The course will be developed by videos on private web platform.

  • There is online support for questions regarding the exercises developed in the course.

  • Video of the classes will be available for 02 month.

  • To receive the digital certificate you must submit the exams after 1 month.

  • Digital certificate available at approval.

Date and time

May 2022 (Amsterdam Time)

  • Friday 13 from 6:00 pm to 8:00 pm.

  • Friday 20 from 6:00 pm to 8:00 pm.

  • Friday 27 from 6:00 pm to 8:00 pm.

June 2022 (Amsterdam Time)

  • Friday 10 from 6:00 pm to 8:00 pm.

  • Friday 17 from 6:00 pm to 8:00 pm.

  • Friday 24 from 6:00 pm to 8:00 pm.

July 2022 (Amsterdam Time)

  • Friday 08 from 6:00 pm to 8:00 pm.

Cost and payment method

Price: $250

This online course will be given on out elearning platform: elearning.hatarilabs.com . You will need to create an account first and then make your payment.

For any other information please write to: saulmontoya@hatarilabs.com