Jump to content
Geochemist's Workbench Support Forum

React Model with Gas Buffer - Large Residuals Error

Recommended Posts


I have a high pH water (~ 12) that I am trying to neutralize to pH 8 by sparging CO2 into. 

I would like to calculate the pH vs CO2 added to the system. I followed the 'Gas Buffer' case https://academy.gwb.com/buffers.php#TASK3 to set up the React model. I used the CO2 with HCO3 equilibrium in the Basis pane, but didn't know how to set up the Reactant pane properly. So I used CO2(g) as the reactant and get the error as seen in the attachment.

The largest residual is on the Cl- and Na+ ions. 

Interestingly, when I do the same calculation by replacing the CO2 with HCl as titrant (1000 mg/L) and remove the CO2 with HCO3 equilibrium constraint, the calculation is completed, despite the fact that Cl- is added in the titration (please see attachment).

I am attaching both the React files for your consideration.

Can you please suggest how I can overcome this error and run the case with CO2 as titrant?

Thank you


Residual Error- Only CO2.JPG

pH vs HCl - No CO2.jpg


Link to comment
Share on other sites

Hello Anoop,

Thank you for attaching your files. In the Academy lesson, the hypothetical fluid is assuming equilibrium with CO2(g) in the atmosphere for dissolved HCO3- content. Then, HCl is titrated in with a buffered vs non-buffered system to show how the pH alters. It sounds like the problem you are attempting to set up is not quite the same.

As with every geochemical calculation, you need to supply the composition and constraints to solve the initial system before changing the system. React will always try to calculate the speciation of the initial system and we can check whether or not that it is able to do that by running the command "go initial" or from under the "Run" menu. When I performed a go initial run on the file that includes the HCO3- component, I encountered the large residual error. Looking at your basis, you are constraining the HCO3- in equilibrium with a really high partial pressure of CO2(g) while you have a really high pH. At such a high pH, the CO2(aq) concentration would be relatively low and that can cause issues with the numerical iteration for calculation. Do you have a measurement of the carbonate concentration in the fluid? If so, it may be better to use it directly as it seems unlikely that your fluid is in equilibrium with such high partial pressure of CO2(g).

In both files attached, you added HCl as the titrant. Perhaps one should be CO2? Once you can get your basis speciation to calculate successfully, I think you would want to add in a simple reactant for CO2(g) as you had stated in the previous post. This will titrate CO2(g) incrementally into your system over the course of the simulation.

I would also like to point out that in addition to titrating simple reactants, the program also can model systems in equilibrium to changing gas fugacities. You can see more information about this option in section 3.6 Sliding activity and fugacity of the GWB Reaction Modeling User Guide.

Hope this helps,
Jia Wang
Aqueous Solutions LLC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...