The input for PHREEQC is arranged by keyword data blocks. Each data block begins with a line that contains the keyword (and possibly additional data) followed by additional lines containing data related to the keyword. The keywords that define the input data for running the program are listed in table 2. Keywords and their associated data are read from a database file at the beginning of a run to define the elements, exchange reactions, surface complexation reactions, mineral phases, gas components, and rate expressions. Any data items read from the database file can be redefined by keyword data blocks in the input file. After the database file is read, data are read from the input file until the first END keyword is encountered, after which the specified calculations are performed. The process of reading data from the input file until an END is encountered followed by performing calculations is repeated until the last END keyword or the end of the input file is encountered. The set of calculations, defined by keyword data blocks terminated by an END, is termed a "simulation". A "run" is a series of one or more simulations that are contained in the same input data file and calculated during the same invocation of the program PHREEQC.
Each simulation may contain one or more of seven types of speciation, batch-reaction, and transport calculations: (1) initial solution speciation, (2) determination of the composition of an exchange assemblage in equilibrium with a fixed solution composition, (3) determination of the composition of a surface assemblage in equilibrium with a fixed solution composition, (4) determination of the composition of a fixed-volume gas phase in equilibrium with a fixed solution composition, (5) calculation of chemical composition as a result of batch-reactions, which include mixing; kinetically controlled reactions; net addition or removal of elements from solution, termed "net stoichiometric reaction"; variation in temperature; equilibration with assemblages of pure phases, exchangers, surfaces, and (or) solid solutions; and equilibration with a gas phase at a fixed total pressure or fixed volume, (6) advective-reactive transport, or (7) advective-dispersive-reactive transport through a series of cells in combination with any of the available chemical processes. The combination of capabilities allows the modeling of very complex geochemical reactions and transport processes during one or more simulations.
In addition to speciation, batch-reaction, and transport calculations, the code may be used for inverse modeling, by which net chemical reactions are deduced that account for differences between an initial water composition or a mixture of initial water compositions and a final water composition.