GEMSFITS: Code package for optimization of geochemical model parameters and inverse modeling

G.D. Miron, D.A. Kulik, S.V. Dmytrieva, Thomas Wagner

Research output: Contribution to journalArticleScientificpeer-review


GEMSFITS is a new code package for fitting internally consistent input parameters of GEM (Gibbs energy minimization) geochemical-thermodynamic models against various types of experimental or geochemical data, and for performing inverse modeling tasks. It consists of the gemsfit2 (parameter optimizer) and gfshell2 (graphical user interface) programs both accessing a NoSQL database, all developed with flexibility, generality, efficiency, and user friendliness in mind. The parameter optimizer gemsfit2 includes the GEMS3K chemical speciation solver (, which features a comprehensive suite of non-ideal activity- and equation-of-state models of solution phases (aqueous electrolyte, gas and fluid mixtures, solid-solutions, (ad)sorption. The gemsfit2 code uses the robust open-source NLopt library for parameter fitting, which provides a selection between several nonlinear optimization algorithms (global, local, gradient-based), and supports a large-scale parallelization. The gemsfit2 code can also perform comprehensive statistical analysis of the fitted parameters (basic statistics, sensitivity, Monte Carlo confidence intervals), thus supporting the user with powerful tools for evaluating the quality of the fits and the physical significance of the model parameters. The gfshell2 code provides menu-driven setup of optimization options (data selection, properties to fit and their constraints, measured properties to compare with computed counterparts, and statistics). The practical utility, efficiency, and geochemical relevance of GEMSFITS is demonstrated by examples of typical classes of problems that include fitting of parameters of thermodynamic mixing models, optimization of standard state Gibbs energies of aqueous species and solid-solution end- embers, thermobarometry, inverse titrations, and optimization problems that combine several parameter- and property types.
Original languageEnglish
JournalApplied Geochemistry
Pages (from-to)28-45
Number of pages18
Publication statusPublished - 2015
MoE publication typeA1 Journal article-refereed

Fields of Science

  • 1171 Geosciences
  • 116 Chemical sciences

Cite this