Jump to content

Rate Law


Ozan
 Share

Recommended Posts

I am trying to use the rate law attached in GWB react. I tried to define a custom rate law and wrote a script. However, calculated rate is not correct and does not change through time. I would be happy if you could help me with this. The script I wrote is below. Here is the publication I used for rate law https://pubs.usgs.gov/of/2004/1068/ . I would also be happy if you could let me know if there is any way to put three different k and E values without defining a custom rate law.

Thank you!

image.png.dd145da60d7edbb03c27efe68d5be10c.png

LET kacid = 5.012 * 10^(-1)   * 10^(-4)
LET kneut = 1.549 * 10^(-6)  * 10^(-4)
LET kbase = 3.311 * 10^(-4)  * 10^(-4)
LET Eacid = 14.4    * 10^(3)
LET Eneut = 23.5   * 10^(3)
LET Ebase = 35.4   * 10^(3)
LET nacid = 1
LET nbase = 1
LET m1 = 1
LET m2 = 1
LET m3 = 1

x = kacid * EXP ((-Eacid / 8.314) * ((1/TK)-(1/298.15))) * (activity("H+")^(nacid)) * (1-(QoverK)^(m1))^(m1) 
y = kneut * EXP ((-Eneut / 8.314) * ((1/TK)-(1/298.15))) * (1-(QoverK)^(m2))^(m2) 
z = kbase * EXP ((-Ebase / 8.314) * ((1/TK)-(1/298.15))) * (activity("H+")^(nbase)) * (1-(QoverK)^(m3))^(m3)
rate = surface * (x + y + z)
 

Link to comment
Share on other sites

Hello Ozan,

I think the problem with your script is that you don’t have a return statement at the end. Can you try again with the statement

“RETURN rate “

at the bottom? For more examples, please refer to section 5.2 Rate law scripts in the Reaction Modeling Guide. If you would like for someone to take a closer look at the issue, please attach your model input file and the basic script file.

If you want to prescribe different k and E values in the same rate law, then you would need to implement a custom rate law. The built in format will only allow one value of each.

Hope this helps,

Jia Wang

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

×
×
  • Create New...