Jump to content
Geochemist's Workbench Support Forum

Recommended Posts

Posted

I am trying to implement a custom rate law script (see attached)for albite using React but keep getting the error message "could not evaluate rate law". I am using the rate law and rate parameters included in Palandri and Kharaka (2004; A compilation of rate parameters of water-mineral interaction kinetics for application to geochemical modelling). I cannot see where the problem is with the script so any advice gratefully received.

albite kinetic file.rea

Posted

Hi Ross:

 

I simplified the script quite a bit, and am still getting a syntax error in line 1, even though the format appears to be correct. I'll need to check with the developers to see if I'm doing something wrong here.

 

However, there's a simple work-around. Save the file in notepad with a .bas extension, and load it in as a Rate law script file.

 

Let me know if that resolves the issue.

 

Regards,

 

Tom Meuzelaar

RockWare, Inc.

Posted

Hi Ross:

 

It turns our that the rate law script, as written in the v8 Reaction Modeling user's guide (page 56), reflects command line syntax. The actual code for the direct script editor looks exactly like the code you would put in a .bas file- you only need the code in between the brackets- not the 'kinetic Albite rate_law = { }' part.

 

I hope that makes sense...

 

We'll update the User's Guide to be a little more clear.

 

Regards,

 

Tom Meuzelaar

RockWare, Inc.

Posted

Hi Ross:

 

Yes, your rate law evaluates to zero in the output file. I can't spot the issue right off- troubleshooting rate law scripts can tedious and time-consuming. What I recommend is that you simplify the script and first test your neutral, acid and base rates individually. Then put them together into your combined rate law.

 

Hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Posted

Tom,

 

Thank you for looking at the script for me - managed to spend a little more time on this and found that the problem was with the quotes on H+ activity (thought it would be obvious!). Anyway, for the benefit of the forum, the attached script now works and so will act as a template for those using the kinetic data in Palandri and Kharaka 2004.

albite.rea

Posted

Hi Ross:

 

Glad you were able to get it working- yes, usually the problem for has been a missing quote here, or an extra parenthesis there.... The devil is in the details.

 

I appreciate you sharing with the User's Group.

 

Regards,

 

Tom Meuzelaar

RockWare, Inc.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...