Skip to content
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

How to retreive species diffusion coefficients? #18

Open
rkingsbury opened this issue May 22, 2022 · 6 comments
Open

How to retreive species diffusion coefficients? #18

rkingsbury opened this issue May 22, 2022 · 6 comments

Comments

@rkingsbury
Copy link

Hello, is it possible to use the phreeqpython interface to retrieve the species diffusion coefficients (or mobilities) used in the specific conductance calculation? I have tried a bit with, e.g., solution.pp.ip.get_selected_output_XXX() methods but have not been able to understand their call signatures. Thank you.

@AbelHeinsbroek
Copy link
Member

Hi Ryan,

PhreeqPython works by adding new api hooks into the IPHREEQC module (VIPhreeqc). I'll see if I can update VIPhreeqc to support retrieving the species diffusion coefficients.

@rkingsbury
Copy link
Author

rkingsbury commented May 31, 2022 via email

@AbelHeinsbroek
Copy link
Member

Hi Ryan,

I've added the functionality to VIPHREEQC, but am having some issues interpreting whether the program returns the correct values. Could you provide me with a test solution and expected results?

Thanks!

@rkingsbury
Copy link
Author

@AbelHeinsbroek thank you very much for your attention this; I'm sorry for my slow reply.

The following PHREEQC input defines a 0.1m NaCl solution and prints the diffusion coefficients of Na+ and Cl-. The values I obtain are 1.33e-9 for Na+ and 2.03 e-9 for Cl-.

SOLUTION 1
    temp      25
    pH        7
    pe        4
    redox     pe
    units     mol/kgw
    density   1
    Na        0.1
    Cl        0.1
    -water    1 # kg

USER_PRINT
-start
10 PRINT "D_Cl:     ", DIFF_C("Cl-")
20 PRINT "D_Na:     ", DIFF_C("Na+")
-end

@AbelHeinsbroek
Copy link
Member

My test branch seems to work ok then, thanks for the example!
I'll need some time to compile new binaries of VIPhreeqc for linux and windows, before I can push a new version of PhreeqC.

If you by any chance use MacOS you can already try the diffusion branch of PhreeqPython.

image

@rkingsbury
Copy link
Author

Outstanding, thank you! I do in fact use MacOS (for one of my systems anyway), so I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants