PhreeqcUsers Discussion Forum

USER_PUNCH/USER_GRAPH => SELECTED_OUTPUT => Topic started by: Christinali91 on September 23, 2020, 07:24:55 AM

Title: Get water, excess H and excess O using USER_PUNCH
Post by: Christinali91 on September 23, 2020, 07:24:55 AM
Dear Dave,

There is a function called RM_SetComponentH2O in the PhreeqcRM interface. The default setting (true) of this function is to include water, excess H, and excess O as components. I wonder if I can also get water, excess H, and excess O using USER_PUNCH. I know the keywords to get total H and total O as follows:

PUNCH TOTMOLE("H")
PUNCH TOTMOLE("O")

I searched online but didn't find examples with water, excess H, and excess O. Could you help me with this?

Thanks so much for your help!

Best,

Christina
Title: Re: Get water, excess H and excess O using USER_PUNCH
Post by: Pak on September 23, 2020, 08:45:52 AM
I would recommend you to try it, and if you are working with roughly one liter and you see that the amount of moles that are printed are around 111 for H and 55 for O, you might consider (I would say) that the results are correct.
Title: Re: Get water, excess H and excess O using USER_PUNCH
Post by: dlparkhurst on September 23, 2020, 03:35:29 PM
The mass of water (kg) is available from the function TOT("water"), so the excess moles can be calculated as follows:

Code: [Select]
O_excess = TOTMOLE("O") - TOT("water")*1000/GFW("H2O")
H_excess = TOTMOLE("H") - 2*TOT("water")*1000/GFW("H2O")

It is important to use the exact gram formula weight because the excess quantities may be several orders of magnitude smaller than the moles of water. In the worst case, excess quantities for pure water are on the order of 1e-7 compared to 1e2.