2. Input Files Needed to Run a Standalone GEMS3K Calculation
2.1. DCH File with Chemical System Definition
2.2. IPM File with GEM IPM Numerical Settings, Optional Sorption and Solution Model Parameters
2.3. DBR File with Node Chemical System Recipe Composition and Speciation
3. Free Data Input Text File Format of GEMS3K
4. Alphabetical List of Data Objects Used in GEMS3K Input Files
Text input file formats of GEMS3K program, in general,
correspond to three data structures that keep the definition of
chemical system (DATACH structure) and work data of the GEM IPM 3
algorithm
(MULTI structure),
with the data that vary from node to node exchanged through the
DATABR ("data bridge recipe") structure. Accordingly, the input
consists of
three file types: the DCH, the IPM and the DBR. All these
files have the same free-text data format. The
files can be typed using any ASCII text editor, or easily exported from
a SysEq record (calculated equilibrium state) in the GEM-Selektor
package. To do the latter, simply open a SysEq record in a "Single
Thermodynamic System" dialog and re-calculate it. Then select a menu
command "Data" "Write GEMS3K files ..." and follow the appearing
dialogs (more about this
here).
The contents of DCH file,
read only once at the initialization of
the GEMS3K session, are copied into both DATACH and MULTI
memory structures.
The IPM file contains the
data that are irrelevant for the
mass-transport part. This file is read once after the DCH file, and the
contents are sent into the MULTI memory structure. The IPM file
contains numerical settings of the GEM IPM
algorithm, as well as the parameters of non-ideal mixing models in
phases-solutions, and/or properties of
sorption phases and surface complexes belonging to them.
One or many DBR files
contain the data for bulk
composition,
temperature, pressure, and metastability constraints (GEM input). At
the same time, such files when written by GEM-Selektor or (coupled)
GEMS3K code, contain the GEM equilibrium speciation results (output)
such as the dual solution (vector u), primal solution
(speciation), activity coefficients, amounts and bulk compositions of
phases.
The minimum to run GEMS3K coupled at TNode level requires to create an instance of TNode structure and a pointer to it, and then issue the GEM_init() call, as exemplified in this code fragment:
// Create TNode structure instance accessible trough the "node" pointerIn the "input_system_file_list_name" string,
typically a path to text file with the extension ".lst" is given. In
this .lst file, three GEMS3K input file names must be given
(space-separated) in the following order: DCH file; IPM file; DBR file.
The files must be located in the same folder (directory) as the .lst
file. The easiest way to produce such a set of files is to export them
from the GEM-Selektor package, as described here.
After successful initialization, any number of additional DBR files
with different chemical system recipes compatible with DCH and IPM
files used during the GEMS3K initialization can be read into the TNode
instance using the following call:
In the "NextRecipeFileName" null-terminated string, a path to text file with the extension "dbr.dat" should be given.
These DBR file names can be, in principle, passed via a list (.lst)
file containing
(comma-separated) DBR file names located in the same folder as the "*dat.lst"
file. This is done in "gemcalc" and "node-gem" test examples provided with the GEMS3K code. Both example programs can be executed from command line as follows:
gemnode.exe
<TestDir>/<TaskName>-dat.lst <TestDir>/<TaskName>-dbr.lst > <TaskName>.out
where <TestDir> is
an optional subdirectory path; <TaskName>
should be substituted by a string denoting the
problem name, e.g. "MyTask".
The file <TaskName>.out will
contain console output of the program, redirected there during
execution of the
TNode example. Without this redirection, the output can be found in a
terminal (Linux, Mac OS X) or lost (in Windows). The GEMS3K input files will be read in the following order:
The first file in the list, <TaskName>-dch.dat,
contains the input
data for the
chemical system definition (CSD) that can be used by both GEM and the
mass transport parts of the coupled code.
This data are is also needed for reading/writing the *-dbr.dat files (see below).
The second file in the list, <TaskName>-ipm.dat,
contains input data that are used
internally by the GEM IPM kernel and must not be exchanged with the
mass transport part. This file also contains the GEM IPM numerical
controls; parameters of mixing in multicomponent phases; and,
optionally, parameters of surface complexation models.
The third file in the list, <TaskName>-dbr-<node0>.dat,
contains the input data for the <node0> chemical system. If this
is the only equilibrium to be calculated then no other files are necessary.
Otherwise, a list of additional DBR file names from the
same or different location is provided in the optional file <TaskName>-dbr.lst> file.
There can be one or many comma-separated file
names of *-dbr.dat
(node recipe) type, which will be read sequentially. On the
TNodeArray level, these files may contain composition and speciation of all
chemical systems needed to set up the initial conditions for the reactive mass
transport modelling. On the TNode level, in principle, one *-dbr.dat file is sufficient.
<END_DIM>
Many data object entries can be skipped (especially in the *-ipm.dat file), in which case the default values will be set automatically by GEMS3K. The data objects without default values must always be provided at input (they are marked accordingly in the file format documentation).The DCH input file will always be read first, before the IPM
file and DBR files.
The file <TaskName>-dch.dat contains the items of chemical system definitions (CSD) that can be accessed both by the GEM IPM3 and by the mass-transport parts of the coupled code. Contents of this file will be placed in two memory data structures: (1) DATACH structure visible from both GEM IPM3 and the mass transport part, and (2) MULTI - the internal work structure of GEM IPM3, not visible from the mass transport part.
The <TaskName>-dch.dat (and the DATACH structure) also contain dimensions and index lists that are needed for reading and accessing the DBR (node description) files like <TaskName>-dbr-<node0>.dat. Finally, the DCH file and DATACH structure contain the look-up arrays used for the automatic interpolation of Gibbs energies G0, molar volumes V0, and other kinds of thermodynamic data to given values of temperature T and pressure P in GEM IPM3 calculations for any node and time.
The DCH text input file consists of nine sections, of which
sections (1), (2), and (3)
contain dimensions needed for
memory allocation that must appear before the <END_DIM> tag. Any
other data object fields can appear after this tag in any order, and
some data objects can be skipped. If the data object tag is not found
in the input file, its elements will be assigned default values, if
possible.
It is recommended to place the input data in logical
sections as in DCH files printed from the GEM-Selektor code. The section (4)
contains a DATABR structure index configuration; section (5) contains
names and some data for independent components (IC); section (6)
contains names and data for the dependent components (DC); section (7)
contains names and data for phases; section (8) is the stoichiometry
matrix A for all Dependent Components in the system, and section (9)
contains the lookup arrays
for interpolation of thermodynamic data.
An example DCH text file content (from the 'node-gem' example input data) is shown below
# File tp_test/CalcColumn-dch.dat <nIC> 7 <nDC> 28 <nPH> 7 <nPS> 2 <nDCs> 23 <nICb> 7 <nDCb> 28 <nPHb> 7 <nPSb> 2 <nTp> 3 <nPp> 3 <iGrd> 0 <fAalp> 1 <mLook> 1 <END_DIM> <ICNL> 'C' 'Ca' 'Cl' 'H' 'Mg' 'O' 'Zz' <ccIC> 'e' 'e' 'e' 'h' 'e' 'o' 'z' <ICmm> 0.0120108 0.040078 0.035453 0.00100795 0.024305 0.0159994 0 <DCNL> 'Ca(CO3)@' 'Ca(HCO3)+' 'Ca+2' 'CaOH+' 'Mg(CO3)@' 'Mg(HCO3)+' 'Mg+2' 'MgOH+' 'CO2@' 'CO3-2' 'HCO3-' 'CH4@' 'ClO4-' 'Cl-' 'H2@' 'O2@' 'OH-' 'H+' 'H2O@' 'CO2' 'CH4' 'H2' 'O2' 'Gr' 'Cal' 'Dis-Dol' 'Portlandite' 'Brc' <ccDC> 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'S' 'T' 'W' 'G' 'G' 'G' 'G' 'O' 'O' 'O' 'O' 'O' <PHNL> 'aq_gen' 'gas_gen' 'Graphite' 'Calcite' 'Dolomite-dis' 'Portlandite' 'Brucite' <ccPH> 'a' 'g' 's' 's' 's' 's' 's' <nDCinPH> 19 4 1 1 1 1 1 <A> # 'C' 'Ca' 'Cl' 'H' 'Mg' 'O' 'Zz' 1 1 0 0 0 3 0 1 1 0 1 0 3 1 0 1 0 0 0 0 2 0 1 0 1 0 1 1 1 0 0 0 1 3 0 1 0 0 1 1 3 1 0 0 0 0 1 0 2 0 0 0 1 1 1 1 1 0 0 0 0 2 0 1 0 0 0 0 3 -2 1 0 0 1 0 3 -1 1 0 0 4 0 0 0 0 0 1 0 0 4 -1 0 0 1 0 0 0 -1 0 0 0 2 0 0 0 0 0 0 0 0 2 0 0 0 0 1 0 1 -1 0 0 0 1 0 0 1 0 0 0 2 0 1 0 # Gases 1 0 0 0 0 2 0 1 0 0 4 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 2 0 # Pure solids 1 0 0 0 0 0 0 1 1 0 0 0 3 0 2 1 0 0 1 6 0 0 1 0 2 0 2 0 0 0 0 2 1 2 0 <TKval> 298.15 308.15 328.15 <Pval> 100000 10000000 30000000 <denW> 997.061364306278 998.356005405459 998.315521146566 -0.25866418191325 -0.351245995240374 -0.481526974116549 -0.00946964566451448 -0.00744141355821083 -0.00528332996880317 0.0450858902637571 0.04320907388247 0.0408264412681549 0 0 0 <epsW> 78.2451456494471 75.1438080290594 69.2777788768649 -0.355010888388417 -0.342609612168612 -0.315334450161999 0.00135076186526265 0.00145381261941342 0.00146902056825049 0.00406162824448407 0.00378968195478582 0.00339565126908197 0 0 0 <V0> -1.56484448542463e-05 -1.49452326837588e-05 -1.37711281379437e-05 1.33298113314253e-05 1.38725790615347e-05 1.45379532536251e-05 -1.84387418380244e-05 -1.75533933999758e-05 -1.62969099111207e-05 5.76247702545953e-06 6.33629338552895e-06 7.08924325144033e-06 -1.67761919999581e-05 -1.60679169484991e-05 -1.48773193819304e-05 9.3426087471381e-06 9.89204762992462e-06 1.05618685503456e-05 -2.20137394655029e-05 -2.1320943411343e-05 -2.03326858879116e-05 1.64145699446217e-06 2.21808242240575e-06 2.95757899812691e-06 3.28066811910075e-05 3.32679822859718e-05 3.37010311440001e-05 -6.05772456161104e-06 -5.46936955254417e-06 -4.93991997546153e-06 2.42108973468909e-05 2.50266893539127e-05 2.59742627657025e-05 3.73979881034516e-05 3.78500686806748e-05 3.82709925715825e-05 4.39042028119618e-05 4.47667683271473e-05 4.54562337609889e-05 1.7340894051096e-05 1.76207011450668e-05 1.77091668778402e-05 2.52643576113497e-05 2.57718133264169e-05 2.63562931139282e-05 3.05008890803284e-05 3.09909078649789e-05 3.15317883449385e-05 -4.70784300725686e-06 -3.90436877320447e-06 -2.99568282046958e-06 0 0 0 1.80683971876364e-05 1.80449665782457e-05 1.80456983479951e-05 0.024789711565 0.00025621162565 9.09468818833333e-05 0.024789711565 0.00025621162565 9.09468818833333e-05 0.024789711565 0.00025621162565 9.09468818833333e-05 0.024789711565 0.00025621162565 9.09468818833333e-05 5.29799997806549e-06 5.29799997806549e-06 5.29799997806549e-06 3.69339990615845e-05 3.69339990615845e-05 3.69339990615845e-05 6.43900012969971e-05 6.43900012969971e-05 6.43900012969971e-05 3.30599999427795e-05 3.30599999427795e-05 3.30599999427795e-05 2.46299982070923e-05 2.46299982070923e-05 2.46299982070923e-05 <G0> -1099175.99998 -1099412.4773716 -1099771.1866594 -1146041.000162 -1146611.6476182 -1147938.5601222 -552790.00065054 -552397.64596393 -551571.07035226 -717024.00023652 -717244.44195785 -717679.66789818 -998974.99998001 -998115.07384519 -996287.53862559 -1047022.0003151 -1046840.8294166 -1046684.4334278 -453985.00080868 -452816.49654134 -450465.45064891 -625868.00044448 -625069.89938223 -623576.29640564 -386014.99998948 -386899.55522501 -388855.6969679 -527982.00178413 -527493.83708255 -526278.15287992 -586940.00066985 -587672.78039755 -589086.24152252 -34353.999832761 -34900.700576841 -36207.37497453 -8535.3605102398 -9906.1943288058 -12592.475843486 -131290.00076596 -131663.56530272 -132298.2564942 17729.00010995 17380.090133707 16559.535871506 16446.000207431 15626.385155535 13809.465864252 -157270.00090727 -157181.92300796 -156877.9321197 0 0 0 -237181.38483664 -237714.09160835 -238846.23234236 -394393 -396536.60110492 -400860.47406385 -50659 -52527.592734262 -56299.999726769 0 -1311.6093540837 -3962.5913312329 0 -2056.2422857245 -6197.1811918837 0 -6.4313916269379 -27.418626262101 -1129176 -1129750.8053174 -1130974.4968908 -2157149 -2158204.8298561 -2160460.5933456 -897013 -897534.29155164 -898656.19809258 -832227 -832627.45843186 -833500.39273009 # End of file |
The IPM text input file for GEM-IPM specific data is usually generated from GEM-Selektor package. The IPM file is complementary to the DCH file. The GEMS3K program reads this file after the DCH file and before any DBR file.
The file <TaskName>-ipm.dat contains additional data and numerical controls from the IPM (MULTI) data strucutre that are necessary for the GEM IPM3 algorithm but are not relevant for the mass transport part or enother upper-level code. As an option, the whole binary MULTI structure can be read from the <TaskName>.ipm binary file if the -b key is set at the beginning in the <TaskName>-dat.lst file.
The IPM text input file consists of eight sections, of which section (1) contains flags that affect memory allocation in the MULTI structure; section (2) contains dimensionalities for additional memory allocation for surface complexes (main dimensionalities of the chemical system are given in the DCH file); section (3) contains numerical controls and tolerances of the GEM IPM-3 kernel; section (4) defines the presence and the data for mixing models of multi-component phases and, in particular, the arrays of non-ideality parameters in TSolMod convention; sections (5) and (6) provide some complete data arrays that may be incomplete in DBR file(s); section (7) contains some initial data for phases; and, finally, section (8) contains initial data for sorption (surface complexation) phases, present if set so in section (2).
Sections (1) and (2) contain flags and dimensions needed for optional memory allocation, which must appear before the <END_DIM> tag. Any other data object field can appear after this tag in any order, and many data objects can be skipped. If the data object tag is not found in the input file, its elements will be assigned default values, if possible. It is recommended to place the input data in logical sections, as exported from the GEM-Selektor code.
For GEMS3K calculations in typical aquatic systems containing only ideal gas mixture and ideal solid solutions, the contents of IPM text input file can be really minimal, as exemplified below for the 'gemcalc' or 'node-gem' example input file.# File tp_test/CalcColumn-ipm.dat "CalcDolo CalcColumn 0000 0 1 25 0 " <PAalp> '+' <PSigm> '+' <END_DIM> # Numerical controls (non-default values) <pa_DK> 1e-07 # TSolMod data exchange section <sMod> 'DNNSNN' 'INNINN' <LsMod> 2 0 4 0 0 0 <PMc> 0 0 1 1 0 0 0 0 <LsMdc> 0 0 0 0 0 0 # Provisional bulk composition of the system <B> 0.0001001 1e-07 0.016 110.683696417673 0.008 55.3420685088366 0 |
The DBR text input file, read into the DATABR (node recipe) data structure, can either be exported from GEM-Selektor or prepared using a simple text editor. The GEMS3K program reads such files after the DCH and IPM files. The DATABR data structure comprises the interface ("data bridge recipe") for coupling mass transport and chemistry (see databr.h file).
The file <TaskName>-dbr-<node#>.dat contains parts of the chemical system definition that may be changed by the mass transport part (input data of GEM such as T, P, bulk composition, metastability constraints) or are returned after the GEM IPM calculation to be utilized by the mass transport part at the next time iteration.
The DBR text input file consists of several logical sections. Dimesions of all arrays in DATABR correspond to those given in Section 2 of DCH file, and the order of components and phases - to the index lists in Section (4) in the DCH file. Here, we will refer to tags from these two sections even though these tags are not present in the DBR file; it is assumed that the DATACH structure exists and is correctly filled out before any program operation with DBR files or DATABR structures.
The DBR text input file consists of six sections, of which section (1) contains the control flags for GEM IPM3 operation and data exchange; section (2) contains the chemical system scalar properties; section (3) contains the FMT scalar variables; section (4) contains the data for Independent Components; section (5) contains the data for Dependent Components; and, finally, section (6) contains the data for phases.
There is no <END_DIM> tag in the DBR file. After section (1), any data objects can appear in any order, and some data objects can be skipped. If the data object tag is not found in the input file, its elements will be assigned default values, if possible. When creating DBR files using a text editor, it is recommended to place the input data in logical sections as in DBR files exported from the GEM-Selektor code package.
For GEMS3K calculations in AIA mode, the DBR text files can be really minimal, as shown below for the 'gemcalc' example test input data.
# File: tp_test/CalcColumn-dbr-0-0002.dat <NodeStatusFMT> -1 <NodeStatusCH> 1 <TK> 298.15 <P> 100000 <bIC> 0.00035 0.00025 0.002 110.68369642 0.001 55.342818209 0 # End of file |
This section summarizes the syntax of free data stream input format used
in text DCH, IPM and DBR files readable and writable by the TNode class
subroutines. Details about the structure for each file are given
in the respective sections above, as well as in the example input data files located e.g. in the "standalone/gemcalc-build/tp_test" folder.
The file consists of one or more input data objects (fields) and
optional comment lines. A comment line begins with '#' or '$' or ':' character in
the first
position; by reading the file, anything after the comment line symbol will be ignored until
the end of line.
Data object field begins with a tag, which is an identifier in angular
brackets <>. The tag is followed by one or more values, depending
on the type and dimensions of the respective data object. The values
are space-,
tab-, or endline -separated; the numerical values can be given as
(signed) integer, floating-point, or with decimal exponent (e or E)
forms; the string values must be taken in quotes ' ' or " ", e.g.
'Quartz'.
An example of the data object field <bIC> with comment
lines before and after it is given below:
Data objects that define dimensionalities of other data objects
must always be provided at the beginning of the file, before the
reserved tag <END_DIM>,
or in another file which had been read before this file. In relation to
the above
example, the <nICb>
item has been provided in the companion DCH file, where it looks
like:
#
*** Number of Independent Components kept in the DATABR structure, nICb
<= nIC
<nICb>
7
To see which value in the <bIC>
vector corresponds to which Independent Component, check the <xic> index list and the <ICNL> name list in the
DCH file:
So, in this example, the <bIC> data object in the DBR file can be represented like this (the second line is a comment for readability):
After the <END_DIM>
tag (present in DCH and IPM files, but not in DBR files), other data
object items may
follow in any order, although it is recommended to keep them in logical
sections as arranged in the files exported from the GEM-Selektor code.
Some data objects can be skipped (the tag together with all
following values; part of values cannot be skipped). Many data object fields
after the <END_DIM>
tag in IPM and in the DBR file are not mandatory; when
skipped, the default values will be set in the program memory upon reading the file. However,
if some optional dimensions are set (e.g. <Lads> before the <END_DIM> tag in the
IPM file) then the data objects connected to it must also be
provided in the rest of the file.
The possibility to skip data objects with default values can make the input data files really compact (see Sections 2.1, 2.2 and 2.3 and compare with the files in the "standalone/gemcalc-build/tp_test" folder).
Please remember that the DCH and IPM files are read
only once per GEMS3K session, and any number of DBR files (for
nodes) can be provided and read in a sequence (for the whole node array
at the TNodeArray level). These DBR files normally have different
bulk
compositions (<bIC>) and <NodeHandle> values. If the
DCH file
contains look-up arrays for thermodynamic data, also <TK> and
<P> values in DBR files can vary from node to node.
A-B | C | D | E-F | G-H | I-K | L-M | N-O | P (4
tables) |
Q-S | T-W | X-Z |
Tag
in GEMS3K |
GEMS label | Dimensions |
Description |
Input
file |
<A> |
A |
nDC*nIC |
Stoichiometry
matrix A for
Dependent Components. Contains expansions of their chemical
formulae
(visible in DComp or ReacDC records in GEMS database). The matrix has
nDC rows and nIC columns. Each column corresponds to an Independent
Component (the order is given in the <ICNL> list); each row
- to a Dependent Component (the order is in the <DCNL> list).
Numbers in a row tell how many moles of each IC are contained in 1 mol
of a DC to which
this row belongs. In aquatic systems, the last column of this matrix
contains the formula charge for an ion, complex, or ligand. |
DCH (8) |
<A0> |
f0 |
nDC*nPp *nTp |
Optional look-up array for Helmholtz energy of DC (J/mol), reserved. This array has a 3-D organization, which is a sequence of 2D tables, each corresponding to one DC.Tables for DCs follow in the same order as the names in the <DCNL> list. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the DC table corresponds to a certain value of pressure from the <Pval> vector. Data in the row refer to this pressure and to temperatures in a sequence defined in the <Tval> vector. | DCH (9) |
<Aalp>
|
Aalp |
nPH |
Full
vector of specific
surface areas of phases (m2/g). Default value: 0 m2/g.
Part or
all values may be also set up in the DBR file(s). |
IPM (7) |
<aPH> |
Aalp |
nPHb |
Specific
surface areas of
phases (m2/kg) - GEM input. Number of elements:
<nPHb>;
order of
phases is defined in <xph> index list in the DCH file.
This vector should be provided only if the <fAalp> = 1 in
the DCH file, otherwise the data will be ignored. Default values: 0
m2/kg. |
DBR (6) |
<al> |
1 |
Specific longitudinal dispersivity of porous media (m). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<at> |
1 |
Specific transversal dispersivity of porous media (m). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<av> |
1 |
Specific vertical dispersivity of porous media (m). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<B> | b |
nIC | Full
total bulk composition of
the initial system (vector b) (moles). Important when some ICs are skipped from <xic> index list and cannot be given amounts in the DBR file. |
IPM (5) |
<bIC> | b |
nICb | Bulk composition of (reactive part of) the system - main GEM input (amounts of IC in moles). This vector has <nICb> elements; order of IC: defined in the <xic> index list. All numbers in <bIC> must be positive, between 1e-14 and 9.9999e+5 mol, except the last number (for the charge balance) which is usually set to zero. This vector is the main input of GEM IPM. Inconsistent data in <bIC> may cause bad convergence or failure of the GEM IPM calculation. This vector must always be provided in DBR input files. | DBR (4) |
<bPS> | bXa |
nPSb* nICb |
Bulk
elemental compositions of
multicomponent phases (moles) - GEM output. Order of phases ( <nPSb> rows): defined in <xph> index list in the DATACH file/structure; order of ICs ( <nICb> columns): defined in the <xic> index list in DATACH. The whole row of zeros means that the respective phase is not present in the equilibrium state.This GEM output table is important for the mass transport part because it contains the bulk composition of fluid phase(s) changed after equilibration in the node. |
DBR (6) |
<bSP> |
bXs |
nICb | Bulk composition of the equilibrium solid part of the system, moles - GEM output. This vector has <nICb> elements. Order of ICs is defined in the <xic> index list in DATACH. | DBR (6) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<C1> |
capA |
nPS*6 |
Inner
capacitance density
parameter C1 (F/m2) (used in electrostatic surface
complexation
models TLM,
BSM, CCM). All rows related to aqueous and/or gas phases must be
filled with zeros. The row for any sorption phase contains six C1
values for six surface types. For unused surface types, C1 values will
be ignored and can be set to zero. |
IPM (8) |
<C2> |
capB |
nPS*6 | Outer capacitance density parameter C2 (F/m2) (used in TLM, 3LM electrostatic surface complexation models). All rows related to aqueous and/or gas phases must be filled with zeros. The row for any sorption phase contains six C2 values for six surface types. For unused surface types, set C2 = 0.0. | IPM (8) |
<C3> |
capF |
nPS*6 | Third
capacitance density
parameter C3 (F/m2) (to be used in Charge Distribution three-layer model CD 3LM for
anions),
reserved
for
future implementations of surface complexation models. Must be filled
with zeros. |
IPM (8) |
<ccDC> |
DCC |
nDC |
Type
codes of Dependent Components:
'S' - aqueous solute; 'T' - aqueous H+ ion; 'W' -
water-solvent; 'G' - component of the gas mixture or fluid; 'I' -
component of ideal non-electrolyte solution; 'M' - major component of
(solid) colution; 'J' - minor component of solid solution; 'Q' -
sorbent in the sorption phase; 'X' - neutral OH surface species; 'Y' -
inner-sphere surface complex; 'Z' - outer-sphere surface complex; 'O' -
component of the pure
condensed phase (liquid or solid). DC type codes are used in the GEM
IPM algorithm for selecting equations for chemical potentials,
scaling factors, etc. |
DCH (6) |
<ccIC> |
nIC |
Codes
of Independent Components: 'e'
- chemical element; 'h' - hydrogen; 'o' -
oxygen, 'z' -
electric charge; 'a' - additional ligand (used in GEM IPM calculations). |
DCH (5) |
|
<ccPH> |
nPH |
Phase
aggregate state codes: 'a' -
aqueous electrolyte; 'g' - gas mixture; 'f' - non-ideal
fluid; 's' - solid; 'l' - liquid non-electrolyte; 'm' - silicate
melt; 'x' - sorption phase. These codes are used in
GEM IPM for the selection of mixing models, scaling factors etc. The
order of codes in <ccPH> list must correspond to that in the
<PHNL> list. |
DCH (7) |
|
<Cp0> |
nDC*nPp *nTp |
Optional lookup array for DC heat capacity function (J/K/mol). This array has a 3-D organization which is a sequence of 2D tables, each corresponding to one DC. Tables for DCs follow in the same order as the names in the <DCNL> list. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the DC table corresponds to a certain value of pressure from the <Pval> vector. Data in the row refer to this pressure and to temperatures in a sequence defined in the <Tval> vector. | DCH (9) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<DCads> |
DCC3 |
Lads |
Classifier
of DCs involved in sorption
phases. Possible codes: X - surface OH group (site); Y -
inner-sphere surface complex; Z - outer-sphere surface complex; P -
component of the sorbent (solid solution); Q - main component of the
sorbent. |
IPM (8) |
<DCmm> |
nDC |
Molar
masses of Dependent
Components (kg/mol)
used in calculation of mass concentrations or masses of phases. If
skipped from the DCH file, this vector will be restored
automatically from the input <A> and <ICmm> data objects |
DCH (6) |
|
<DCNL> |
DCnam |
nDC |
Name list of Dependent Components (up to 16 characters per name). Names can contain Latin letters, digits, @, -, +, =, _ symbols; spaces are not allowed. Data in all other data arrays for DC in DATACH/IPM structures must follow the same order as the DC names in this list.In turn, Names in the DCNL list must be arranged according to the order of phases to which the DCs belong, i.e. aqueous species first, then water-solvent, then gases (if any), then condensed solutions end-members, then components of sorption phases, and then components of pure phases. | DCH (6) |
<DD> |
nDCs*nPp*nTp |
Lookup array for diffusion coefficients of
DCs (reserved). |
DCH (9) |
|
<denW> |
RoW[][0] |
5*nPp*nTp |
Look-up array for the density of water-solvent (kg/m3), required if the aqueous electrolyte phase is included in chemical system definition. In the general case, this array consists of five 2D tables, arranged in the following order: values of density rho; its derivative on temperature, d(rho)/dT; its second derivative on temperature, d2(rho)/dT2; its derivative on pressure, d(rho)/dP; its second derivative on pressure d2(rho)/dP2. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the table corresponds to a certain value of pressure from the <Pval> vector and to temperatures in a sequence defined in the <Tval> vector. | DCH (9) |
<denWg> | RoW[][1] |
5*nPp*nTp | Optional look-up array for the density of water vapour (kg/m3), used if the aqueous electrolyte phase or H2O,gas is included in the chemical system definition. This array has the same structure as <denW> array | DCH (9) |
<Dif> |
1 |
General diffusivity of disolved matter in the node (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<DLL>
|
dll |
nDC |
Full
vector of lower
metastability constraints on DC amounts <xDC> in the system
(moles). Can be entered here because this data may be provided
incomplete in
DBR files if not all DCs were selected to be kept there. Default: 0 (moles) |
IPM (6) |
<dll> |
dll |
nDCb |
Lower
metastability
constraints on amounts of DCs (moles)
- GEM input .
Order of
elements is defined in the <xdc> index list
in the DCH file. Trivial (default) value: 0 moles. This
input vector allows the simulation of various kinetic controls, e.g.
dissolution kinetics, as function of time and solution composition. In
this case, great care should be taken to ensure consistent values of
these constraints; inconsistent (too large) values may cause the
program crash or convergence failure. |
DBR (5) |
<DUL> |
dul |
nDC |
Full
vector of upper
metastability constraints on DC amounts <xDC> in the system
(moles). Can be entered here because this data may be provided
incomplete in
DBR files if not all DCs were selected to be kept there. Default: 1e6
(moles) |
IPM (6) |
<dul> |
dul |
nDCb |
Upper
metastability
constraints on amounts of DCs (moles) - GEM input. Order of
elements is defined in the <xdc> index list
in DATACH file/structure. Trivial (default) value: 1.0e+06 moles.This
input vector allows the simulation of various kinetic controls, e.g.
precipitation kinetics, as function of time and solution composition. |
DBR (5) |
<DMc> |
dmc |
LsMdc[k] |
Collected parameters per phase component for the non-ideal mixing models. Number of parameters per component used by k-th phase model is given in <LsMdc>[k]. Provide necessary numbers if at least one element in <LsMdc> is not zero. Total number of parameters per phase in <DMc> is <LsMdc>[k] times the number of Dependent Components included in the phase. Total number of "rows" in <DMc> is <nDCs> (see DCH file). The tables for phase components are all collected in the <DMc> object row-by-row. See gems3k_tsolmod.html file for detail. | IPM (4) |
<dt> |
1 |
Actual time step (s). Passed into the TNode class, stored in DATABR structures and DBR files. Default value is 0.0. | DBR (2) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<Eh> |
Eh |
1 |
Eh
of aqueous solution, in V - GEM
output |
DBR (2) |
<END_DIM> |
Tag
keyword indicating the end
of header section with compulsory array dimensions or setup flags.
Used
in DCH and IPM files. Upon reading these files, when GEMS3K
program encounters this keyword, it allocates the memory for
dynamic data in DATACH, DATABR and IPM (MULTI) structures. Any missing
or wrong dimension will be detected at this stage. Input of any
subsequent data will assume the number of elements as defined before
<END_DIM> in DCH or IPM files. |
|||
<eps> |
1 |
Effective (actual) porosity normalized to 1. Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<epsW> |
EpsW[][0] |
5*nPp *nTp |
Lookup array for the dielectric constant of water-solvent (dimensionless), required if the aqueous electrolyte phase is included in chemical system definition. In the general case, this array consists of five 2D tables, arranged in the following order: values of density eps; its derivative on temperature, d(eps)/dT; its second derivative on temperature, d2(eps)/dT2; its derivative on pressure, d(eps)/dP; its second derivative on pressure d2(eps)/dP2. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the table corresponds to a certain value of pressure from the <Pval> vector and to temperatures in a sequence defined in the <Tval> vector. | DCH (9) |
<epsWg> | EpsW[][1] |
5*nPp *nTp |
Optional lookup array for the dielectric constant of water vapour, used if the aqueous electrolyte phase or H2O,gas is included in the chemical system definition. This array has the same structure as the <epsW> array | DCH (9) |
<fAalp> | 1 |
Flag for keeping specific surface areas of phases in DBR files and DATABR structure (1) or ignoring them (0) | DCH (3) |
|
<fDQF> |
fDQF |
nDC | DQF parameters of end members or pure gas fugacities, in J/mol/(RT). One number per Dependent component, default value 0. |
IPM (5) |
<FIa> | 1 |
Number of sorption phases included in this system (0 if no sorption phases are included). This item cannot be skipped from the IPM file. | IPM (2) |
|
<FIat> | 1 |
Maximum number of surface types per adsorption phase (if FIa > 0, FIat must be set to default value of 6). | IPM (2) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<gam> | gamma | nDCb | Activity coefficients of DCs in their respective phases - GEM output. This vector is also required as input at <NodeStatusCH> = 5 when the old GEM solution is used as an initial approximation in SIA mode. Number of elements: <nDCb>; order of DC is defined in the <xdc> index list in the DCH file. Trivial (default) value: 1.0. Activity coefficient multiplied by species concentration in the respective phase yields the primal activity of this chemical species. | DBR (5) |
<G0> | g0 (norm) |
nDC*nPp *nTp |
Obligatory
lookup array for DC
molar Gibbs energy function g(T,P) (J/mol). This array has a 3-D organization which is a sequence of 2D tables, each corresponding to one DC. Tables for DCs follow in the same order as the names in the <DCNL> list. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the DC table corresponds to a certain value of pressure from the <Pval> vector. Data in the row refer to this pressure and to temperatures in a sequence defined in the <Tval> vector. |
DCH (9) |
<Gs> | GX | 1 | Total Gibbs energy of the reactive subsystem (J/RT) (normalized) - GEM output | DBR (2) |
<h> |
1 |
Actual hydraulic head (hydraulic potential) (m). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<H0> |
h0 (norm) |
nDC*nPp *nTp |
Optional lookup array for DC molar enthalpy h(T,P) (J/mol). This array has a 3-D organization which is a sequence of 2D tables, each corresponding to one DC. Tables for DCs follow in the same order as the names in the <DCNL> list. Each table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> values. Each row in the DC table corresponds to a certain value of pressure from the <Pval> vector. Data in the row refer to this pressure and to temperatures in a sequence defined in the <Tval> vector. | DCH (9) |
<Hi> |
1 |
Total
enthalpy of inert
subsystem (J) (reserved for future use) |
DBR (2) |
|
<hDl> |
1 |
Hydraulic longitudinal dispersivity (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<hDt> |
1 |
Hydraulic transversal dispersivity (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<hDv> |
1 |
Hydraulic vertical dispersivity (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<Hs> |
1 |
Total
enthalpy of reactive
subsystem (J) (reserved) |
DBR (2) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<ICmm> |
nIC |
Atomic
(molar) masses of
Independent Components (kg/mol) |
DCH (5) |
|
<ICNL> |
ICnam |
nIC |
Name
list of Independent Components (up to
4 characters per name). Name must begin with
a capital
letter and contain no digits or other special characters except _
(underscore). 'Zz' is a special name for the electric charge IC which
must be the last one in the list. It is desirable that the names in the
ICNL list are alphabetically sorted. Data in all other arrays of
chemical system
definition that involve ICs must follow the order given in this name
list. |
DCH (5) |
<iGrd> |
1 |
Flag for selection
of Diffusition coefficients
lookup array (reserved). |
DCH (3) |
|
<IPxPH> |
IPxPM |
Sum of (LsMod[k][0]* LsMod[k][1]) over nPS |
Collected array of indexation tables for interaction parameters of non-ideal solutions. Number of parameters used by k-th phase model is given in LsMod[k][0] and the maximum order (number of components involved in the interaction) is given in LsMod[k][1]. Elements of <IPxPH> contain indexes (within each phase) of components or moieties that are involved in each interaction. If the order of the interaction is less than LsMod[k][1], the remaining elements in the IPxPH row should be filled with -1 (in the Pitzer model, the last element in the row indicates the type of interaction coefficient). The respective values of interaction parameter coefficients should be provided in the <PMc> array k-th block. See gems3k_tsolmod.html file for detail. | IPM (4) |
<IterDone> |
1 |
Number
of iterations performed
by GEM IPM in the last run. Output: here GEM IPM returns how
many iterations were done
during the last actual calculation invoked by codes 1 or 5 in
<NodeStatusCH> field. This data object is not used for GEM
input. |
DBR (1) |
|
<IS> |
IS |
1 |
Effective
aqueous ionic
strength (molal) - GEM output |
DBR (2) |
<Kf> | 1 |
Actual Darcy's constant (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<Km> | 1 |
Actual permeability (m2). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<Lads> |
1 |
Total
number of Dependent
Components in sorption phases included into this system. If Lads
> 0
and FIa > 0 then the data section (7) must be provided at the end of
IPM file. This item cannot be skipped from the IPM file. |
IPM (2) |
|
<lnGmf> |
lngmf |
nDC |
Natural
logarithms of DC
"fictive activity coefficients" to be used for correcting g0(T,P) values before
simplex() initial approximation. Default value: 0 for
all
components
except minor 'J' end members and surface complexes, for which the
default is ln(<pa_GAH>) = 6.907755375. |
IPM (5) |
<LsMdc> |
Lsmdc |
nPS*3 |
Dimensions of <DMc> and <MoiSN> tables - three per multicomponent phase, i.e. <LsMdc> array has <nPS> rows and 3 colums. In each row: the first number is the number of parameters/coefficients per component in the respective block of the <DMc> array, which usually depends on the mixing model code in <sMod>. If at least one element in <LsMdc> is not zero then the <DMc> vector must be provided after this data object. The second and third numbers are zeros or, for multi-site mixing phase models: the second number is the number of sublattices (site types), the third number is total number of moieties acting on all sublattice sites (moieties having the same formula, but acting on different sites, are considered as different moieties!). See gems3k_tsolmod.html file for detail. | IPM (4) |
<LsMod> |
Lsmod |
nPS*3 |
Dimensions of <IPxPH> and <PMc> arrays - three per multicomponent phase, i.e. the <LsMod> array has <nPS> rows (see DCH file) and 3 columns. In each row, the first number is the number of parameters of non-ideal mixing model per this multicomponent phase (i.e. number of rows in the respective blocks of <IPxPH> and <PMc> arrays). The second number is the number of columns in the respective block of the <IPxPH> array, i.e. the maximum order of interaction parameter; the third number is the number of columns in the respective block of the <PMc> array, i.e. the number of P,T coefficients per interaction parameter. If at least one element in <LsMod> is not zero then the <IPxPH> and/or <PMc> arrays must be provided hereafter. See gems3k_tsolmod.html file for detail. | IPM (4) |
<MASDJ> | masdj |
Lads*6 |
Parameters
of surface species
in surface complexation models: has rows corresponding to DCs
starting fom the first DC in the first sorption phase. In each row:
column [0] - max site density in mkmol/(g
sorbent); column
[1] - species charge allocated to 0 plane; column [2] - surface
species charge allocated to beta -or third plane; column [3] - Frumkin
interaction parameter; column [4] species denticity or coordination
number; column [5] - reserved parameter (e.g. species charge on
3rd EIL plane). |
IPM (8) |
<MASDT> | masdt |
nPS*6 |
Total
maximum site
density per surface type (mkmol/g) (maximum 6 surface types can
be
considered per one sorption phase). Used in SACT corrections for
competitive adsorption; for all species involved in such competition
for sites of the given type on a surface type, the same value as
here must be set in column [0] of the MASDJ table. All unused elements
of MASDT must be set to 0 (e.g. in rows for aqueous and/or gas
phases). |
IPM (8) |
<Mi> | 1 |
Mass of inert subsystem (kg) (used only in the mass transport part and stored here on the TNodeArray level). Default value 0.0. | DBR (1) |
|
<mLook> |
1 |
Flag that controls interpolation of look-up arrays of thermodynamic data.
If set to 0 (default), the interpolation will be performed whenever
necessary, over look-up arrays organized as desscribed e.g. for G0.
If this flag is set to 1 then interpolation is disabled and the look-up
arrays are organized one value per P,T pair as given in Pval and TKval
vectors that now have the same length nPp. Accordingly, for each
Dependent Component, not nTp*nPp but only nPp values are given in
look-up arrays, each corresponding to a P,T pair. In DBR files, only
one of such P,T pairs can be used to set pressure and temperature
(within tolarances Ptol and Ttol), otherwise GEM IPM calculations
cannot be performed. |
||
<MoiSN> |
MoiSN |
Sum of (LsMdc[k][1]* LsMdc[k][2]) over nPS |
Collected end member moiety - site multiplicity number arrays for multi-site mixing models.
This input array has total length of sum(of
nDCinPH[k]*LsMdc[k][1]*LsMdc[k][2] elements) over <nPS>. The
arays are stored in the same order as phase names in DCH file,
for each phase, nDCinPH[k] tables each having LsMdc[k][1]*LsMdc[k][2] occupancy numbers
per end member. Upon GEM IPM run, the table for each phase is
transferred to a TSolMod library function that calculates activity
coefficients of phase species. |
IPM (4) |
<Ms> | Mbx | 1 |
Mass of reactive subsystem (kg) - GEM output. Will be automatically calculated from the input bulk composition vector <bIC> using the <ICmm> vector. Dividing <Ms> by <Vs> gives the mean density of the reactive part in kg/m3. | DBR (1) |
<mPS> | phM | nPSb | Masses of multicomponent phases (kg) - GEM output. Number of elements: <nPSb>; order of phases: defined in the <xph> index list in the DCH file.The density of a multicomponent phase can be obtained as <mPS>/<vPS> in kg/m3. | DBR (6) |
Tag
in GEMS3K |
Label
GEMS |
Dimen- sions |
Description |
Input
File |
<nDCinPH> |
L1 |
nPH |
This vector tells how many Dependent Components is included in each phase. Consists of non-zero integer elements, ordered as described for the PHNL list. The sum of all elements in this vector must exactly equal nDC, and the sum of all elements exceeding 1 must equal to nDCs. Wrong data in this vector will certianly cause the program crash or lead to meaningless results. See also gems3k_tsolmod.html file. | DCH (7) |
<nDC> |
L_[0] |
1 |
Total
number of Dependent
Components (chemical species made of independent components) in the
chemical system definition (DATACH
structure and DCH file) |
DCH (1) |
<nDCb> |
1 |
Number
of Dependent Components
kept in the DBR file and DATABR memory structure; nDCb <= nDC |
DCH (2) |
|
<nDCs> |
L_[1] |
1 |
Number
of Dependent Components
in phases-solutions (multicomponent phases) in the chemical system
definition (DATACH structure and DCH file), nDCs <= nDC |
DCH (1) |
<Nfsp>
|
nfsp |
nPS*6 |
Fractions
of the sorbent
specific surface area allocated to surface types. Up to 6
surface
types can be defined and will be considered reactive if the respective
nfsp element value is greater than zero. Reactive
surface types should be set up consecutively beginning from index 0
(i.e. non-reactive surface types to be left at the end). The sum of
fractions for the
sorption phase is not necessarily equal to 1.0. The rows for
aqueous/gas phases should be filled with zeros (ignored). |
IPM (8) |
<nIC> |
N_ |
1 |
Number of Independent Components (stoichiometry units, usually chemical elements and charge) in the chemical system definition (DATACH structure and DCH file) | DCH (1) |
<nICb> |
1 |
Number
of Independent
Components kept in the DBR file and DATABR memory structure,
nICb <=
nIC |
DCH (2) |
|
<nPH> |
Fi_[0] |
1 |
Number of phases (into which Dependent Components are grouped) in the chemical system definition (DATACH structure and DCH file) | DCH (1) |
<nPHb> |
1 |
Number
of Phases to be kept in
the DBR file and DATABR structure, nPHb <= nPH |
DCH (2) |
|
<nPp> |
1 |
Number
of pressure grid points
in interpolation look-up arrays, 1 or more |
DCH (3) |
|
<nPS> |
Fi_[1] |
1 |
Number
of phases-solutions
(multicomponent phases) in the chemical system definition (DATACH
structure and DCH file), nPS <= nPH |
DCH (1) |
<nPSb> |
1 |
Number of phases-solutions (multicomponent phases) to be handled in the DBR file and DATABR memory structure, nPSb <= nPHb | DCH (2) |
|
<nTp> |
1 |
Number
of temperature grid
points in interpolation lookup arrays, 1 or more (should be equal to <nPp> if <mLook> is set to 1) |
DCH (3) |
|
<nto> |
1 |
Tortuosity factor (dimensionless). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<NodeHandle> |
1 |
Node
identification handle, not used in
calculaions on TNode level. In TNodeArray, the node
absolute index should be kept here. Used in diagnostic and output
files. Default value: 0. |
DBR (1) |
|
<NodeStatusCH> |
1 |
Node
status code in GEM (input
and output); see typedef NODECODECH in the DATABR.H. This code
sets the
mode of operation of GEMIPM and returns how GEM has converged (at GEM
output). |
DBR (1) |
|
<NodeStatusFMT> |
1 |
Node
status code in FMT part, not used on
TNode level. In TNodeArray, one of the codes given in
typedef NODECODEFMT in DATABR.H must be given here. Default value: 1. |
DBR (1) |
|
<NodeTypeHY> |
1 |
Node
type code (hydraulic), not used on
TNode level. In TNodeArray, one of the codes given in
typedef NODETYPE in DATABR.H must be given here. Default value: 0. |
DBR (1) |
|
<NodeTypeMT> |
1 |
Node
type (mass transport), not used on
TNode level. In TNodeArray, one of the codes given in
typedef NODETYPE in DATABR.H must be given here. Default value: 0. |
DBR (1) |
More comments for <NodeStatusCH>:
If GEMIPM calculation is called
when in the DATABR structure
this code is set to 1 then the simplex automatic initial approximation
will be used. This results in a larger number of GEM IPM iterations
(typically between 20 and 100) but guarantees that the correct stable
phase assemblage will be found. Alternatively, setting the code to 5
causes GEM IPM to use the available GEM solution (vectors 'xDC' and
'gam' in this file) as the initial approximation. This may dramatically
reduce the number of iterations (typically to 1 - 5) but does not
guarantee that the possible appearance of a new phase (e.g. upon change
of T or bulk composition) will be detected. The normal return codes for
both modes are, respectively, 2 and 6. It is advisable for the FMT
program part to check these codes in this field before continuing
because any other code value except 1,2 and 5,6 signals an error in GEM
calculation (see NODECODECH in DATABR.H for details). Please, note
that, if the return code 2 or 6 is left unchanged in the DATABR
structure and GEM calculation is called then nothing will be done and
the control will be returned with the code unchanged. A brief list of
NodeStatuCH codes is given below.
Code |
Mnemonic
name |
Description |
1 |
NEED_GEM_AIA | Need GEM calculation with simplex (automatic) initial approximation (IA) |
2 |
OK_GEM_AIA | OK after GEM calculation with simplex (automatic) IA |
3 |
BAD_GEM_AIA | Bad (not fully trustful) result after GEM calculation with simplex (automatic) IA |
4 |
ERR_GEM_AIA | Failure (no result) in GEM calculation with simplex (automatic) IA |
5 |
NEED_GEM_SIA | Need GEM calculation with no-simplex (smart) IA |
6 |
OK_GEM_SIA | OK after GEM calculation with no-simplex (smart) IA |
7 |
BAD_GEM_SIA | Bad (not fully trustful) result after GEM calculation with no-simplex (smart) IA |
8 |
ERR_GEM_SIA | Failure (no result) in GEM calculation with no-simplex (smart) IA |
9 |
T_ERROR_GEM | Terminal error has occurred in GEMS3K (e.g. memory corruption). Restart is required. |
Tag
in GEMS3K |
Label GEMS |
Dimensions |
Description |
Input
File |
<P> |
PG[1] or PG[2] |
1 |
Node
Pressure P (Pa) GEM
input. This value must always be provided. If this value
differs by
more than <Ptol> bar from the pressure value used in previous GEM
calculation, the GEMS3K program will attempt to interpolate
thermodynamic data (if interpolation grid arrays were provided in DCH). If
a given P value goes outside of the
interpolation interval then calculations will stop and NodeStatusCH
will be set to ERR_GEM_AIA or
ERR_GEM_SIA. |
DBR (2) |
<pa_AG> |
Pa_AG |
1 |
Smoothing
parameter for
non-ideal increments to primal chemical
potentials between
IPM
descent iterations. Possible values: from 1.0 to 0.1 (or -1.0 to -0.1). For ideal
systems, 1.0
(default) is
recommended. Too high or to low values may cause
non-convergence of GEM IPM in highly non-ideal systems. For alternative
smoothing functions, Pa_AG should usually be set to 1.0 (or
-1.0). If set less than 1.0 then the smoothing will effectively begin
after
several IPM iterations. More in gems_ipm.html. |
IPM (3) |
<pa_DB> |
Pa_DB |
1 |
Minimum
amount of Independent
Component in the bulk system composition (except charge "Zz") (moles). May
be set in the interval 1e-20 < DB < 1e-7.
Default value:
1e-17. More in gems_ipm.html. |
IPM (3) |
<pa_DcMin> |
Pa_XMI[2] |
1 |
Cutoff mole amount for elimination of solution- or surface species (default value 1e-33) | IPM (3) |
<pa_DF> |
Pa_DF[0] |
1 |
Tolerance
for the application
of the phase stability criterion for a lost phase to be inserted to mass balance (diagnostic
criterion
for determining which phases are stable (|f_a| <= DF) and which are
not (|f_a| > DF). Used in the PhaseSelektion() procedures for
checking
the stable phase assemblage and inserting stable phases absent from the
mass balance. Inserted amounts will be taken from
<pa_DFYs>. Default is 0.01. More in gems_ipm.html. |
IPM (3) |
<pa_DFM> |
Pa_DF[1] |
1 |
Threshold
for the phase stability
criterion for a phase to be eliminated from the mass balance
in PhaseSelection()
procedures. If any (pure) phase with f_a < -DFM is
detected then all its components will be removed (zeroed off) from the
speciation and phase amounts vectors, and IPM run will be repeated
using the corrected speciation as initial
approximation. Default value is 0.01.
More in gems_ipm.html. |
IPM (3) |
<pa_DFYw> |
Pa_DFY[0] |
1 |
Insertion
mole amount for
water-solvent, used
after the simplex() initial approximation in EnterFeasibleDomain()
(default value 1e-5) |
IPM (3) |
<pa_DFYaq> |
Pa_DFY[1] | 1 |
Insertion
mole amount for
aqueous species, used
after the simplex() initial approximation in EnterFeasibleDomain()
(default 1e-5) |
IPM (3) |
<pa_DFYid> |
Pa_DFY[2] | 1 |
Insertion
mole amount for
ideal solution components, used
after the simplex() initial approximation in EnterFeasibleDomain()
(default 1e-5) |
IPM (3) |
<pa_DFYr> |
Pa_DFY[3] | 1 |
Insertion
mole amount for
major solution components, used
after the simplex() initial approximation in
EnterFeasibleDomain() (default 1e-5) |
IPM (3) |
<pa_DFYh>
|
Pa_DFY[4] | 1 |
Insertion
mole amount for
minor solution components, used
after the simplex() initial approximation in EnterFeasibleDomain()
(default 1e-5) |
IPM (3) |
<pa_DFYc> |
Pa_DFY[5] | 1 |
Insertion mole amount for single-component phase, used after the simplex() initial approximation in EnterFeasibleDomain() (default 1e-5) | IPM (3) |
<pa_DFYs> |
Pa_DFY[6] |
1 |
Insertion
mole amount used in
PhaseSelect() for a condensed phase component (default value is
1e-6) |
IPM (3) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<pa_DHB> |
Pa_DHB |
1 |
Maximum
allowed relative mass balance
residual for Independent Components (may be set in
the
interval 1e-16 < DHB < 1e-10). Default value: 1e-13. More in gems_ipm.html. |
IPM (3) |
<pa_DG> |
Pa_DG |
1 |
Total number of moles used in internal re-scaling of the GEM task system. Default value: 1000 moles of total IC amount in bulk composition vector <bIC>. Possible values: 0.001 to 10000 moles. Note that default values of other numerical controls were tuned to the default value of <pa_DG> = 1000. If this value is changed, many settings may need to be re-adjusted to achieve optimal convergence and precision of GEM IPM-3 algorithm.More in gems_ipm.html. | IPM (3) |
<pa_DGC> |
Pa_DGC |
1 |
Exponent in the sigmoidal smoothing function, or minimal smoothing factor in new functions. Possible values: 0 (smoothing is disabled if also Pa_AG is set to 1); from 0.01 to 0.1 to enable smoothing. Default value: 0. To invoke new smoothing functions, just invert the sign of Pa_AG to negative. For surface complexation models, only the old smoothing function with Pa_AG = 0.7 and Pa_DGC = 0.07 must be used. More in gems_ipm.html. | IPM (3) |
<pa_DK> |
Pa_DK |
1 |
IPM-2 convergence threshold for the Dikin criterion (may be set in the interval 1e-8 < DK < 1e-3, the default value of 1e-6 is recommended). Setting too low DK < 1e-7 may dramatically increase the number of IPM iterations, slowing the convergence down. Too large DK value may result in an inconsistent GEM IPM solution. More in gems_ipm.html. | IPM (3) |
<pa_DKIN> |
Pa_DKI |
1 |
Tolerance
on the amount of DC
with two-side metastability constraints if set equal in
<DLL>, <DUL> arrays (in moles). Default value is 1e-10. More
in gems_ipm.html file. |
IPM (3) |
<pa_DNS> |
Pa_DNS |
1 |
Standard
surface density
(nm-2) for calculating activity of surface species (do not
change
unless a different standard value is used in the supplied thermodynamic
database). Default is 12.05 nm-2. |
IPM (3) |
<pa_DP> |
Pa_DPV[0] |
1 |
Maximum allowed number of iterations in the MassBalanceRefinement MBR() procedure (can be set between 10 and 200). Default value: 130. If the MBR() procedure has not converged in DP iterations, this usually means that chemical system definition (CSD) is incorrect, or there are errors in DC stoichiometry. More in gems_ipm.html. | IPM (3) |
<pa_DS> |
Pa_DS |
1 |
Cutoff
minimum mole amount of
stable Phase present in the IPM primal
solution. Default value is 1e-20. Elimination of a phase
means
that amounts of all its components in the speciation vector (primal solution)
will be set to zero, and calculation of activity coefficients skipped on
remaining GEM iterations. Setting DS > 1e-10 may significantly
affect the mass balance residuals and cause MBR() errors. |
IPM (3) |
<pa_DT> |
Pa_DPV[2] |
1 |
Mode for applying tolerances to mass balance residuals in MBR() procedure.
If this setting is 0 (default) then the MBR() procedure will try to
satisfy relative tolerances for all ICs mass balance residuals as set
in <Pa_DHB> regardless of IC amounts in the b vector. If this
setting is +1 or -1 then <Pa_DHB> value will be interpreted as
relative or absolute tolerance for the residuals; MBR() iterations will
continue if at least for one ICs (except charge 'Zz'), the residual
exceeds Pa_DHB or exceeds bi*Pa_DHB. Using this mode leads to better MB
precision for major elements such as H, O, Si, Ca, Mg etc. in aquatic
and rock systems. More in gems_ipm.html file. |
IPM (3) |
<pa_DW> |
Pa_DPV[1] |
1 |
Activate (1) or disable (0) error condition on maximum number of MBR() iterations <Pa_DP>. Default: 0. If activated, when MBR() iterations have exceed <Pa_DP>, the GEM IPM3 will stop with an error message E04IPM. |
IPM (3) |
<pa_EPS> |
Pa_EPS[0] |
1 |
Precision
criterion of the
simplex() procedure to obtain the automatic initial approximation
(may
be set in the interval 1e-14 < EPS < 1e-6). Default value: 1e-10.
More in gems_ipm.html file. |
IPM (3) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<pa_GAR> |
Pa_GAN[0] |
1 |
Initial activity coefficient value for major (M) species in a solution phase before Simplex() approximation. Default value 1. Used only at LP simplex step in AIA mode. More in gems_ipm.html file. | IPM (3) |
<pa_GAH> |
Pa_GAN[1] |
1 |
Initial activity coefficient value for minor (J) species in a solution phase before Simplex() approximation. Default value 1000. Used only at LP simplex step in AIA mode. More in gems_ipm.html file. | IPM (3) |
<pa_GAS> |
Pa_GAN[2] |
1 |
Threshold for primal-dual normalized chemical potential difference used in Speciation Cleanup (default value: 0.001). In
all multi-component phases present in the primal solution in positive
amounts, the Speciation Cleanup procedure compares the amounts of DCs
in the primal solution vector xDC with their amounts restored using the
dual solution vector uIC and DC chemical formula from A matrix. The DC
amount is corrected to the restored one, if |<Pa_GAS>| is
exceeded for this DC. More in gems_ipm.html. |
IPM (3) |
<pa_ICmin> |
Pa_XMI[4] |
1 |
Minimal
effective ionic
strength (molal), below which the activity coefficients for aqueous
species are set to 1. Default value: 1e-5. |
IPM (3) |
<pa_IEPS> |
Pa_EPS[1] |
1 |
Convergence
parameter of SACT
calculation in sorption/surface complexation models (can be set
between
0.01 and 0.000001). Default value is 0.001. |
IPM (3) |
<pa_IIM>
|
Pa_IIM |
1 |
Maximum allowed number of iterations in the Main_IPM_Descent() procedure. Default value: 7000. This parameter is also used in new smoothing functions (see Pa_AG). More details in gems_ipm.html. | IPM (3) |
<pa_PC> |
Pa_PC |
1 |
Mode of PhaseSelect() operation, old (1) and new (2) variants. Default value 2. This flag defines the behavior of Phase Selection procedure, (disabled when this flag is set to 0). More details in gems_ipm.html. | IPM (3) |
<pa_PD> |
Pa_PRD[0] |
1 |
Mode of calculation of activity coefficients and metastability factors.
Possible values: 2 (default) - at each MBR() and MainIPMDescent()
iteration; 3 - reserved. This mode should be fixed to 2 in
the present version of GEM-Selektor. |
IPM (3) |
<pa_PE> |
Pa_PE |
1 |
Flag for using
electroneutrality condition in GEM IPM calculations (should be
set to 1
if an Independent Component "charge" ("Zz") is present in the
system definition). This flag may be automatically switched off to 0
during GEM calculation if e.g. the aqueous phase has been eliminated |
IPM (1) |
<pa_PhMin> |
Pa_XMI[3] |
1 |
Cutoff
mole amount for
elimination of non-electrolyte solution phase with all its
components (default value 1e-10). |
IPM (3) |
<pa_PLLG> | Pa_LLG | 1 |
Tolerance for checking divergence in the GEM dual solution between IPM iterations. Default: 30000. Possible values: 0 - disables the divergence detection (in stiff systems, failure of GEM IPM algorithm may occur); 32001 or -32001 - enables divergence detection in the respective mode, but blocks the warning message; other values between 1 and 32000 or -1 and -32000 enable the divergence detection and possible warning W14IPM. More in gems-ipm.html. | IPM (3) |
<pa_PRD> |
Pa_PRD[1] |
1 |
Decimal exponent for maximal DC amount correction in SpeciationCleanup(). Default
value: -5. The correction will be applied if log10 of the absolute
difference between the corrected and uncorrected amount exceeds
<Pa_PRD>, otherwise the DC amount will be set to 10<Pa_PRD>.
This tolerance is especially useful if the detection of divergence in
the dual GEM solution is disabled (see <Pa_LLG>). Possible
values: from -7 to -3 More in gems_ipm.html. |
IPM (3) |
<pa_PSM> |
Pa_PRD[2] |
1 |
Level
of IPM diagnostic messages:
0- disabled (no ipmlog file); 1- normal; 2-including warnings.
Default
value: 1. See gems_ipm.html for
detail. |
IPM (3) |
<pa_ScMin> |
Pa_XMI[1] | 1 |
Cutoff mole amount for elimination of solid sorbent (default 1e-13). Elimination of the sorbent results in the elimination (zeroing off) of the whole sorption phase and all its components from the mass balance. | IPM (3) |
<pa_XwMin> |
Pa_XMI[0] |
1 |
Cutoff mole amount for elimination of water-solvent (default 1e-13). Elimination of the solvent results in the elimination (zeroing off) of the whole aqueous phase and all its components from the mass balance. | IPM (3) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<PAalp> |
1 |
Flag for using (+) or ignoring
(-) specific surface areas of phases; default value is '+'. This
flag must be set on (+) if dispersed or sorption phases, or phases under kinetic rate control are present in the system
definition. |
IPM (1) |
|
<pCh> |
etaF |
nPS*6 |
Density
of permanent surface type charge
(mkeq/m2) for each surface type on sorption phases.
Default
value 0, should be set to zero for unused surface types and for rows
corresponding to aqueous and gas phases. |
IPM (8) |
<PHNL> |
PHnam |
nPH | List
of Phase names (up to 16
characters per name, e.g. 'Brucite'). The name can contain
Latin
letters, digits, @, -, +, =, _ symbols; spaces are not allowed. Names
in this list must be arranged in the following order: aqueous
electrolyte phase first (if present in the system), then fluid and/or
gas phase(s) (if present), then condensed solution phases (if present),
then sorption phases (if present), and then pure condenced phases. Data
in all other DCH/IPM arrays for phases must go in the same order as
the Phase names in this list |
DCH (7) |
<pKin> |
1 |
Flag
for using metastability
constraints on calculated amounts of Dependent Components (see
<DLL>, <DUL> arrays). Possible values: 1 (on) or 0 (off).
Default value is 1 (on). |
IPM (3) |
|
<PMc> |
LsMod[k][0]* LsMod[k][2] |
Collected array of interaction parameter coefficients for the (built-in) non-ideal mixing models. Number of parameters used by k-th phase model is given in <LsMod>[k][0] and the number of T,P coefficients per parameter - in <LsMod>[k][2]. Provides necessary coefficients or zeros for each combination of phase component indexes given in the <IPxPH> table. See gems3k_tsolmod.html file for detail. | IPM (4) |
|
<Pparc> |
nDC |
Partial
pressures or
fugacities of pure Dependent Components (for setting constant
chemical
potentials or pure gas fugacity). Default values: total pressure
P in bars. |
IPM (5) |
|
<PSigm> |
1 |
Flag
for using (+) or ignoring
(-) specific surface free energies of phase-aqueous and
phase-gas
interfaces; default value is '+'. |
IPM (1) |
|
<Ptol> |
1 |
Tolerance
for the pressure
interpolation (Pa). Thermodynamic data will be interpolated in
GEMS3K only if the current pressure is more than Ptol different than
the previous one used in GEM IPM run. Default value: 1000 Pa. |
DCH (9) |
|
<PV> |
1 |
Flag
for the volume balance
constraint (on Vol IC) - for indifferent equilibria at P_Sat (not
used in this version). If PV = 1 then the Independent Component
"Vol" must be included for the volume balance. The usual
(default) value of PV is 0. |
IPM (1) |
|
<Pval> |
nPp |
Pressure
values (Pa) for the look-up arrays grid of thermodynamic data,
must be given in the ascending order. Interpretation depends on <mLook> flag. |
DCH (9) |
|
<pe> |
pe |
1 |
pe
of aqueous solution in the
activity scale (GEM output) |
DBR (2) |
<pH> |
pH |
1 |
pH
of aqueous solution in the
activity scale (GEM output) |
DBR (2) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<rho> | 1 |
Actual carrier density for density-driven flow (kg/m3). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<rMB> | Cb |
nICb | Mass balance residuals - GEM output (moles). This vector has <nICb> elements in the order of IC defined in the <xic> index list. Good relative mass balance residuals must be less than 1e-12 (1e-15 for O, H). This vector can be checked for evaluating quality of the GEM IPM3 solution. | DBR (4) |
<RLC> | nDC | Code
of metastability
constraints for DCs: 'B' - both side (<DLL>
and <DUL>) constraints are used (default); 'L' - from below
only
(<DUL> take trivial values of 1e6 mol); 'U' - from above only
(<DLL> take trivial values of 0 mol). Default value: 'B'. |
IPM (6) |
|
<RSC> | nDC | Units of metastability/kinetic constraints for DCs (see vectors <DUL>, <DLL>). By now, only 'M' (moles) code can be accepted. | IPM (6) |
|
<S> |
1 |
Specific storage coefficient, dimensionless. Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<S0> |
nDC*nPp *nTp |
Optional lookup array for the DC absolute entropy function (J/K/mol). This array has a 3-D organization which is a sequence of 2D tables, each corresponding to one DC in the same order as in the <DCNL> list. Each 2D table has <nPp> rows and <nTp> columns, in total, <nPp>*<nTp> elements. Each row in the table corresponds to a certain value of pressure from the <Pval> vector. Data in the row referto this pressure and temperatures in the sequence defined in the <TKval> vector. | DCH (9) |
|
<SACT> |
SATT |
Lads |
Classifier
of applied SACT equations
(isotherm corrections). Possible values: 'L' -
competitive Langmuir (default); 'Q' or '1' - non-competitive
monodentate (Langmuir); '2' - non-competitive bidentate QCA; '3' -
non-competitive tridentate QCA; '4' - non-competitive tetradentate
QCA; 'F' - non-competitive Frumkin; 'R' - competitive
Frumkin; 'I' - no SACT correction (e.g. for sorbent components). Will probably change in TSorpMod class in future. |
IPM (8) |
<SATX> |
sati |
Lads*4 |
Setup
of surface sites and species (will be
applied separately within each sorption phase). One row per DC,
with element [0] - index of surface type to which it is assigned (0, 1,
..., 5, default 0); element [1] should be set to -1 (assignment of
surface to the whole sorbent); element [2] is the index of
surface site for this DC in the surface type (0,1, ... ; default 0);
element [3] is the index of surface EIL plane (0 innersphere, 1
outersphere, default 0) to which the formula charge of DC is assigned
(if charge distribution is not explicitly given in the MASDJ table). |
IPM (8) |
<SCM> |
SCM |
nPS*6 |
Classifier
of built-in electrostatic models
applied to surface types in sorption phases (one row per phase,
one element per surface type; for aqueous and/phases, should be filled
with null characters). Possible codes: 'N' - non-electrostatic model
(NEM), default; 'D' - double-layer model (DLM), 'C' -
constant capacitance model (CCM); 'T' - triple-layer model
(TLM); 'M' - modified TLM (Robertson); 'S' - basic Stern model
(BSM); '3' - three-plane (CD) model (3PM); 'X' - ion exchange
non-electrostatic model; 'E' - BSM for permanent-charge surfaces; 'I' -
reserved. |
IPM (8) |
<Sigg> |
Sigg |
nPH |
Specific
surface free energy
for phase-gas interface (J/m2)
(not yet used). Default: 0 J/m2. |
IPM (7) |
<Sigw> |
Sigw |
nPH |
Specific
surface free energy
for phase-water interface (J/m2). Cannot be set in
DBR or DCH files - only here! Size: <nPH>. Default value 0 J/m2.
|
IPM (7) |
<sMod> |
smod |
nPS*6 | Codes
for built-in mixing
models of multicomponent phases. Of these six characters per
phase, the second, third and fifth must be set to 'N'.
The fourth character can be either 'I' (ideal mixing) or 'S' (the
built-in subroutine will be used for the non-ideal model). Note that
only built-in mixing models are allowed in GEMS3K (i.e. no phase
scripts). The sixth character is either 'N' or code of the mixing rule
used in some fluid EoS models (e.g. 'W'). The first code selects the
built-in model; for codes and details, see gems_solmod.html. |
IPM (4) |
Tag
in GEMS3K |
Label
GEMS |
Dimensions |
Description |
Input
File |
<TK> | TC[0] or TC[1] |
1 |
Node
temperature T (K). This value must
always be provided (GEM
input). If this value
differs by
more than <Ttol> degrees from the temperature value used in
previous GEM calculation, the GEMS3K program will attempt to
interpolate thermodynamic data if lookup arrays were provided in DCH
file or DATACH memory structure. If
a given TK value is outside of the
interpolation interval then calculations will stop, and NodeStatusCH
will be set to ERR_GEM_AIA or
ERR_GEM_SIA. |
DBR (2) |
<TKval> | nTp | Temperature
values (K) ffor the look-up arrays grid of thermodynamic data; the values must be given in
the
ascending order. Interpretation depends on the <mLook> flag. |
DCH (9) |
|
<Ttol> | 1 |
Tolerance for the interpolation over temperature (K). Thermodynamic data will be interpolated only if current temperature is more than Ttol different than the previous one used in GEM IPM run. Default value: 0.1 degree | DCH (9) |
|
<Tm> | 1 |
Actual total simulation time (s). Passed into the TNode class. Stored in DATABR structures and DBR files. Default value is 0.0. | DBR (2) |
|
<Tr> | 1 |
Transmissivity (m2/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<U0> |
u0 |
nDC*nPp *nTp |
Optional lookup
array for Internal energy of DC (J/K/mol). This array has a 3-D
organization which is a sequence of 2D tables,
each corresponding to one DC.Tables for DCs follow in the same order as
the names in the <DCNL> list. Each table has <nPp> rows and
<nTp> columns, in total, <nPp>*<nTp> values. Each row
in the DC table corresponds to a certain value of pressure from the
<Pval> vector. Data in the row refer to this pressure and to
temperatures in a sequence defined in the <TKval> vector. Under construction. |
DCH (9) |
<uIC> | u |
nICb | Chemical potentials of ICs (dual GEM solution) - GEM output, normalized scale. Order of elements is defined in the <xic> index list. This vector contains normalized chemical potentials of Independent Components, from which and the stoichiometry matrix <A> the chemical potential of any DC in this chemical system can be algebraically calculated. | DBR (4) |
<V0> |
nDC*nPp *nTp |
Obligatory
lookup array for
(standard) molar volumes of Dependent Components (J/Pa).
This array
has a 3-D organization which is a sequence of 2D tables, each
corresponding to one DC in the same order as in the <DCNL> list.
Each 2D table has <nPp> rows and <nTp> columns, in total,
<nPp>*<nTp> elements. Each row in the table corresponds to
a certain value of pressure from the <Pval> vector. Data in the
row refer to this pressure and temperatures in the sequence defined in
the <TKval> vector. |
DCH (9) |
|
<Vi> |
1 |
Volume
of inert subsystem (m3)
(used only in mass transport part and stored here on the TNodeArray level). |
DBR (2) |
|
<vp> |
1 |
Advection velocity (in pores) in this node (m/s). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
|
<vPS> |
phVol |
nPSb |
Volumes
of multicomponent
phases (m3) (GEM output). Order of phases: defined
in the
<xph>
index list in the DCH file. |
DBR (6) |
<Vs> |
Vx[1] |
1 |
Volume
V of reactive subsystem in the node
(m3) (GEM output) |
DBR (2) |
<Vt> |
1 |
Total volume of the node (m3). Not used on the level of TNode, stored in DATABR structures and files on the level of TNodeArray. Default value is 0.0. | DBR (3) |
Tag
in GEMS3K |
Label
GEMS |
Dimen- sions |
Description |
Input
File |
<xDC> |
x |
nDCb |
Speciation
- amounts of DCs in
equilibrium state - primal GEM solution (moles) (GEM output). This
vector is also required as input at <NodeStatusCH> = 5 when the
old GEM solution is used as an initial approximation. Number of
elements: <nDCb>; order of DC elements is defined in the
<xdc> index list in the DATACH structure.The <xDC> vector
is the typical result of equilibrium speciation calculations, from
which concentrations of all chemical species (or their activities using
the <gam> output vector) can be computed. Zeros in this vector
correspond to unstable species eliminated by GEM IPM from the mass balance
in equilibrium state. |
DBR (5) |
<xdc> |
nDCb |
DATACH
access index list of
Dependent Components kept in the DATABR structure and in DBR
files (contains indexes of respective DCs in DATACH lists) |
DCH (4) |
|
<xic> |
nICb |
DATACH
access index list for
Independent Components kept in the DATABR structure and in DBR files
(contains indexes of respective ICs in DATACH lists) |
DCH (4) |
|
<xph> |
nPHb |
DATACH access index list for Phases kept in the DATABR structure and in DBR files (contains indexes of respective Phases in DATACH/IPM lists) | DCH (4) |
|
<xPH> |
Xa |
nPHb |
Amounts
of phases in
equilibrium state (moles) - GEM output. Number of elements:
<nPHb>; order: defined in the <xph> index list in the
DCH file. Zero element value means that the respective
phase is unstable and is not present in the equilibrium state
mass balance. This data object is not used as GEM IPM3 input. |
DBR (6) |
<xPA> |
Xwa |
nPSb |
Amount
of carrier (sorbent or
solvent) in multicomponent phases (GEM output). Order of
phases:
defined in <xph> index list in the DATACH file/structure. This
data object may be very useful e.g. in calculation of molal
concentrations of aqueous species. |
DBR (6) |
<YOF> | Yof |
nPH | Surface free energy parameter for phases (J/g) ( to accomodate for variable phase composition). Default: 0.0 J/g. | IPM (7) |