Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Kinetics and rate controlling factors
»
Store calculated rate in the RATE keyword
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Store calculated rate in the RATE keyword (Read 382 times)
ahmadreza_shojaee
Top Contributor
Posts: 25
Store calculated rate in the RATE keyword
«
on:
April 23, 2024, 10:21:10 PM »
Dear all,
I am wondering if there is a straight forward way to save/store the calculated rate in the RATE keyword? Do you know how can we store the rate of each reaction?
Kind regards,
Ahmad
Logged
dlparkhurst
Top Contributor
Posts: 3578
Re: Store calculated rate in the RATE keyword
«
Reply #1 on:
April 23, 2024, 10:29:16 PM »
GET and PUT allow you to store values. However, the RATES scripts are evaluated multiple times in one time step, so any rate that is stored may correspond to an intermediate time.
KIN_DELTA() / KIN_TIME will give you the average rate over the last time interval. It can be used in USER_PUNCH to write rates to a file or to plot in USER_GRAPH.
Logged
ahmadreza_shojaee
Top Contributor
Posts: 25
Re: Store calculated rate in the RATE keyword
«
Reply #2 on:
April 23, 2024, 10:32:53 PM »
Hi David,
Thanks for your quick reply. I am using put/get to use the calculated rates inside the RATE keyword.
I am working with IPHREEQC and I need to store them in the output using SELECTED_OUTPUT (to be stored on memory or RAM). Is there anyway to do that?
Update:
I think I found how to do that. In the selected output keyword, we have access to time interval and kinetic_reactants. By dividing dk_reactant to time interval, we can calculate rate of reaction.
Best,
Ahmad
Kind regards,
Ahmad
«
Last Edit: April 24, 2024, 11:08:07 AM by ahmadreza_shojaee
»
Logged
dlparkhurst
Top Contributor
Posts: 3578
Re: Store calculated rate in the RATE keyword
«
Reply #3 on:
April 23, 2024, 10:52:43 PM »
Use KIN_TIME for the time interval. The average rate for the last time interval can be calculated in USER_PUNCH with the following:
Code:
[Select]
rate = KIN_DELTA("Calcite") / KIN_TIME
Logged
ahmadreza_shojaee
Top Contributor
Posts: 25
Re: Store calculated rate in the RATE keyword
«
Reply #4 on:
April 24, 2024, 11:11:31 AM »
Thank you, David. I have not worked with USER_PUNCH and now I realized that it is a very fantastic keyword. We can store whatever we want in the selected output file using the USER_PUNCH keyword.
Best,
Ahmad
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Kinetics and rate controlling factors
»
Store calculated rate in the RATE keyword