Jump to content
Geochemist's Workbench Support Forum

Residuals too large error (X2t)


tylerp

Recommended Posts

Hi All,

 

I have trying to use X2t to simulate reactions of brine along fracture. There are errors "Solving for composition of inlet fluid, Residuals too large". I tried to run both 2 solutions using SpecE8, there were no problem with charge balance (error is about 0.5%). The solution is acidic (HCl added), and the acidity was added under HCO3- species. How do I enter HCO3- species using acidity?

 

Can someone please help take a look at the file attached?

 

Thanks,

Tyler

brine.x2t

Link to comment
Share on other sites

Hi Tyler,

 

When you are constraining your system, especially under extreme conditions, it sometimes helps the program converge when the species that are swapped into the basis are somewhat predominant. For example, at very low pH, you might want to swap in CO2(aq) for HCO3-, or at high pH, swap in CO3-- for HCO3-.

 

Hope this helps,

 

Brian Farrell

Aqueous Solutions LLC

Link to comment
Share on other sites

Hi,

 

This is to follow up. I have swapped CO2(aq) for HCO3- and also converted the script to X1t instead as a simple 1D model would work for my application.

 

Unfortunately, there is still error below:

 

Solving for composition of inlet fluid.
N-R didn't converge after 999 its., maximum residual = 1.#R, Xi = 0.0000
Largest residual(s):
Resid Resid/Totmol Cbasis
---------------------------------------------------------
---------------------------------------------------------
Can someone please help? Brian Farrell? The revised script is attached.
Thanks,
Tyler

Brine.x1t

Link to comment
Share on other sites

Is your measured acidity a "total acidity"? In addition to the water acidity (H+ + OH- = H2O) and carbonate acidity (CO2 + OH- = HCO3-) of a fluid, "mineral acidity" can sometimes be quite substantial (for example, Al+++ + 4 OH- = Al(OH)4-). What you enter for the HCO3- component (whether CO2 is swapped into the basis or not) should be the sum of the concentration of carbonate species (CO2 + HCO3- + CO3-- + NaHCO3 + ...). If you're entering acidity titration directly for a fluid with substantial mineral acidity, that could be the source of your problem.

 

Section 15.1 of the Geochemical and Biogeochemical Reaction Modeling textbook describes an example in which a titration model is used to interpret an alkalinity measurement and determine the carbonate component concentration, which is what you want. You could do the same thing to interpret an acidity measurement.

 

Finally, you're using alkalinity units for the HCO3-/CO2, but at a pH of 2 you should basically have no alkalinity. You should enter the carbonate concentration in normal concentration units, like moles/kg or mg/kg.

 

Hope this helps,

Brian

Link to comment
Share on other sites

Thanks, Brian.

 

Yes, the measured acidity is total phenolpthalein acidity (titrated o pH 8.3) in which mineral acid (HCl) dominated (I added concentrated HCl to the solution).

 

Apparently, the measured acidity might not be correct (acidity = 1186 mg/L as CaCO3 which is equivalent to ~23.72mmol NaOH). However, I run the React module to titrate this solution (pH 2) with NaOH. It requires about 100 mmol to bring pH to 8.3. In this run, I assume CO2aq is in equilibrium with atmospheric CO2 (during titration) so I used HCO3-/CO2 = 1.2E-05 mol/l, which is calculated from Henry's law.

So it comes to this question:
(a) The solution is in equilibrium with N2 filled in head space during the experiment. Is it correct (acceptable) to assume the CO2(aq) is in equilibrium with very low PCO2, then calculate CO2aq = KCO2xPCO2 according to Henry's law? this method should give HCO3-/CO2 = <1.2E-05 mol/l.
OR
(B) should I calculate CO2aq from CO2 (aq) + H2O --> H+(aq) + HCO3-(aq), assuming HCO3-= H+ = 0.01 mol/l? this method gives HCO3-/CO2 = 0.01^2/4.45e-7 = 224.7 mol/L (which is too high, is it odd?)
Thanks,
Tyler
Link to comment
Share on other sites

I think the acidity is not correct because the measured pH (pH 2) was measured a few days prior to titration for acidity. So I used HCO3-/CO2 = 1.2E-07 mol/l (solution in equilibrium with pCO2 = 1% of pCO2 in the atmosphere) and successfully run the reactions of the this solution with some minerals using React.

 

I also used the same solution and minerals to simulate kinetic reactions along surface of fracture with fluid flow using X1t, the simulation ran properly (at 25oC, fixed constants). Now I just need to make some changes to add activation energy and pre-exponential factor so kinetic reactions can be calculated for higher temperatures.

 

Thank you very much for your help, Brian. :)

Tyler

Link to comment
Share on other sites

Hi Tyler,

 

It sounds like you have this figured out and working to your satisfaction. I'll leave you with one last tip for now that may be useful for simulating titrations or other reaction processes in the future. Sometimes one sets the initial fugacity of a gas then lets it evolve during a reaction path. Other times it's desirable to "fix" the fugacity of a gas if the external reservoir is sufficiently large and maintains equilibrium with the fluid over the course of the reaction path. You can take a look at 15.3, Gas buffers, in the GBRM text for more info.

 

Best,

Brian

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.

Guest
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.

Loading...
×
×
  • Create New...