STOMP

toECKE Pre-processor

Description

toECKE is a Fortran program that builds some of the input cards needed to run reactive transport simulations with the STOMP reactive transport module, ECKEChem.  toEcke_example_files.zip contains example input and output files.

Compilation

toECKE is provided as Fortran source code and must be compiled on your local machine to create an executable file. toECKE must be linked to the LAPACK Linear Algebra Package which can be downloaded from http://www.netlib.org/lapack/

Some example commands for compilation using a variety of compilers are:

Intel Compiler
ifort -L /usr/lib -llapack -lblas toECKE.f90 -o toECKE
gfortran Compiler
gfortran -L /usr/lib -llapack -lblas toECKE.f90 -o toECKE

Usage

./toECKE [database] [species_list] [mineral_rates]

Input Files

The program requires two input files, a database and a species list file, and has a third optional mineral rate file:

  1. Database: A thermodynamic database in Geochemist Workbench format.  These are text files that can be downloaded from this web page: http://www.gwb.com/thermo.php (choose the older .dat format)
  2. Species List: A text file with a list of species names selected from the database.
  3. Mineral Rates (Optional): A text file with a compilation of mineral rate parameters. The data for each mineral should be in groups of three lines as follows:

    1. Mineral name
    2. Kinetic reaction type
    3. Kinetic rate parameters

Output Files

The program writes the following files that correspond to STOMP input cards used by the ECKEChem module:

  • aqueous_species.card
  • solid_species.card
  • gas_species.card
  • conservation_equations.card
  • equilibrium_equations.card
  • equilibrium_reactions.card
  • kinetic_equations.card
  • kinetic_reactions.card
  • output_control.card (partial, just species list sorted by type)

Notes on the Species List File

  • Each species must be listed on a single line, with the name corresponding exactly to that given in the database. For example, bicarbonate from the thermo.com.v8.r6+.dat database would be written as HCO3-.
  • Basis species from the database will become conservation component species in the ECKEChem reaction network.
  • Redox couples and aqueous species from the database will become equilibrium reactions in ECKEChem.
  • Mineral phases from the database will become kinetic reactions in ECKEChem.
  • Gas species from the database will become gas species in ECKEChem.
  • Missing basis species needed to form a complete reaction network will be added (with the exception of H2O).
  • If a reaction in the database is written in terms of aqueous or redox species, then they will also be added to the species list, along with any relevant basis species.
  • If the user does not specify H2O as one of the input species, the reactions will be written without H2O.
  • Redox or aqueous species may be swapped for basis species, and so will become conservation components in ECKEChem.  
  • Each basis swap must be listed on a separate line, with a basis species on the left of the -> expression and a redox or aqueous species on the right.  For example, aqueous CO2 may be swapped for bicarbonate using:  HCO3- -> CO2(aq)
  • If redox species are not explicitly listed in the species list file, they will be treated as basis species, and redox reactions will not be included in the reaction network.
  • The log K for a reaction may be augmented by adding the expression ^^ and a number after the species name, for example, "Calcite ^^ 1.0" will add 1.0 to each value in the log K table for Calcite.
  • An exchange species data block may be added to a Geochemist's Workbench database to accommodate the Exchange Species card in STOMP.
  • A surface species data block may be added to a Geochemist's Workbench database to accommodate equilibrium or kinetic surface complexation reactions.
  • An adsorbed species data block may be added to a Geochemist's Workbench database to accommodate kinetic adsorption reactions, either Valocchi or Langmuir.

Notes on the Mineral Rates File

  • The mineral names must correspond to mineral names in the thermodynamic database.
  • The kinetic reaction type and parameters are read as strings, and there is no syntax checking.  Refer to the Kinetic Reactions Card for the type and rate parameter syntax.
  • If no mineral rate file is specified, then the kinetic reactions are written as TST rate equations, with zero values for the forward rate and activation energy.
  • Palandri et al., 2004 is a good source for mineral rate parameters.

 Notes on the Output Card Files

  • If any lines in the conservation equation card  turn out to be longer than 512 characters the user will need to add line breaks.
  • Some cards may not be written if there are no species or reactions of that particular type in the reaction network.
  • toECKE also sorts the final list of species, and then writes that and any equilibrium and kinetic reactions in human-readable format to the screen.

Reference:

Palandri, J L. and YK. Kharaka. 2004. A Compilation of Rate Parameters of Water-Mineral Interaction Kinetics for Application to Geochemical Modeling, Menlo Park, California, U.S. Geological Survey.



ECKEChem Input Cards

STOMP User Guide Home

eSTOMP User Guide Home