Water Chemistry and Scale Functions
Run a water chemistry case in PHREEQC, the US Geological Survey's geochemical code, from the worksheet: a range of PHREEQC input, one line per row, goes to the engine on this computer against the database you name (pitzer for brines), and its SELECTED_OUTPUT table spills back, a row per step: pH, saturation indices, what dissolves or precipitates. SI spills the saturation indices long form, a row per result and phase, the shape a scale chart reads. CHECK reads the input in Excel and starts nothing, naming every problem PHREEQC would refuse or silently accept. Build the input from water analyses, the minerals to watch and a mixing series or a temperature and pressure path with BUILD, which runs in Excel and starts nothing.
6 functions
PO.SIM.PHREEQC.CHECK
Checks a PHREEQC input without running it: its title, the database, and every problem PHREEQC would refuse or silently accept, by cell and block.
PO.SIM.PHREEQC.SELECTED
Runs a PHREEQC input against a database and spills one SELECTED_OUTPUT table as PHREEQC writes it: its headings, then a row per result.
PO.SIM.PHREEQC.SI
Runs a PHREEQC input against a database and spills its saturation indices long form: the columns that say which result a row is (sim, soln, step, …) and any values its USER_PUNCH writes, then phase | si, one row per result and phase.
PO.SIM.PHREEQC.RUN
Runs a PHREEQC input against a database and spills how the run went: the database, PHREEQC's version and time, its SELECTED_OUTPUT tables, and its warnings.
PO.SIM.PHREEQC.BUILD
Builds a PHREEQC input from water analyses, the minerals to watch, and an optional mixing series or temperature and pressure path, and spills it one line per row for the other PO.SIM.PHREEQC functions to read.
PO.SIM.PHREEQC.TABLES.CHECK
Checks the tables PO.SIM.PHREEQC.BUILD reads: column headings, values, water names, the mixing series and the path, and each analysis's charge balance, naming the table and cell.