Jump to content
Geochemist's Workbench Support Forum
Sign in to follow this  
forrie

script: kinetic rate

Recommended Posts

Hi Brian

 

I am trying to simulate acidification over time in a column test.

Can you please tell me what is wrong with my script for a kinetic mineral below...

 

 

 

 

IF pH > 3 THEN 20 ELSE 40

20: rate = 6.4565e-13 * surface * (1 - Q/K) * (activity("H+")^-0.11) * (activity("O2(aq)")^0.5)

GOTO 60

40: rate = rate_con * surface * (1 - Q/K) * (activity("Fe+++")^0.93) * (activity("Fe++")^-0.4)

60: RETURN rate

 

 

 

Thanks

Johan

Share this post


Link to post
Share on other sites

Hi Johan,

 

Can you explain your problem a little more? Do you receive a specific error message? Could you attach your React script and any additional files I'll need to run it?

 

Thanks,

 

Brian Farrell

Aqueous Solutions LLC

Share this post


Link to post
Share on other sites

Hi Brian

 

When I replace the built in rate law with the script the mineral does not react.

 

I thought that maybe it is again the script that is the problem as no reaction takes place. However if I specify the first condition of the script in the built in law then it runs perfectly. But I would like to run the second condition also.

 

Regards

Johan

Column test pyr.x1t

Share this post


Link to post
Share on other sites

Hi Johan,

 

Thanks for posting this. Hopefully next week I'll have something for you.

 

Regards,

Brian

Share this post


Link to post
Share on other sites

Hi Johan,

 

I've made some progress testing the rate law scripts in simpler examples, but I'm not sure yet why your X1t example isn't working.

 

Regards,

Brian

Share this post


Link to post
Share on other sites

Hi Johan,

 

We've found a small error in the rate-law parser when reading pH. This will be fixed in the next maintenance release. In the meantime, I think you can use the rate-law scrip below in its place. Be sure to verify that it is behaving as you would expect it to (perhaps run a batch model).

 

IF activity("H+") < 1e-3 THEN 20 ELSE 40

20: rate = 6.4565e-13 * surface * (1 - Q/K) * (activity("H+")^-0.11) * (activity("O2(aq)")^0.5)

GOTO 60

40: rate = rate_con * surface * (1 - Q/K) * (activity("Fe+++")^0.93) * (activity("Fe++")^-0.4)

60: RETURN rate

 

Apologies for the inconvenience.

 

Regards,

Brian

Share this post


Link to post
Share on other sites

Hi Johan,

 

Just wanted to let you know that Maintenance release 9.0.6 is out. It includes a fix for reading pH in the rate law parser, so your original basic script should work now.

 

Please let us know if you have any questions.

 

Regards,

Brian

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×