[Next] [Previous] [Up] [Top]


Conventions for Data Input

PHREEQC was designed to eliminate some of the input errors due to complicated data formatting. Data for the program are free format; spaces or tabs may be used to delimit input fields. Keyword data blocks may be entered in any order. However, data elements entered on a single line are order specific. As much as possible, the program is case insensitive. The important exception to this rule regards chemical formulas. The following conventions are used for data input to PHREEQC.

Keywords--Input data blocks are identified with an initial keyword. This word must be spelled exactly, although case is not important. Several of the keywords have synonyms. For example PURE_PHASES is a synonym for EQUILIBRIUM_PHASES.

Identifiers--Identifiers are options that may be used within a keyword data block. Identifiers may have two forms: (1) they may be spelled completely and exactly (case insensitive) or (2) they may be preceded by a hyphen and then only enough characters to uniquely define the identifier are needed. The form with the hyphen is always acceptable. Usually, the form without the hyphen is acceptable, but in some cases the hyphen is needed to indicate the word is an identifier rather than an identically spelled keyword; these cases are noted in the definition of the identifiers in the following sections. In this report, the hyphen is usually used except for identifiers of the SOLUTION keyword and the identifiers log_k and delta_h. The hyphens are not used in these cases to avoid confusion about negative quantities. The hyphen in the identifier never implies the negative of a quantity is entered. For example, the identifier "-log_k" does not mean the negative of the log K, it is simply an alternate form for the identifier "log_k".

Chemical equations--For aqueous, exchange, and surface species, chemical reactions must be association reactions, with the defined species occurring in the first position past the equal sign. For phases, chemical reactions must be dissolution reactions with the formula for the defined phase occurring in the first position on the left-hand side of the equation. Additional terms on the left-hand side are allowed. All chemical equations must contain an equal sign, "=". In addition, left- and right-hand sides of all chemical equations must balance in numbers of atoms of each element and total charge. All equations are checked for these criteria at runtime, unless they are specifically excepted. Nested parentheses in chemical formulas are acceptable. Spaces and tabs within chemical equations are ignored. Waters of hydration and other chemical formulas that normally are represented by a "."--as in the formula for gypsum, CaSO4.2H2O--are designated with a colon (":") in PHREEQC (CaSO4:2H2O), but only one colon per formula is allowed.

Element names--An element formula, wherever it is used, must begin with a capital letter and may be followed by one or more lowercase letters or underscores, "_". Thus, "Fulvate" is an acceptable element name.

Charge on a chemical species--The charge on a species may be defined by the proper number of pluses or minuses following the chemical formula or by a single plus or minus followed by a integer number designating the charge. Either of the following are acceptable, Al+3 or Al+++. However, Al3+ would be interpreted as a molecule with three aluminum atoms with a charge of plus one.

Log K and Temperature dependence--The identifier log_k is used to define the log K at 25oC for a reaction. The temperature dependence for log K may be defined by the van't Hoff expression or by an analytical expression. The identifier delta_h is used to give the standard enthalpy of reaction at 25oC for a chemical reaction, which is used in the van't Hoff equation. By default the units of the standard enthalpy are kilojoules per mole (kJ/mol). Optionally, for each reaction the units may be defined to be kilocalories per mole (kcal/mol). An analytical expression for the temperature dependence of log K for a reaction may be defined with the -analytical_expression identifier. Up to five numbers may be given, which are the coefficients for the following equation: , where T is in Kelvin. A log K must always be defined either with log_k or -analytical_expression; the enthalpy is optional. If both are present, an analytical expression for temperature dependence is used in preference to the van't Hoff expression.

Comments--The "#" character delimits the beginning of a comment in the input file. All characters in the line which follow this character are ignored. If the entire line is a comment, the line is not echoed to the output file. If the comment follows input data on a line, the entire line, including the comment, is echoed to the output file. The "#" is useful for adding comments explaining the source of various data or describing the problem set up. In addition, it is useful for temporarily removing lines from an input file.

Logical line separator--A semicolon (";") is interpreted as a logical end of line character. This allows multiple logical lines to be entered on the same physical line. For example, solution data could be entered as:

"pH 7.0; pe 4.0; temp 25.0",

on one line. The semicolon should not be used in character fields, such as the title or other comment or description fields.

Logical line continuation--A backslash ("\") is interpreted as a signal to ignore the character immediately following the backslash. The primary use of this signal is to ignore the end-of-line character, which allows a single logical line to be written on two physical lines. For example, a long chemical equation could be entered as:

"Ca0.165Al2.33Si3.67O10(OH)2 + 12 H2O = \"

"0.165Ca+2 + 2.33 Al(OH)4- + 3.67 H4SiO4 + 2 H+"

on two lines. The program would interpret this sequence as a balanced equation entered on a single logical line. Note that if a space follows the backslash and precedes the end-of-line, the space will be ignored and the end-of-line will be interpreted as normal. The backslash character should not be used in character fields, such as the title or other comment or description fields.

User's Guide to PHREEQC - 07 MAY 96
[Next] [Previous] [Up] [Top]

Generated with CERN WebMaker