Dino Posted October 8, 2010 Posted October 8, 2010 Tom, I have successfully gotten a glass to dissolve in solution with a known reaction rate law. I am trying to see if I can reproduce the observed effect of analcime precipitation on the dissolution rate of the glass. I have set up a script to read the information for the glass, analcime precipitation, and altered log K values. What seems to happen irrespective of what mineral I choose is that as the system gets close to the point at which the second mineral should begin to precipitate, the program cannot converge. It aborts when the step size gets too small. I've tried to decrease the step size, use 'log' instead of 'linear,' and some others. The same result at the same calculated time. Presumably what should happen is that the rate decreases as the silica from the glass increases (the glass has a cross affinity to chalcedony) and when the competing phase precipitates, the dissolution rate of the glass should increase. Any hints on how to proceed? I'll send you the files under a separate email. Denis
Tom Meuzelaar Posted October 11, 2010 Posted October 11, 2010 Hi Denis: It looks like there's a problem with your custom rate law for Analcime. It appears to be handling the condition that the precipitation rate for Analcime = 0 as long as Q/K < 1.03 correctly, but the script stops at 72, at which point your Q/K value = 1.0299, just before precipitation should begin. Another way to confirm this is that if you switch from a custom rate law to the built-in rate law (using all of your input variables), the script converges and precipitates kinetically. If all that your script does is establish a minimum Q/K value for Analcime precipitation to begin, I'm wonder if you can use the built-in rate law and critical saturation index setting instead. Also, you have a temperature dependent rate law for both your glass and Analcime, but T never varies in your model- I assume this is for future polythermal simulations? Regarding the two other questions you asked in your email: Yes, if you enter a kinetic mineral in your Reactants tab, GWB will ignore suppression, since you are invoking it's presence in the model kinetically You should use the File - Change working directory setting to establish the default directory for all input and output files Hope that helps, Tom Meuzelaar RockWare, Inc.
Dino Posted October 15, 2010 Author Posted October 15, 2010 Hi Denis: It looks like there's a problem with your custom rate law for Analcime. It appears to be handling the condition that the precipitation rate for Analcime = 0 as long as Q/K < 1.03 correctly, but the script stops at 72, at which point your Q/K value = 1.0299, just before precipitation should begin. Another way to confirm this is that if you switch from a custom rate law to the built-in rate law (using all of your input variables), the script converges and precipitates kinetically. If all that your script does is establish a minimum Q/K value for Analcime precipitation to begin, I'm wonder if you can use the built-in rate law and critical saturation index setting instead. Also, you have a temperature dependent rate law for both your glass and Analcime, but T never varies in your model- I assume this is for future polythermal simulations? Regarding the two other questions you asked in your email: Yes, if you enter a kinetic mineral in your Reactants tab, GWB will ignore suppression, since you are invoking it's presence in the model kinetically You should use the File - Change working directory setting to establish the default directory for all input and output files Hope that helps, Tom Meuzelaar RockWare, Inc.
Dino Posted October 15, 2010 Author Posted October 15, 2010 Tom, You are correct. When I use the built-in rate, the problem converges. However, to get some analcime to precipitate, I need to start with some present. If I start with a very small amount, say 1 ng, the problem still works. However, this amount must first dissolve. This means that the problem is not quite what I wanted, but it may be good enough. The reason for using the script was to make sure that no analcime dissolved. The script I sent you had Q/K < 1.03, but the same problem with convergence occurred when Q/K was constrained to be 1 or greater. As I think about it, the problem might lie in the case that there needs to be some analcime present before some can precipitate. Hence my observation that I needed some small amount present for the reaction to occur. Thnaks for your help. I think I am on the right track for now. Denis
Dino Posted December 9, 2010 Author Posted December 9, 2010 Tom, To continue the dialogue on the modeling of two kinetic minerals, I have been successful in modeling glass dissolving and a mineral phase precipitating. This is not totally satisfactory as I am unable to prevent dissolution even of a ng of mineral until saturation. However, for the time being, I am willing to live with that. However, as the glass dissolves and saturation of the second mineral is approached, the code begins to decrease the step size until it can converge. Another several small steps (5 or 6 at 0.00001 or so) are calculated before convergence is a problem again. This continues and, most of the time, the calculation completes. It often helps to relax the value of epsilon by 3 to 5 orders of magnetude, maybe as low as 10^7. Even with this, the calculation proceeds very slowly, often taking several hours to complete. In the output, I can often see spikes in the reaction rate and other output that suggests residual instability in the calculation. I am a bit concerned that the calculation is accurate. In an email, I'll send you the script and the database. When you get the time to take a squint at it, I'd appreciate your feed back, especially if you have a suggestion on how to make the code run better. Denis
Tom Meuzelaar Posted December 9, 2010 Posted December 9, 2010 Hi Denis: It looks like the trouble begins as soon as Analcime starts precipitating- I believe the problem is the Analcime is saturated- Q/K = 1, or log Q/K = 0. Given that you are using the built in rate law, which has a (1-Q/K) term, you essentially have no thermodynamic drive for your Analcime precipitation. I hope that moves you along. Regards, Tom
Dino Posted December 10, 2010 Author Posted December 10, 2010 Tom, I'm not sure how that helps. Unless Q/K > 1, the analcime will not ppt. Once Q/K = 1, analcime will stop dissolving and start ppt'ng as Q/K gets greater than 1. Since I only put in 0.01 ng, it doesn't take long for the analcime to be completely gone. The glass continues to dissolve until analcime is saturated. If you look at the output, with the current formulation, analcime does ppt and mass steadily accumulates. However, the code has a really hard time converging unless I relax epsilon. I'm just unsure how relaxing epsilon affects the results. If there is no problem with relaxing epsilon, I should be OK. Denis
Tom Meuzelaar Posted December 10, 2010 Posted December 10, 2010 Denis: Let me put it another way- Analcime never becomes supersaturated (plot Q/K for Analcime in Gtplot). The reason for this is that the kinetic rate you've provided for Analcime exceeds your glass dissolution rate. Thus, the rate of supply of aqueous components needed for Analcime to precipitate is slower than the rate you've given for the Analcime precipitation itself. You can prove this to yourself by simply removing the kinetic Analcime entry from the Reactants tab. The script runs to completion just fine, and the final plot you get is the same as under your kinetic configuration. Hope that helps, Tom
Dino Posted December 10, 2010 Author Posted December 10, 2010 Tom, You are correct. So, the problem that I'm trying to simulate is that after glass has dissolved for quite a long time, we see in some cases analcime precipitate. When analcime precipitates, the glass reaction rate increases dramatically. We have always interpreted this as analcime consuming the rate controlling species orthosilicic acid. I also interpreted this to mean that analcime had to precipitate faster than the glass dissolved. What you are saying suggests that analcime has to precipitate slower than the glass, but still consume silicic acid. Is that correct? Denis
Tom Meuzelaar Posted December 10, 2010 Posted December 10, 2010 More specifically, what I am saying is that Analcime can only precipitate as fast as the dissolving glass can provide the species it needs. By the way, there are options in the built-in rate law for the affects that the saturation state of one mineral has on the dissolution/precipitation rate of another. Have a look at section 4.2.3 'Cross-affinity rate laws' in the GWB Reaction Modeling Guide. You might also want to take a look at rate laws that incorporate the effects of promoting and inhibiting species. Hope that helps, Tom
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now