# Geochemical modeling

Geochemical modeling or theoretical geochemistry is the practice of using chemical thermodynamics, chemical kinetics, or both, to analyze the chemical reactions that affect geologic systems, commonly with the aid of a computer. It is used in high-temperature geochemistry to simulate reactions occurring deep in the Earth's interior, in magma, for instance, or to model low-temperature reactions in aqueous solutions near the Earth's surface, the subject of this article.

## Applications to aqueous systems

Geochemical modeling is used in a variety of fields, including environmental protection and remediation, the petroleum industry, and economic geology. Models can be constructed, for example, to understand the composition of natural waters; the mobility and breakdown of contaminants in flowing groundwater or surface water; the ion speciation of plant nutrients in soil and of regulated metals in stored solid wastes; the formation and dissolution of rocks and minerals in geologic formations in response to injection of industrial wastes, steam, or carbon dioxide; the dissolution of carbon dioxide in seawater and its effect on ocean acidification; and the generation of acidic waters and leaching of metals from mine wastes.

## Development of geochemical modeling

Garrels and Thompson (1962) first applied chemical modeling to geochemistry in 25 °C and one atmosphere total pressure. Their calculation, computed by hand, is now known as an equilibrium model, which predicts species distributions, mineral saturation states, and gas fugacities from measurements of bulk solution composition. By removing small aliquots of solvent water from an equilibrated spring water and repeatedly recalculating the species distribution, Garrels and Mackenzie (1967) simulated the reactions that occur as spring water evaporated. This coupling of mass transfer with an equilibrium model, known as a reaction path model, enabled geochemists to simulate reaction processes.
Helgeson (1968) introduced the first computer program to solve equilibrium and reaction path models, which he and coworkers used to model geological processes like weathering, sediment diagenesis, evaporation, hydrothermal alteration, and ore deposition. Later developments in geochemical modeling included reformulating the governing equations, first as ordinary differential equations, then later as algebraic equations. Additionally, chemical components came to be represented in models by aqueous species, minerals, and gases, rather than by the elements and electrons which make up the species, simplifying the governing equations and their numerical solution.
Recent improvements in the power of personal computers and modeling software have made geochemical models more accessible and more flexible in their implementation. Geochemists are now able to construct on their laptops complex reaction path or reactive transport models which previously would have required a supercomputer.

## Setting up a geochemical model

An aqueous system is uniquely defined by its chemical composition, temperature, and pressure. Creating geochemical models of such systems begins by choosing the basis, the set of aqueous species, minerals, and gases which are used to write chemical reactions and express composition. The number of basis entries required equals the number of components in the system, which is fixed by the phase rule of thermodynamics. Typically, the basis is composed of water, each mineral in equilibrium with the system, each gas at known fugacity, and important aqueous species. Once the basis is defined, a modeler can solve for the equilibrium state, which is described by mass action and mass balance equations for each component.
In finding the equilibrium state, a geochemical modeler solves for the distribution of mass of all species, minerals, and gases which can be formed from the basis. This includes the activity, activity coefficient, and concentration of aqueous species, the saturation state of minerals, and the fugacity of gases. Minerals with a saturation index (log Q/K) equal to zero are said to be in equilibrium with the fluid. Those with positive saturation indices are termed supersaturated, indicating they are favored to precipitate from solution. A mineral is undersaturated if its saturation index is negative, indicating that it is favored to dissolve.
Geochemical modelers commonly create reaction path models to understand how systems respond to changes in composition, temperature, or pressure. By configuring the manner in which mass and heat transfer are specified (i.e., open or closed systems), models can be used to represent a variety of geochemical processes. Reaction paths can assume chemical equilibrium, or they can incorporate kinetic rate laws to calculate the timing of reactions. In order to predict the distribution in space and time of the chemical reactions that occur along a flowpath, geochemical models are increasingly being coupled with hydrologic models of mass and heat transport to form reactive transport models. Specialized geochemical modeling programs that are designed as cross-linkable re-entrant software objects enable construction of reactive transport models of any flow configuration.

## Types of reactions

Geochemical models are capable of simulating many different types of reactions. Included among them are:
* Acid-base reactions
* Aqueous complexation
* Mineral dissolution and precipitation, including Ostwald ripening
* Reduction and oxidation (redox) reactions, including those catalyzed by enzymes, surfaces, and microorganisms
* Sorption, ion exchange, and surface complexation
* Gas dissolution and exsolution
* Stable isotope fractionation
* Radioactive decay
Simple phase diagrams or plots are commonly used to illustrate such geochemical reactions. Eh-pH (Pourbaix) diagrams, for example, are a special type of activity diagram which represent acid-base and redox chemistry graphically.

## Uncertainties in geochemical modelling

Various sources can contribute to a range of simulation results. The range of the simulation results is defined as model uncertainty. One of the most important sources not possible to quantify is the conceptual model, which is developed and defined by the modeller. Further sources are the parameterization of the model regarding the hydraulic (only when simulating transport) and mineralogical properties. The parameters used for the geochemical simulations can also contribute to model uncertainty. These are the applied thermodynamic database and the parameters for the kinetic minerals dissolution. Differences in the thermodynamic data (i.e. equilibrium constants, parameters for temperature correction, activity equations and coefficients) can result in large uncertainties. Furthermore, the large spans of experimentally derived rate constants for minerals dissolution rate laws can cause large variations in simulation results. Despite this is well-known, uncertainties are not frequently considered when conducting geochemical modelling.
Reducing uncertainties can be achieved by comparison of simulation results with experimental data, although experimental data does not exist at every temperature-pressure condition and for every chemical system. Although such a comparison or calibration can not be conducted consequently the geochemical codes and thermodynamic databases are state-of-the-art and the most useful tools for predicting geochemical processes.

## Software programs in common use

* ChemEQL
* ChemPlugin
* CHESS, HYTEC
* CHILLER, CHIM-XPT
* CrunchFlow
* EQ3/EQ6
* GEOCHEM-EZ
* GibbsStudio
* The Geochemist's Workbench
* GWB Community Edition
* GEMS-PSI
* HYDROGEOCHEM
* MINEQL+
* MINTEQA2
* ORCHESTRA
* PHREEQC
* Reaktoro
* SOLMINEQ.88, GAMSPATH.99
* TOUGHREACT
* Visual MINTEQ
* WATEQ4F
* WHAM
The USGS website provides free access to many of the software listed above.