In recent years, new releases of the PHREEQC software have included the object-oriented IPHREEQC modules that can be directly used by other software such as Python. This capability has been incorporated into the PhreeqPython wrapper around the VIPhreeqc extension of the IPHREEQC modules (v. 3.3.7) developed by Vitens. Also, GoldSim has developed an article called GSPy: GoldSim/Python Interface for Scripting Support and associated DLL (GSPy.pyd) that provide definitions of external functions in pure Python that can be called by GoldSim during a simulation. This combination of software provides the means to link GoldSim to the IPHREEQC modules through Python, resulting in efficient incorporation of complex aqueous geochemical calculations in GoldSim models of water quality. The GSPy-Python approach has the advantages that alteration of the Python code needs no re-compilation, implementation of the PhreeqPython functions is relatively simple, and run times are shorter because there are no intermediate file input-output steps in the calculation sequence. The primary disadvantages are that debugging of errors in the PHREEQC setup is more difficult, the setup requires installation of Python, and not all of the Keyword options in PHREEQC are available for representing aqueous geochemical processes.
In this webinar, Ted will demonstrate the model and introduce the framework. This presentation is useful for those interested in incorporating GoldSim with Phreeq or other Python enabled programs.
Below is a video recording of the webinar presentation:
If you would like to read more about the Phreeqc with GoldSim-Python interface, please go to this article: Linking GoldSim to PHREEQC and PhreeqPython – GoldSim Help Center
Download the model file used for this presentation:
Here are descriptions of the files in the .zip below:
- Phreeqc_Python_Webinar_Model.gsm: Finalized version of the GoldSim model described in the webinar.
- GSPyModule_phreeqc.py: Working copy of the Python code that works with phreeqpython.
- GSPyModel.py: A copy of GSPyModule_phreeac.py, just renamed to work with GSPy.pyd.
- Test_phreeqpython: This my testing file that I created to figure out how to use the functions in phreeqcpython.