PHREEQC Overview

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models ➔ TCE Models ➔ PHREEQC Overview

PHREEQC
Overview
PHREEQC
Model Configuration
PHREEQC
Direct Calc Model
PHREEQC
Side Calc Model
PHREEQC
Reactor
PHREEQC
Evaporator
PHREEQC
Flash Tank
PHREEQC
Reverse Osmosis
PHREEQC
Solvent Extraction
PHREEQC
Feeder Model
PHREEQC
Pond Model (Dynamic)

Latest SysCAD Version: 19 March 2024 - SysCAD 9.3 Build 139.35102

Related Links: TCE Functionality Overview, TCE Species Mapping, TCE Configuration Options, Generate SysCAD database from PHREEQC Database File, 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 Model - Stand alone 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 Model - Stand alone 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.

The following unit models are available in build 139 and later:

  • PHREEQC Evaporator - Include this model in a SysCAD flowsheet to model an evaporator using embedded PHREEQC calculations.
  • PHREEQC Flash Tank - Include this model in a SysCAD flowsheet to model a flash tank using embedded PHREEQC calculations.
  • PHREEQC Reverse Osmosis Unit - 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.
  • PHREEQC Solvent Extraction (Mixer Settler) - Include this model in a SysCAD flowsheet to model solvent extraction using embedded PHREEQC calculations.

The following unit model is available in build 139.30807 or later:

  • PHREEQC Feeder Model - Include this model in a SysCAD flowsheet to specify a feed using PHREEQC species.

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 stand-alone thermodynamic calculation engine to perform PHREEQC equilibrium calculations.

  1. (Only required in build138) Extract the PHREEQC add-on dlls from the bin138_xxxxx_c_ScdPHREEQC.zip into the SysCADxxx bin folder
  2. 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.
    PHREEQC 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.
  3. 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)
  4. Create or open a SysCAD project using the cfg file you have just edited.
  5. Insert a PHREEQC Model Configuration, and configure the model:
    • load in the PHREEQC Model Definition file (step 2)
  6. 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.

  1. (Only required in build138) Extract the PHREEQC add-on dlls from the bin138_xxxxx_c_ScdPHREEQC.zip into the SysCADxxx bin folder
  2. 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.
  3. Create a SysCAD.93.db3 file, the SysCAD database must contain the same number of individual phases as the PHREEQC model file.
    • A 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
  4. Check and edit the SysCAD.93.db3 file inside the CfgFiles subfolder and correct any missing data.
  5. 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)
  6. Create a SysCAD project.
  7. 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.
  8. Once species mapping is satisfactory, add PHREEQC unit models to the project where appropriate.


NOTES:

  1. 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.
  2. Please also see TCE Configuration Options for how to specify the configuration options.

Utility

Generate SysCAD database from PHREEQC Database File

Additional Notes

  1. 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.
  2. 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.
  3. Documentation for the PHREEQC software package is useful for further understanding program capabilities and limitations. Links to the documentation are provided below:
    1. | Users Guide Version 2 (with equations)
    2. | Users Guide Version 3 (available on this page)