wiki:public/doc-auto/by_ext/gem
Last modified 3 years ago Last modified on 01/21/16 13:49:09

Input file gem

Description

This is an input file specific for the OpenGeoSys-GEM coupled version for reactive transport.Other OpenGeoSys-GEM specific or important settings are in the *.mcp (Diffusion model), *.pcs (restart files), *.mfp (fluid density), *.mmp (porosity model) files.

Parameters

Example 01: Calcite-dolomite benchmark

#GEM_PROPERTIES
$GEM_THREADS
8
$GEM_INIT_FILE
BC-dat.lst
$FLAG_POROSITY_CHANGE
1
$MIN_POROSITY
1.e-6
$MAX_POROSITY
1.0
$FLAG_COUPLING_HYDROLOGY
1
$TEMPERATURE_GEM
298.15
$MAX_FAILED_NODES
5
#STOP

Keyword: #GEM_PROPTERTIES

Description: The #GEM_PROPTERTIES keyword indicates the beginning of the definitions. Definitions and data will be read until the file input terminator #STOP is reached.

Parameters: None

Sub keywords: $GEM_INIT_FILE, $GEM_THREADS, $FLAG_POROSITY_CHANGE, $MIN_POROSITY, $MAX_POROSITY, $FLAG_COUPLING_HYDROLOGY, $CALCULATE_BOUNDARY_NODES, $TEMPERATURE_GEM, $PRESSURE_GEM, $MAX_FAILED_NODES, $MY_SMART_GEMS, $KINETIC_GEM

Questions: Any?

Keyword: $GEM_INIT_FILE

Description: The keyword reads as parameter the GEMS3K input file (lst file) that contains the names of the GEMS data file (dch file), the GEMS numerical settings (ipm file) and the example setup (dbr file) used to initialize the GEMS3K kernel. The four files are created in GEMSELEKTOR V3 by exporting a working setup for use with the GEMS3K kernel. The user should make sure that the files are produced with a GEM-SELEKTOR version that is compatible to the GEMS3K version used in OpenGeoSys-GEM.

Parameters: The parameter is defined one line below the keyword. Only one parameter can be defined.

Sub keywords: None

ATTENTION: This keyword is inevitable.

Keyword: $GEM_THREADS

Description: The keyword $GEM_THREADS gives the number of threads that should be used in parallel to execute GEMS3K calculations. In case a parallel code with MPI tasks is executed, each MPI task spawns $GEM_THREADS. Using more than 1 thread may decrease greatly the computation time. It is possible to define an arbitrary number of threads, but it is recommended to match the number of threads with the number of CPUs (cores) that are available for running OpenGeoSys-GEMS. Parameters: The parameter (int) must be written in the subsequent line after the keyword and must be greater zero. It is recommended to set it to the number of CPUs (cores) that should be used for calculations.

Sub keywords: None

Questions: Any?

Keyword: $FLAG_POROSITY_CHANGE

Description: The keyword $FLAG_POROSITY_CHANGE gives Parameters: The parameter (int) must be written in the subsequent line after the keyword and must be zero (0) or one (1). If it is one (1), the porosity will be updated according to the result of the GEM calculation for each node. Node porosities will be interpolated to element porosities via calculation of the arithmetric mean. The amount of Fluid/Gas? (including amount of dissolved species) will be adjusted to match the porosity. The excess volume can be accounted for by back-coupling to hydraulics via the keyword $FLAG_COUPLING_HYDRAULICS.

Sub keywords: None

Questions: Any?

Keyword: $MIN_POROSITY

Description: The keyword $FLAG_POROSITY_CHANGE gives Parameters: The parameter (double) must be written in the subsequent line and must be greater than zero (0). Recommended value is “1.0e-6”. GEM can calculate zero porosities and chemical systems without fluid/gas OpenGeoSys ASCII File Description: Introduction of keywords and parameters phase, but hydraulics/transport will not work with zero porosity. Porosities below $MIN_POROSITY are raised by adding fluid/gas to the system.

Sub keywords: None

Questions: Any?

Keyword: $MAX_POROSITY

Description: The keyword $FLAG_POROSITY_CHANGE gives Parameters: The parameter (double) must be written in the subsequent line and must be smaller or equal to one (1.0). Recommended value is “1.0”.

Sub keywords: None

Questions: Any?

Keyword: $FLAG_COUPLING_HYDROLOGY

Description: The keyword $FLAG_POROSITY_CHANGE gives Parameters: The parameter (int) must be written in the subsequent line after the keyword and must be zero (0) or one (1). It it is one, fluid volume changes after GEMS calculations (due to porosity changes, compositional changes, temperature changes ..) are back-coupled to hydraulics by adding appropriate source/sink terms for the next time step.

Sub keywords: None

Questions: Any?

Keyword: $CALCULATE_BOUNDARY_NODES

Description: The keyword $CALCULATE_BOUNDARY_NODES gives Parameters: The parameter (int) must be written in the subsequent line after the keyword and must be zero (0) or one (1). If the flag is set to one, the chemical system is also calculated at boundary nodes (where concentrations are fixed). This might be necessary to change porosity at such nodes.

Sub keywords: None

Questions: Any?

Keyword: $TEMPERATURE_GEM

Description: The keyword $TEMPERATURE_GEM sets a temperature for GEMS calculations in case no heat transport process is defined. Parameters: The parameter (double) must be written in the subsequent line after the keyword and must be given in Kelvin.

Sub keywords: None

Questions: Any?

Keyword: $PRESSURE_GEM

Description: The keyword $PRESSURE_GEM allows to set a pressure for GEM independent from the hydraulic calculations. Parameters: The parameter (double) must be written in the subsequent line after the keyword and must be given in Pascal.

Sub keywords: None

Questions: Any?

Keyword: $MAX_FAILED_NODES

Description: The keyword $PRESSURE_GEM allows to continue calculations even if GEM does not find a solution at a node. Parameters: The parameter (int) must be written in the subsequent line after the keyword. Calculations are continued if up to $MAX_FAILED_NODES per GEMS thread are present.

Sub keywords: None

Questions: Any?

Keyword: $KINETIC_GEM

Description: The $KINETIC_GEM keyword enables to kinetically control precipitation/dissolution of solid phases. An overview on the problems and uncertainties related to precipitation data is given by Palandri and Kharaka (2004) on pages 5 and 6. We implemented their approach which assumes that both dissolution and precipitation (forward and backward rates) must proceed by a single reversible mechanism.

For a detailed description of the Kinetic terms, please download the description from the OGS-GEM forum of the OpenGeoSys.org webpage.

Currently only a very simple model for the calculation of the reactive surface area SA for a mineral i is implemented: SA= V i ai (6) Where Vi is the volume of the mineral [m3] and ai is the relative surface area per volume [m2 m-3].

Palandri, J. L., Kharaka, Y. K., 2004. A compilation of rate parameters of water-mineral interaction kinetics for application to geochemical mdelling. U.S. Geological Survey Open File Report 2004- 1068, Menlo Park, California, US.

Parameters: first line: kinetic parameters

  • name of phase which is controlled (from GEMS setup)
  • number of kinetic model
  • number of species activites used
  • double E_acid,E_neutral,E_base; activation energies for temperature dependencies
  • double k_acid, k_neutral,k_base; dissolution/precipitation rate constants
  • double q1,p1,q2,q3,p2,p3; exponents for omega
  • name of first species
  • double n_1, n_2,n_3; exponents for acidic, neutral and base cases for species one
  • name of next species
  • .....three more exponents for each additional species

second line: reactive surface area

  • number of model for calculation of reactive surface area
  • model parameters for reactive surface area: e.g. specific reactive surface area

third line: additional parameters for kinetic model “5” (phase is solid solution that has end members with different stoichometry)

  • number of end members
  • for each endmember a scaling factor for the specific reactive surface area

ATTENTION: July 2014: kinetics for solid solution is currently broken..do not use!

Example:
$KINETIC_GEM ; phase for cation exchange which can dissolve, parameters from Palandri
SS_Montmor 5 1 0.0 0.0 0.0 -10.98 -12.78 -16.52 1.0 1.0 1.0 1.0 1.0 1.0 H+ 0.34 0.0 -0.4
1 3.0e+6 ; high reactive surface area
6 2.0 2.0 1.0 2.0 1.0 2.0 ; scaling of end members according to Vanselow convention
$KINETIC_GEM ; like Palandri
Gibbsite 1 1 0.0 0.0 0.0 -7.65 -11.50 -16.65 1.0 1.0 1.0 1.0 1.0 1.0 H+ 0.992 0.0 -0.784
1 1.0e+2 ;
$KINETIC_GEM ; like zeolithes
Phillipsite 5 1 0.0 0.0 0.0 0.0 -10.00 0.0 0.0 1.0 1.0 1.0 0.0 1.0 H+ 0.0 0.0 0.0
1 1.0e+2 ;
3 2.0 1.0 1.0

Sub keywords: none

Questions: Any Questions or ToDos??

Keyword: $CONSTRAINT_GEMS

Description: With this keyword it is possible to set n dependent component to a specific initial amount. When initializing the system composition form values given in the IC files, it is necessary to pass mass constraints (upper and lower limits for mass balance calculation) to the GEM solver for each dependent component which is assumed out of equilibrium initially. This is normally associated with kinetic control of the corresponding phase.

Parameters:

Example:
Sand 1245.0 1246.0 1 7 345.0 346.0
; dependent component name (chars), lower limit (double), upper limit
(double), condition type (int), number of the independent component
(int), lower limit (double), upper limit (double).

The parameters must be written in the subsequent line after the keyword. First the name of the dependent component, as defined in the GEM dch file, has to be given. Then two numbers (double) which are the lower and upper limit (dul and dll) for the initial gem calculations. It is possible to give the same number for dul and dll in order to fix it to a specific value. Otherwise the GEM algorithm will calculate an amount (which is in the given interval). The following four numbers are used to define for which nodes the constrain should apply. Currently only condition type ‘1’ is implemented. For this condition type the constrain is applied to all nodes, for which the total amount of the independent component given is in the interval defined by the last two numbers(for a system with volume 1m3).

Sub keywords: None

Questions: ?

Keyword: #STOP

Description: This keyword indicates the end of the file. Everything written after file input terminator #STOP is unaccounted for input. However, users may write text and templates after #STOP as mnemonic or for blockwise copies and pastes.

Parameters: None

Sub keywords: None

Source Files

FEM/rf_REACT_GEM.cpp

#-Keywords

$-Keywords

Last modified: 2016-01-21 13:48:58.996505

This page has been generated automatically. Do not edit it manually! It will be overwritten in regular intervals.

If you want to edit the handwritten part of this page, please do so here.