Jump to content
Geochemist's Workbench Support Forum

script: kinetic rate


forrie

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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 4 weeks later...

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