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
»
Database selection and modification
»
Adding Struvite to Database
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Adding Struvite to Database (Read 2505 times)
demanderx
Contributor
Posts: 3
Adding Struvite to Database
«
on:
October 26, 2017, 05:55:24 AM »
Cheers to all, I am trying to add Struvite to Phreeqc.Dat database or WATEQ4F as it is not present in any of those.
I start by saying that I am not very good with databases, but I give it a shot
So I added this lines to the database Phreeqc for example
Struvite 390
MgNH4PO4:6H2O = Mg+2 + NH4+ PO4-3 + 6H2O
log_k -13.26
When I set this modified database to Phreeqc it pops an error saying
ERROR: Elements in species have not been tabulated, NH4
ERROr: Reaction for species NH4 has not been defined
ERROR: Calculation terminating due to input errors.
For what I understand and for what I could read, NH4 is not defined is that it? Do I neeed to Define NH4 as Master Species? what do I have to do to fix this errors that appeared? I tried to find any kind of tutorial to modify the database without screwing it up, but I couldn't find any or maybe I totally missed an obvious one.
Thank you so much for any help you can provide
Logged
dlparkhurst
Top Contributor
Posts: 2485
Re: Adding Struvite to Database
«
Reply #1 on:
October 26, 2017, 06:54:08 PM »
You are missing a plus sign.
MgNH4PO4:6H2O = Mg+2 + NH4+ + PO4-3 + 6H2O
Logged
demanderx
Contributor
Posts: 3
Re: Adding Struvite to Database
«
Reply #2 on:
October 26, 2017, 11:51:14 PM »
Quote from: dlparkhurst on October 26, 2017, 06:54:08 PM
You are missing a plus sign.
MgNH4PO4:6H2O = Mg+2 + NH4+ + PO4-3 + 6H2O
Oh thanks didn't even noticed the "+" was missing
now the error message changed to
ERROR: Elements in species have not been tabulated, NH4+
ERROR: Reaciton for species has not been defined, NH4+
I guess somewhere on the database I have to define NH4+, I saw for example in WATEQ4F NH3 is defined through NH4+, by the follwing lines
#NH3 26
NH4+ = NH3 + H+
log_k -9.252
delta_h 12.48 kcal
-analytic 0.6322 -0.001225 -2835.76
-gamma 2.5 0.0
Do I have to do something like this for NH4+? for what I am guessing Log_k is the equilibrium cosntant at 25ºC, right?
Logged
dlparkhurst
Top Contributor
Posts: 2485
Re: Adding Struvite to Database
«
Reply #3 on:
October 27, 2017, 12:41:39 AM »
You should not need to define NH4+ if you are using phreeqc.dat or wateq4f.dat. The following should work.
PHASES
Struvite 390
MgNH4PO4:6H2O = Mg+2 + NH4+ + PO4-3 + 6H2O
log_k -13.26
END
SOLUTION
EQUILIBRIUM_PHASES
Struvite 0 10
END
It will not work with Amm.dat. Ah, Tony Appelo tends to use the name phreeqc.dat for Amm.dat. In that database, NH3 is named Amm. If you are using a database where Amm is used, you should use the following definition.
PHASES
Struvite 390
MgAmmHPO4:6H2O = Mg+2 + AmmH+ + PO4-3 + 6H2O
log_k -13.26
END
Logged
demanderx
Contributor
Posts: 3
Re: Adding Struvite to Database
«
Reply #4 on:
October 27, 2017, 05:26:08 AM »
thank you once again, the errors in database stopped
I guess I might have chosen the wrong Log_k as struvite still appears as unsaturated. Have to look better, to see if i'm forgetting anything
Logged
rose24kwu
Contributor
Posts: 1
Re: Adding Struvite to Database
«
Reply #5 on:
October 25, 2020, 03:46:33 PM »
May I know how you added struvite to the database?
I am wondering whether the value of log_k in "solution species" and "PHASES" should be the same or not?
Logged
dlparkhurst
Top Contributor
Posts: 2485
Re: Adding Struvite to Database
«
Reply #6 on:
October 25, 2020, 04:01:23 PM »
No. Use PHASES to define a mineral. Use SOLUTION_SPECIES to define a species that exists in aqueous solution, like NH4+, the ammonium ion.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Database selection and modification
»
Adding Struvite to Database