GEM-Selektor overview

GEM-Selektor is a Gibbs Energy Minimization program package for interactive thermodynamic modeling of heterogeneous aquatic (geo)chemical systems, especially those involving metastability and dispersity of mineral phases, solid solution - aqueous solution equilbria, and adsorption/ion exchange. Includes a built-in (default) thermodynamic database in both thermochemical and reaction formats, and an advanced multi-document graphical user interface with a context-sensitive help system.


What is GEM-Selektor?

Overall, using the GEM-Selektor code will bring you all the power of advanced chemical thermodynamic modelling, leading to high efficiency in interpreting even complex subsurface- or hydrothermal aquatic systems. Of course, some learning and exercise will be needed. To make it easier, we strive to provide a help tutorial and a set of test projects

What is GEM-Selektor not?

GEMS3 cannot replace your knowledge of physical chemistry.

It's hardly possible to set up meaningful problems in geochemical thermodynamic modelling and interprete results without a good basic understanding of aquatic chemistry and chemical thermodynamics, even though the underlying concepts are very general and quite simple. Taking a course in the above subjects and/or reading a few good textbooks such as (Anderson, 2005; Nordstrom and Muņos, 1994; Stumm and Morgan, 1996) would therefore be a valuable investment, helping you to maximize the usefulness of GEM modeling.

GEMS3 is not a substitute for creative research.

Geochemical thermodynamic modelling (as almost any modelling) should be regarded as nothing else than a tool  helping you in interpreting your geochemical data and in reaching a deeper understanding of how the chemical system works. As with any tool, using GEMS3 can be either creative or a waste of time. 

GEMS3 cannot formulate chemical modeling problems and interpret results.

Very often, first GEMS3 modeling runs yield rather unexpected results, urging a re-consideration of some concepts or assumptions.. This is normal; a few more modeling iterations will soon give you much more confidence in your data and model predictions. It makes no sense is to start modeling just having the raw data, without a working hypothesis to be verified; clearly, no interpretation of results is possible in this case. GEMS3 is just a tool for checking how realistic your ideas about the system are.

GEMS3 cannot simulate processes in far-from-equilibrium systems.

Some natural, biological or technical systems, especially at short time scales, exist far from equilibrium or in a transient state. In such cases, fundamental assumptions about local and partial equilibria cannot be applied and, therefore, methods of equilibrium chemical thermodynamic cannot be used. Before doing any model calculations with GEMS or another speciation code, first question to ask is whether the concept of local/partial equilibrium is adequate for the system of interest.

GEMS3 is not a tool for plotting phase diagrams.

Plotting phase diagrams is a popular exercise in chemical thermodynamics in petrology or metallurgy, and in aquatic chemistry as well. This often requires a very serious simplification of the chemical system (to make it observable in 2D or 3D coordinate space). A number of tools is avaialble for this purpose (Perplex, Thermocalc, PHREEQPLOT etc.). GEMS3 modeling, however, is aimed at quantifying the effects of equilibration at given (sequence of) T,P, and bulk composition in full speciation complexity of the system, perhaps under many additional kinetic, metastability and/or dispersity constraints. GEMS3 batch calculations can be designed in a way that directly produces phase, activity, or reaction-path diagrams.

GEMS3 cannot create thermodynamic data or assess their quality.

Any chain is as strong as it's weakest link. Likewise, any modeling result is not better than the input compositional and thermodynamic data. In the past 30 years, a considerable progress has been made in compilation of internally consistent thermodynamic data bases, including those supplied as the default database with the GEMS3 code. However, no database covers everything relevant for all possible applications. Therefore, it is usually necessary to extend it with the standard-state data for some missing species or minerals, or extend T,P correction range. Although GEMS3 provides a number of tools for extension of the project thermodynamic database, it cannot replace an expert in critical compilation, matching and retrieval of thermodynamic data.

Some practical features

In most geochemical modelling studies (except maybe simple test examples) the user will need to extend thermodynamic database with some new chemical species and phases, or change some thermodynamic properties of them in a consistent way. A modeling project concept implemented in GEMS3 lets the user performing such modifications conveniently and continue thermodynamic modeling straight away: already created records with input chemical recipes and output equilibrium speciation will be updated or extended automatically. 

All input data and results of GEM calculations are automatically stored in the modeling project data base files and nowhere else. The user can zip her modelling project folder for back-up or to share it with colleagues. Anyone who has (the same or newer) GEMS3 code installed on her PC can unpack that project and run it, as the user would continue running it on her own desktop.  

GEMS3 has a complementary structure of thermodynamic database. The standard molar data for chemical species are kept either in thermochemical (optionally equation-of-state) DComp format, or as reactions defining standard molar properties of a given species via that of the reaction and of other species involved (ReacDC format). In both formats, many data consistency checks are performed. Data of both formats, saved into database records, can be immediately used in GEM calculations of chemical equilibria.

Unlike command-driven or batch-input-file geochemical codes (e.g., PHREEQC, EQ3/6, GWB, ChemApp, Selektor-C, HCh), GEM-Selektor is an interactive modular package in which computational modules share data objects in memory, manipulated by the data base maintenance module. GEMS3 is written in C/C++ and has a modern multi-document mouse-menu-driven GUI (graphical user's interface) based on the Qt GUI Toolkit, which also provides GEMS3 with cross-platform portability: The source code of GEMS3 can be compiled and executed on most Intel-based Linux/Unix, Windows, and Mac OS X desktop platforms.  

In GEM-Selektor, no batch files with input data are necessary. The program operation is fully interactive, controlled by mouse clicking on toolbar icons or menu items, selecting record keys from lists, or entering data directly into spreadsheet-like screen forms. Your entered or calculated data is automatically stored in the project data base, where it is kept accessible for subsequent calculations or data sampling, plotting or exporting. This interactive functionality makes the work flow of geochemical modeling more efficient than ever before. 

Almost all kinds of data accessible in GEM-Selektor windows using the data object labels can be printed into ASCII text files using the simple print formatting scripts. A collection of template printing scripts is provided for the user' convenience; all scripts can easily be customized and saved into your project data base. The data in module window pages can also be copy-pasted to/from most other spreadsheet or text editing programs. Some results of computations can also be exported into csv and VTK format files.

GEM-Selektor GUI provides the user with a context-sensitive hypertext runtime help. In most cases, the tooltips (popping up upon hovering the cursor over almost every button or data field) are sufficient. Direct access to separate HelpWindow with documentation is possible from any dialog, screen form, and even a single data field cell on any screen form. The HelpWindow has the industry-standard browsing and search functionality. 

GEM-Selektor numerical kernel GEMS3K implements an Interior Points Method (IPM) module for non-linear minimization of total Gibbs energy of the heterogeneous multi-phase chemical system (more...), with improved accuracy, mass balance precision, convergence, speed, and extended input data diagnostics to meet the needs of the reactive-transport modelling applications in performance assessment of radioactive waste disposal,  aquatic chemistry, and hydrogeochemistry. The IPM module uses fast and efficient linear algebra solvers from the JAMA C++ TNT package from NIST.

The GEMS3K standalone program implementing the enhanced GEM IPM algorithm is now available open-source from this web site under the LGPL v.3 license. GEMS3K has no GUI and can read/write input/output data from/to text files, as well as exchange the data in computer memory. It can also interpolate thermodynamic data for chemical species for changing temperature and/or pressure. The purpose of GEMS3K is to facilitate and promote development of coupled codes for modelling reactive mass transport using the "operator splitting" approach with GEM chemical equilibria solver. GEMS3K C/C++ code is small, fast, and meets all requirements of such coupled codes including MPI parallelization and high-performance computing for realistic 2D or 3D transport simulations.


More publications about GEMS and its use

Last updated: 30.04.2013

Copyright  (c) 2003-2013  GEMS Development Team.