PHREEQC Overview
Navigation: Models ➔ TCE Models ➔ PHREEQC Overview
Latest SysCAD Version: 25 October 2024 - SysCAD 9.3 Build 139.36522
Related Links: Thermodynamic Calculation Engines, TCE Functionality Overview, TCE Species Mapping, TCE Configuration Options, PHREEQC Example Projects
Formally released as part of Build 139 (first available as BETA version in Build 138). The PHREEQC SysCAD TCE option and models documentation is for the latest version of SysCAD.
Overview
PHREEQC is a computer program that is designed to perform a wide variety of aqueous geochemical calculations.
- It is developed and maintained by the United States Geological Survey. (refer to www.usgs.gov/software/phreeqc-version-3 for further information)
- It is assumed that the user has some familiarity with the theory and use of the PHREEQC program.
- This SysCAD TCE library option (in ScdPHREEQC.DLL) requires the SysCAD "Energy Balance", "Integration Libraries" (formerly "SMDK Runtime") and "TCE" add-ons. For Build 139 from August 2022, a TCE add-on is required instead of a separate individual PHRREQC License add-on.
- PHREEQC is used in a flexible way in Unit or Control models at appropriate locations in a plant model. It is not implemented as a Species Properties Model.
- Selection of appropriate databases and data is the responsibility of the user. It is important to understand the limitations of databases supplied via PHREEQC download and other sources (THEREDA, THERMODDEN, etc.). A good review of selected databases has been conducted by Lu et al., 2022 [1].
PHREEQC Software
The SysCAD PHREEQC add-on allows users to perform geochemical calculations without installing PHREEQC separately. SysCAD has the essential PHREEQC files built-in for the add-on to work.
Users who want to explore more PHREEQC features can download and install PHREEQC and read the PHREEQC documentation. See Additional Notes for more details.
Models
PHREEQC unit models:
- PHREEQC Model Configuration - Used to define and view various options for the selected PHREEQC database, including management of mapping of SysCAD species list to species list used in PHREEQC.
- PHREEQC Direct Calc - Standalone unit model to perform side calculations using PHREEQC for predicting aqueous chemistry equilibrium conditions and properties including pH on a user defined PHREEQC stream.
- PHREEQC Side Calc - Standalone unit model to perform side calculations using PHREEQC for predicting aqueous chemistry equilibrium conditions and properties including pH on a SysCAD stream in the current project.
- PHREEQC Reactor - Include this model in a SysCAD stream to use PHREEQC to calculate predicted outlet conditions. Functionality is similar to SysCAD Reaction Block and FEM where for a given feed reactions occur with optional heat exchange. The model can be configured in a number of ways for different purposes.
- PHREEQC Evaporator - Include this model in a SysCAD flowsheet to model an evaporator using embedded PHREEQC calculations. Available from Build 139.
- PHREEQC Flash Tank - Include this model in a SysCAD flowsheet to model a flash tank using embedded PHREEQC calculations. Available from Build 139.
- PHREEQC Reverse Osmosis - Include this model in a SysCAD flowsheet to model reverse osmosis using embedded PHREEQC calculations. PHREEQC can be used to calculate maximum permeate recovery (to incipient solids formation) and other operating modes. Available from Build 139.
- PHREEQC Solvent Extraction (Mixer Settler) - Include this model in a SysCAD flowsheet to model solvent extraction using embedded PHREEQC calculations. Available from Build 139.
- PHREEQC Feeder - Include this model in a SysCAD flowsheet to specify a feed using PHREEQC species. Available from Build 139.30807.
- PHREEQC Pond - Evaporative pond model for Dynamic solver. Available from Build 139.30599.
- PHREEQC Tank - Basic Tank model for Dynamic solver. Available from Build 139.36061.
Species Mapping:
- Ionlist is used to breakdown the species to ions. Please see Species Mapping for more information on this topic.
At this time, PHREEQC evaporation models are suitable for water evaporation only. This is because gases are treated as pure phases in the PHREEQC calculations. Only insoluble gases can be included in these models.
PHREEQC SysCAD Project Workflow
The list below are some recommended steps in creating a new PHREEQC SysCAD project group.
If user only intend to use PHREEQC for standalone equilibrium calculations, thus not linking it to existing SysCAD stream or species database, then follow the (A). If user wishes to use PHREEQC to evaluate SysCAD streams, then follow (B).
(A) Using PHREEQC as standalone thermodynamic calculation engine to perform PHREEQC equilibrium calculations.
- (Only required in build138) Extract the PHREEQC add-on dlls from the bin138_xxxxx_c_ScdPHREEQC.zip into the SysCADxxx bin folder
- Locate a valid PHREEQC database file and copy into the "database" subfolder of the "project group" you wish to open (or create). See image for folder layout.
- Sample database files are stored in the database subfolder of the PHREEQC installation.
- Typical path is C:\Program Files\USGS\Phreeqc Interactive X.Y.Z-NNNNN\database.
- Edit the configuration to:
- select the PHREEQC models in step 1 of edit configuration file,
- in Step 2 of edit configuration file - TCEs tab, select the location of the PHREEQC database folder (point 2 of workflow) and tick all the databases you would like to use in the project. (Only required in build139)
- Create or open a SysCAD project using the cfg file you have just edited.
- Insert a PHREEQC Model Configuration, and configure the model:
- load in the PHREEQC Model Definition file (step 2)
- Insert a PHREEQC Direct Calc Model. Use the direct calc to perform PHREEQC equilibrium calculations.
(B) Using PHREEQC to evaluate SysCAD streams or as part of the SysCAD flowsheet.
- (Only required in build138) Extract the PHREEQC add-on dlls from the bin138_xxxxx_c_ScdPHREEQC.zip into the SysCADxxx bin folder
- Locate a valid PHREEQC database file and copy into the "database" subfolder of the "project group" you wish to open (or create). See image above for folder layout.
- Sample database files are stored in the database subfolder of the PHREEQC installation.
- Typical path is C:\Program Files\USGS\Phreeqc Interactive X.Y.Z-NNNNN\database.
- Create a SysCAD.93.db3 file, the SysCAD database must contain the same number of individual phases as the PHREEQC model file.
- A PHREEQC Database Utility is available to assist user with the creation of SysCAD.93.db3 file.
- The database is created using existing SysCAD data, PHREEQC Model data is not transferred to the SysCAD database.
- Once a SysCAD.93.db3 file has been create, copy this database and the IonList.txt into the PHREEQC SysCAD project \CfgFiles subfolder
- Check and edit the SysCAD.93.db3 file inside the CfgFiles subfolder and correct any missing data.
- Edit the configuration to:
- select the PHREEQC models in of edit configuration file,
- in step 2 of edit configuration file, select the required Species from the Species Tab.
- also in Step 2 of edit configuration file - TCEs tab, select the location of the PHREEQC database folder (point 2 of workflow) and tick all the databases you would like to use in the project. (Only required in build139)
- Create a SysCAD project.
- Add PHREEQC Model Configuration,
- load in the PHREEQC Model .dat file (this is the file we have copied over in workflow step # 2)
- complete the PHREEQC Species to SysCAD Species Mapping.
- Edit SysCAD.93.db3 and configuration file if species are missing.
- Once species mapping is satisfactory, add PHREEQC unit models to the project where appropriate.
NOTES:
- Item 1 of the workflow is not required for Build 139, the TCE DLL files are included as part of the standard SysCAD update file.
- Please also see TCE Configuration Options for how to specify the configuration options.
Additional Notes
- If you want to use PHREEQC with SysCAD, you don't have to install it separately. SysCAD already comes with the PHREEQC files you need and some examples of how to use them. However, if you want to learn more about PHREEQC, improve your skills with the software and access the utilities that come with it, you might want to download and install PHREEQC on your own. It's optional, but it can be helpful.
- The minteq.v4.dat database cannot be used in its native form. This is because it contains reactions with the -no_check option enabled. If you attempt to load this, you will get this error. Please contact SysCAD support for a supported version of this database, or comment out the reactions in the database file which contain the -no_check option.
- Documentation for the PHREEQC software package is useful for further understanding program capabilities and limitations. Links to the documentation are provided below: