Jump to content
Geochemist's Workbench Support Forum

Newton-Raphson converge error in X1t model


Recommended Posts

Hello,

I encountered a convergence error (see screenshot below) while running a reactive transport model with two boundary fluids in X1t. The model was running fine with Fluid_1 but requires “suppress all” (disable new mineral to form) to be able to run. The convergence error occurred during Fluid_2, where a significant amount of CO2(aq) was added. I also attached the X1t model file and the thermo database for your information.

image.png.92e8349ae5cec17f0258037f4e6fb1d1.png

I look forward to hearing your feedback. Thanks,

Zhidi

Test_1_04232024.x1t AGI_20e_4-11-2024_debug.tdat

Link to comment
Share on other sites

Hello Zhidi,

Thank you for attaching your script. To troubleshoot, I checked "Follow Output" in the Results pane and "explain on" in the Stepping dialog before running your model to get a better idea what is limiting the size of the time step in the simulation. Doing so, I noticed that the rate limiting constraint right before the model runs into the newton-raphson iteration error is due to the change in Q/K for reactant Illite. To test, I simplified your model by setting Illite to a reaction rate of 0 and was able to run your simulation to completion. I also noticed that the reaction rates for various minerals do vary quite a lot be

Could you provide a bit of context regarding your fluids and simulation? I noticed that a lot of component concentrations are the same but with a few differences. Are these fluids you have created or measured?

I noticed that you have added all minerals as a kinetic reaction except Halite as a simple mineral. In general, kinetic reactions are useful for reactions that are proceeding slowly but measurable over the time period of interest. I noticed that Quartz is dissolving so slowly that it's not really doing anything. If the mineral barely reacts then perhaps you do not need to consider it in your model. This can help to simplify things in terms of the kinetic reactions running through your system. We don't typically see simple minerals, which are incrementally added to the domain over the course of the simulation in a reactive transport simulation. If a mineral is in equilibrium with the initial fluid in the system, you should consider swapping it in for a component in your Initial pane.

In general, it is good to check that the log Ks in the thermo database are suitable for the type of reactions occurring in your system.

Hope this helps,
Jia Wang
Aqueous Solutions LLC

  • Like 1
Link to comment
Share on other sites

Hi Jia,

To provide you with a context of our fluid system, the chemistry of the initial fluid and injection (boundary) fluid are the same for the first 59 hours of the simulation, then CO2 was added into the injection water for the next 23 hours. You can tell this from the difference between fluid_1 and fluid_2 in the Fluids tab. Does this help with your further troubleshooting?

Also, does it mean that the illite becomes non-reactive when you set the reaction rate of illite to zero? We know that the reaction rate of illite cannot be zero in reality. So, it would make sense to me not to set the reaction rate of illite as zero.

Thanks,

Zhidi

 

 

 

Link to comment
Share on other sites

Hi Jia,

An update: we tried to delete quartz and k-feldspar from the reactant system, change halite to kinetic mineral, and even lower the reaction rate of illite by two orders of magnitude, but that still didn’t solve the convergence issue. So far, only excluding illite (by setting the reaction rate to zero) can solve the convergence issue. However, we would like to keep illite in the system, since it's a main component of our sample.

Any insight on that?

Thanks,

Zhidi

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