Ozan Posted May 12, 2020 Share Posted May 12, 2020 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! 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) Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted May 13, 2020 Share Posted May 13, 2020 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 Quote Link to comment Share on other sites More sharing options...
Ozan Posted May 16, 2020 Author Share Posted May 16, 2020 Thank you! RETURN worked! Ozan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.