Skip to main content

 

  • About
  • News & Media
  • Careers
  • Events

Breadcrumb

STOMP logo

STOMP User Guide

Subsurface Transport Over Multiple Phases

  • STOMP Website
  • Introduction
    • Operational Mode Specific Input Guides
    • Availability and Licensing
    • Installation
  • Fundamentals of STOMP
    • Code Design
    • Numerical Solutions
    • Description of Variables
    • List of Variable Names
    • Accepted Units
    • Glossary of Symbols
  • Using STOMP
    • Pre-Processing
    • Input File Structure
    • Generated Output Files
    • Post-Processing
  • Example Short Course Problems
  • Additional User Documentation

Breadcrumb

  1. User Guide Introduction

Pre-processing

Utilities have been developed to help users pre-process files to create either external files referred to in the STOMP input file or to generate cards or portions of cards. These utilities can be requested as part of a request for STOMP source code or at any time after a license has been established.

  • PetrelTo
  • toECKE

petrelTo is a Fortran utility that reads a Generic Eclipse Keyword file exported from Petrelâ„¢ and creates an IJK formatted file for each property that can then be named in the appropriate card in the input file. STOMP can interpret a Generic Eclipse Keyword file (*.grdecl) to create a grid using the keyword "Generic Eclipse" in the stomp input file under the Grid card.

Get and compile petrelTo

petrelTo is provided as Fortran source code and must be compiled on your local machine to create an executable file. Download the source code here. You must have a fortran compiler on your local machine. gfortran is an open source compiler that can be used for STOMP and its corresponding fortran-based utilities. The command to build petrelTo using gfortran is:

gfortran -o petrelTo.x petrelTo.f

Usage

./petrelTo [Generic Eclipse Keyword filename]

Note: If no filename is provided the program will prompt the user for one.

If the GENERIC ECLISPE file references other files as indicated by INCLUDE statements, then those other files must also be present in the working directory.

If the property data is provided in additional GENERIC ECLISPE files that only contain property information, these file names must be provided in the command line after the GENERIC ECLISPE file containing grid information. If the files are not provided on the command line then the user will be prompted for the filenames if no property information is detected in the grid GRDECL file.

Input Files

.petrelTo reads a Generic Eclipse Keyword File exported from Petrelâ„¢. To create this file, select a model in your Petrel project and choose "export" and select the "ECLIPSE keywords (grid geometry and properties)(ASCII)(*.*)" output type. Then check the export properties box and select the properties you wish to export and click on Export settings.

petrel export window

Note that the following export settings should be selected:

petrel export settings

Note: If the Petrel model is very large, the model may be exported in a set of files, one for each property. If so, when running petrelTo, specify the main file in the command line or at the prompt, and the program will use the files listed in the include statements in the main file to generate the IJK property files.

Output Files

petrelTo creates an IJK formatted output file for each property present in the input file. If there are inactive nodes, it will also create an inactive nodes file in the proper format for input to STOMP.

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. Example input and output files are provided with the toECKE source code which can be requested upong receiving a STOMP license.

Get and compile toECKE

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

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 here (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
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.

    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.

    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 Output 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.

    PNNL

    • Get in Touch
      • Contact
      • Careers
      • Doing Business
      • Security & Privacy
    • Research
      • Scientific Discovery
      • Energy Resiliency
      • National Security
    Sign up for our newsletter
    Department of Energy Logo Battelle Logo
    Pacific Northwest National Laboratory (PNNL) is managed and operated by Battelle for the Department of Energy
    • YouTube
    • Facebook
    • Twitter
    • Instagram
    • LinkedIn