Jump to content
Geochemist's Workbench Support Forum

Basic scripts for kinetic mineral dissolution/precipitation


Recommended Posts

Dear Jia and/or Brian,

I am looking for some hints about how to make a simple BASIC script for React that can account for different rate constants as a function of pH following the pH ranges described in Palandri and Kharaka (2004). I have simple BASIC scripts for forsterite and anorthite dissolution kinetics that assume constant pH and 25 degrees C. However, the script I have for K-feldspar attempts to use the Arrhenius equation to compute rate constants for different pH ranges and also temperature. I realize the K-feldspar script I am including is wrong, because the terms r1, r2, and r3 are not the rate constant at different pH, but actually the rate expression for acidic, neutral, and basic pH. I am wondering if you have any hints for me to make such a script that will work. I am including my simple React script too.

Best wishes,

Karen

Basalt Dissolution3.rea K-feldspar_Rate2.bas Anorthite_Rate.bas Forsterite_Rate.bas

Link to comment
Share on other sites

Hello Karen,

Thank you for your explanation and the relevant files. To start, I looked at your latest rate law script for K-feldspar and noticed that the variable for pre-exponential factor 1 was initially named "pre-exp1", but later in the script "pre_exp1" was called. You may want to double check variable names and values in your script to make sure that they are correct.

If I run your script, I can see that the dissolution rate for the K-feldspar changes with time. If I plot rate constant, the value remains zero throughout the simulation. The reason for this is because no value or script was entered to calculate the rate constant explicitly. Your rate law script includes the rate constant calculation within and React can't extract that value out from the rate law script. By default, the rate constant is reported as zero.

This method is completely valid for a custom rate law but if you would like for the program to calculate explicitly rate constant change over time to plot, I think a simple solution is to provide a basic script for the program to calculate the rate constant (instead of the rate law) and use either the built-in rate law or a custom equation for the rate law. This should be an easy modification with your current script. Instead of returning "rate", alter the return statement to return "R" after the line "R = r1+r2+r3" and then remove everything after that statement. After you attach the script for the rate constant calculation, you should also check the transient box so that the rate constant is evaluated at every time step. For the rate law, you can enter a custom equation "rate_con * surface *(1-Q/K)" or use the built-in option, as they are the same. For more information on field variables, please see the Heterogeneity appendix to the GWB Reactive Transport Modeling Guide.

Hope this helps,
Jia Wang
Aqueous Solutions LLC

 

Link to comment
Share on other sites

Hi Jai,

Thanks again! Typos are so easy to make and also so easy to miss. I was thinking about this last night and on my drive this morning into campus. All of the rate scripts seem to specifically identify the rate constant and as you say above, React cannot extract the extract the value from a rate law script. I was thinking that having the Arrhenius equation version of the rate constant would make my scripts more robust. However, as I am chiefly working in groundwaters systems with temperature variations from are between 25 and 50 C (mean +/- 1sigma = 30.4 =+/- 7.5 Celsius), and perhaps even more importantly, when I eventually try to link these scripts to lanthanide cycling for which I have no enthalpy data, it probably makes sense to just assume a temperature of 25 Celsius. That allows me to compute a rate constant for each of the three pH ranges, and scale the rate constants as acid and basic pH by a correction factor multiplied by the slowest rate, which occurs in the circumneutral range. This approach returns a rate that is not zero and that varies with pH and time. The React script that I attached has the rate constant computed for the circumneutral pH range. 

I will also read your suggestion very carefully and think about it some more. My next question will be in regards to precipitating minerals. I have come across the "nucleus" command in my reading and re-reading...

Best wishes,

Karen

K-felspar rate vs pH.jpg

Basalt Dissolution3.rea K-feldspar_Rate.bas

Link to comment
Share on other sites

Hi Karen,

I am not exactly sure what you are asking. With a custom rate law, you can additionally account for temperature dependence in your reactions if you desire. You can always repeat the simulation with different rate laws to see which one best describes your observation? I am not sure what would be the best fit for your work.

Best regards,
Jia

Link to comment
Share on other sites

  • 2 months later...

Hi Karen, I have put together scripts for a wide range of minerals mostly based on the Palandri and Kharaka paper. Dissolution is TST and precipitation is nucleation and crystal growth based on Helge Hellevang's work. Let me know if you want to try them out.

 

Cheers

Dirk

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