-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrepancy between SIs and SIs from 'get_selected_output' #21
Comments
Hi Jeremy, I think I've solved this issue in the fix_si branch of phreeqpython, can you test and confirm? Regards, Abel |
Hi Abel, Thank you for the quick response! I am still getting slightly different results in the 'fix_si' branch, but I am not sure if they are significantly different or not. For the first code snippet above, I get:
While for the second snippet, I get:
These are significantly closer than previously, but I figure the Python code is directly fetching the SIs from the IPhreeqc instance, so I would expect them to be exact. Is that not the case? -- Jeremy |
Hi Jeremy, The way (I)PhreeqC works is; run a single simulation, print/output all relevant data, close simulation and store only the solution input data to be used in a subsequent simulation. To make PhreeqPython's object-oriented approach work I've had to modify the inner workings of IPHREEQC to store certain properties, such as pH, speciation, specific conductance, etc after each simulation run, so that they can be requested 'on the fly' instead of having to specify the requested output beforehand as you do in your example. The code-base of IPhreeqC is a bit obtuse in some places, with loads of global variables that get accessed and changes from lots of different files. I think I made a small error in storing the saturation indices during simulation run, but will need some time to figure out what causes this subtle difference, as they should be exactly the same. The SI calculation for example is derived from this piece of code: https://github.com/Vitens/VIPhreeqc/blob/master/src/phreeqcpp/print.cpp#L1180 |
Hello,
There seems to be a discrepancy between the saturation indices returned by
Solution.si()
, and those returned byPhreeqPython.ip.get_selected_output
.If I run:
I get the following SIs:
But using the selected output array:
I get different SIs for the minerals:
Worth noting that the latter results match what I get from running the phreeqc desktop application. Any ideas on what might be going on?
Thank you in advance for the help!
The text was updated successfully, but these errors were encountered: