Processes > Surface Complexation
How to solve ''Reaction for species has not been defined''?
Jin Lai:
Hello, I am Jin Lai.
I study in chemical engineering.
Below is my code, please help me to correct it and let it run.
__________________________________________________________________________________________________
Title complex formation
solution hcl mol/l
units mg/l
ph -0.24
temp 110
Ce546.943asCe+4
Pd8.7079asPd+2
Pt11.0292asPt+2
Rh2.2813asRh+3
Cl72916asCl-
Al4302.2asAl+3
Fe55.04asFe+2
Ni6.74asNi+2
Mg509.92asMg+2
Zn5.722asZn+2
Ti18.242asTi(oh)4
solution_master_species
Cl Cl- 0 Cl 35.453
Pd Pd+2 -2 Pd 106.42
Pt Pt+2 -2 Pt 195.08
Rh Rh+2 0 Rh 102.906
Rh(2) Rh+2 0 Rh 102.906
Rh(3) Rh+3 -2 Rh 102.906
H H+ -1 H 1.008
H(0) H2 0 H 1.008
H(1) H+ -1 H 1.008
Ce Ce+3 0 Ce 140.12
Ce(2) Ce+2 0 Ce 140.12
Ce(3) Ce+3 0 Ce 140.12
Ce(4) Ce+4 0 Ce 140.12
Al Al+3 0 Al 26.982
Fe Fe+2 0 Fe 55.847
Fe(2) Fe+2 0 Fe 55.847
Fe(3) Fe+3 -2 Fe 55.847
Ni Ni+2 0 Ni 58.693
Mg Mg+2 0 Mg 24.305
Zn Zn+2 0 Zn 65.39
Ti Ti(OH)4 0 Ti 47.87
solution_species
1.000H+ = H+
log_k 0.000
Pd+2 = Pd+2
log_k 0
1.0000 Pd++ + 1.0000 Cl- = PdCl+
log_k 6.0993
2.0000 Cl- + 1.0000 Pd++ = PdCl2
log_k +10.7327
3.0000 Cl- + 1.0000 Pd++ = PdCl3-
log_k +13.0937
4.0000 Cl- + 1.0000 Pd++ = PdCl4--
log_k +15.1615
1.0000 Pd++ + 1.0000 H2O = PdO +2.0000 H+
log_k -2.19
1.0000 Pd++ + 1.0000 H2O = PdOH+ +1.0000 H+
log_k -1.0905
1.000Pt+2 = Pt+2
log_k 0.000
1.000Cl- + 1.000Pt+2 = PtCl+
log_k 8.692
2.000Cl- + 1.000Pt+2 = PtCl2
log_k 15.515
3.000Cl- + 1.000Pt+2 = PtCl3-
log_k 18.526
4.000Cl- + 1.000Pt+2 = PtCl4-2
log_k 20.057
Pt + 0.500O2 + 2.000H+ = 1.000Pt+2 + 1.000H2O
log_k -2.157
Pt+2 + OH- = Pt(OH)+
log_k 24.91
Pt+2 + 2OH- = Pt(OH)2
log_k 28.81
1.000Rh+2 = Rh+2
log_k 0.000
Rh+3 = Rh+3
log_k 0.0
0.250O2 + 1.000H+ + 1.000Rh+2 = Rh+3 + 0.500H2O
log_k 3.356
1.000Cl- + 1.000Rh+2 = RhCl+
log_k -0.207
1.000Cl- + 1.000Rh+3 = RhCl+2
log_k 2.022
2.000Cl- + 1.000Rh+3 = RhCl2+
log_k 3.303
2.000Cl- + 1.000Rh+2 = RhCl2
log_k -0.772
3.000Cl- + 1.000Rh+3 = RhCl3
log_k 3.338
3.000Cl- + 1.000Rh+2 = RhCl3-
log_k -2.093
4.000Cl- + 1.000Rh+3 = RhCl4-
log_k 3.300
4.000Cl- + 1.000Rh+2 = RhCl4-2
log_k -3.297
1.000Rh+3 + 1.000H2O = RhO+ + 2.000H+
log_k -5.402
1.000Rh+2 + 1.000H2O = RhO + 2.000H+
log_k -15.950
1.000Rh+2 + 1.000H2O = RhOH+ + 1.000H+
log_k -7.835
1.000Rh+3 + 1.000H2O = RhOH+2 + 1.000H+
log_k -2.499
Rh + 0.500O2 + 2.000H+ = 1.000Rh+2 + 1.000H2O
log_k 22.694
Rh+3 + 2H2O = Rh(OH)2+ + 2H+
log_k -6.5
Rh+3 + 3H2O = Rh(OH)3 + 3H+
log_k -10.5
Rh+3 4H2O = Rh(OH)4- + 4H+
log_k -17.7
Rh+3 + 5H2O = Rh(OH)5-2 + 5H+
log_k -26.9
Rh+3 + 6H2O = Rh(OH)6-3 + 6H+
log_k -37.2
1.000Ce+3 = Ce+3
log_k 0.000
1.000Ce+3 + 0.500H2O = Ce+2 + 0.250O2 + 1.000H+
log_k -85.049
0.250O2 + 1.000Ce+3 + 1.000H+ = Ce+4 + 0.500H2O
log_k -8.042
1.000Ce+3 + 1.000Cl- = CeCl+2
log_k 0.321
1.000Ce+3 + 2.000Cl- = CeCl2+
log_k 0.056
1.000Ce+3 + 3.000Cl- = CeCl3
log_k -0.356
1.000Ce+3 + 4.000Cl- = CeCl4-
log_k -0.695
1.000Al+3 = Al+3
log_k 0.000
1.000Fe+2 = Fe+2
log_k 0.000
0.250O2 + 1.000Fe+2 + 1.000H+ = Fe+3 + 0.500H2O
log_k 8.490
1.000Fe+3 + 4.000H2O = Fe(OH)4- + 4.000H+
log_k -21.604
2.000Fe+3 + 2.000H2O = Fe2(OH)2+4 + 2.000H+
log_k -2.922
1.000Cl- + 1.000Fe+2 = FeCl+
log_k -0.160
1.000Cl- + 1.000Fe+3 = FeCl+2
log_k 1.520
2.000Cl- + 1.000Fe+3 = FeCl2+
log_k 0.700
2.000Cl- + 1.000Fe+2 = FeCl2
log_k -1.740
1.000Fe+2 + 1.000H2O = FeO + 2.000H+
log_k -20.601
1.000Fe+3 + 1.000H2O = FeO+ + 2.000H+
log_k -5.483
1.000Fe+2 + 1.000H2O = FeOH+ + 1.000H+
log_k -9.501
1.000Fe+3 + 1.000H2O = FeOH+2 + 1.000H+
log_k -2.191
1.000Fe+3 + 2.000H2O = HFeO2 + 3.000H+
log_k -14.302
1.000Fe+2 + 2.000H2O = HFeO2- + 3.000H+
log_k -31.932
1.000Ni+2 = Ni+2
log_k 0.000
1.000Ni+2 + 2.000H2O = HNiO2- + 3.000H+
log_k -31.502
1.000Cl- + 1.000Ni+2 = NiCl+
log_k 0.151
1.000Ni+2 + 1.000H2O = NiO + 2.000H+
log_k -19.501
1.000Ni+2 + 1.000H2O = NiOH+ + 1.000H+
log_k -9.501
1.000Mg+2 = Mg+2
log_k 0.000
4.000Mg+2 + 4.000H2O = Mg4(OH)4+4 + 4.000H+
log_k -39.754
4.000Mg+2 + 4.000H2O = Mg4(OH)4+4 + 4.000H+
log_k -39.754
1.000Cl- + 1.000Mg+2 = MgCl+
log_k 0.350
1.000Mg+2 + 1.000H2O = MgOH+ + 1.000H+
log_k -11.681
1.000Zn+2 = Zn+2
log_k 0.000
1.000Zn+2 + 2.000H2O = HZnO2- + 3.000H+
log_k -28.140
1.000Cl- + 1.000Zn+2 = ZnCl+
log_k 0.394
2.000Cl- + 1.000Zn+2 = ZnCl2
log_k 0.470
3.000Cl- + 1.000Zn+2 = ZnCl3-
log_k 0.537
4.000Cl- + 1.000Zn+2 = ZnCl4-2
log_k -0.384
1.000Zn+2 + 1.000H2O = ZnO + 2.000H+
log_k -19.173
1.000Zn+2 + 2.000H2O = ZnO2-2 + 4.000H+
log_k -40.518
1.000Zn+2 + 1.000H2O = ZnOH+ + 1.000H+
log_k -8.674
1.000Ti(OH)4 = Ti(OH)4
log_k 0.000
phases
fix_H+
H+ = H+
log_k 0
equilibrium_phases
fix_H+ 0.24
end
_________________________________________________________________________________________________
The output just tell me that,
ERROR: Elements in species have not been tabulated, Pt.
ERROR: Reaction for species has not been defined, Pt.
ERROR: Elements in species have not been tabulated, Rh.
ERROR: Reaction for species has not been defined, Rh.
ERROR: Calculations terminating due to input errors.
How can I solve '"Elements in species have not been tabulated" and "Reaction for species has not been defined"?
Any advice is really appreciated. I will try to correct and study harder.
I wish you a nice day!
Jin Lai.
dlparkhurst:
You have defined reactions in SOLUTION_SPECIES with "Pt" and "Rh" on the left-hand side of the equation. They must be defined once as the first species on the right-handed side of an equation. Consider whether these are aqueous species or are solids, which should be defined in PHASES.
Jin Lai:
I appreciate your help.
But I am confused why the other element like Pd or Fe don't need to define the first species on the right-handed side of an equation and no need to consider whether they are aqueous species or solids in phase.
And how do I define the Pt and Rh of the first species on the right-handed side of an equation and consider whether they are aqueous species or solids in phase? Is it also by the database?
I am very sorry that this is my first time writing the coding. Therefore, I am pretty unfamiliar with the limit of the code. Now I am trying to know the limit on the manual.
Thank you reply to me.
I wish you a nice day!
Jin Lai.
Jin Lai:
Dear Sir/Madam,
I tried following your suggestion to consider whether the species are aqueous or solid in PHASES, but still, I have an error in element Rh.
Do I still need to consider something I forget?
I appreciate your kind help.
The following is the coding that I correct.
_______________________________________________________________________________________________________
Input file: C:\Users\Jin\Desktop\HCl complex formation.pqi
Output file: C:\Users\Jin\Desktop\HCl complex formation.pqo
Database file: C:\Program Files (x86)\USGS\Phreeqc Interactive 3.7.3-15968\database\llnl.dat
------------------
Reading data base.
------------------
LLNL_AQUEOUS_MODEL_PARAMETERS
NAMED_EXPRESSIONS
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------
DATABASE C:\Program Files (x86)\USGS\Phreeqc Interactive 3.7.3-15968\database\llnl.dat
Title complex formation
solution hcl mol/l
units mg/L
ph -0.24
temp 110
Ce546.943asCe+4
Pd8.7079asPd+2
Pt11.0292asPt+2
Rh2.2813asRh+3
Cl72916asCl-
Al4302.2asAl+3
Fe55.04asFe+2
Ni6.74asNi+2
Mg509.92asMg+2
Zn5.722asZn+2
Ti18.242asTi(oh)4
solution_master_species
Cl Cl- 0 Cl 35.453
Pd Pd+2 -2 Pd 106.42
Pt Pt+2 -2 Pt 195.08
Rh Rh+2 0 Rh 102.906
Rh(2) Rh+2 0 Rh 102.906
Rh(3) Rh+3 -2 Rh 102.906
H H+ -1 H 1.008
H(0) H2 0 H 1.008
H(1) H+ -1 H 1.008
Ce Ce+3 0 Ce 140.12
Ce(2) Ce+2 0 Ce 140.12
Ce(3) Ce+3 0 Ce 140.12
Ce(4) Ce+4 0 Ce 140.12
Al Al+3 0 Al 26.982
Fe Fe+2 0 Fe 55.847
Fe(2) Fe+2 0 Fe 55.847
Fe(3) Fe+3 -2 Fe 55.847
Ni Ni+2 0 Ni 58.693
Mg Mg+2 0 Mg 24.305
Zn Zn+2 0 Zn 65.39
Ti Ti(OH)4 0 Ti 47.87
solution_species
1.000H+ = H+
log_k 0.000
Pd+2 = Pd+2
log_k 0
1.0000 Pd++ + 1.0000 Cl- = PdCl+
log_k 6.0993
2.0000 Cl- + 1.0000 Pd++ = PdCl2
log_k +10.7327
3.0000 Cl- + 1.0000 Pd++ = PdCl3-
log_k +13.0937
4.0000 Cl- + 1.0000 Pd++ = PdCl4--
log_k +15.1615
1.0000 Pd++ + 1.0000 H2O = PdO +2.0000 H+
log_k -2.19
1.0000 Pd++ + 1.0000 H2O = PdOH+ +1.0000 H+
log_k -1.0905
Pt=Pt
1.000Pt+2 = Pt+2
log_k 0.000
1.000Cl- + 1.000Pt+2 = PtCl+
log_k 8.692
2.000Cl- + 1.000Pt+2 = PtCl2
log_k 15.515
3.000Cl- + 1.000Pt+2 = PtCl3-
log_k 18.526
4.000Cl- + 1.000Pt+2 = PtCl4-2
log_k 20.057
Pt + 0.500O2 + 2.000H+ = 1.000Pt+2 + 1.000H2O
log_k -2.157
Pt+2 + OH- = Pt(OH)+
log_k 24.91
Pt+2 + 2OH- = Pt(OH)2
log_k 28.81
1.000Rh+2 = Rh+2
log_k 0.000
Rh+3 = Rh+3
log_k 0.0
0.250O2 + 1.000H+ + 1.000Rh+2 = Rh+3 + 0.500H2O
log_k 3.356
1.000Cl- + 1.000Rh+2 = RhCl+
log_k -0.207
1.000Cl- + 1.000Rh+3 = RhCl+2
log_k 2.022
2.000Cl- + 1.000Rh+3 = RhCl2+
log_k 3.303
2.000Cl- + 1.000Rh+2 = RhCl2
log_k -0.772
3.000Cl- + 1.000Rh+3 = RhCl3
log_k 3.338
3.000Cl- + 1.000Rh+2 = RhCl3-
log_k -2.093
4.000Cl- + 1.000Rh+3 = RhCl4-
log_k 3.300
4.000Cl- + 1.000Rh+2 = RhCl4-2
log_k -3.297
1.000Rh+3 + 1.000H2O = RhO+ + 2.000H+
log_k -5.402
1.000Rh+2 + 1.000H2O = RhO + 2.000H+
log_k -15.950
1.000Rh+2 + 1.000H2O = RhOH+ + 1.000H+
log_k -7.835
1.000Rh+3 + 1.000H2O = RhOH+2 + 1.000H+
log_k -2.499
Rh + 0.500O2 + 2.000H+ = 1.000Rh+2 + 1.000H2O
log_k 22.694
Rh+3 + 2H2O = Rh(OH)2+ + 2H+
log_k -6.5
Rh+3 + 3H2O = Rh(OH)3 + 3H+
log_k -10.5
Rh+3 4H2O = Rh(OH)4- + 4H+
log_k -17.7
Rh+3 + 5H2O = Rh(OH)5-2 + 5H+
log_k -26.9
Rh+3 + 6H2O = Rh(OH)6-3 + 6H+
log_k -37.2
1.000Ce+3 = Ce+3
log_k 0.000
1.000Ce+3 + 0.500H2O = Ce+2 + 0.250O2 + 1.000H+
log_k -85.049
0.250O2 + 1.000Ce+3 + 1.000H+ = Ce+4 + 0.500H2O
log_k -8.042
1.000Ce+3 + 1.000Cl- = CeCl+2
log_k 0.321
1.000Ce+3 + 2.000Cl- = CeCl2+
log_k 0.056
1.000Ce+3 + 3.000Cl- = CeCl3
log_k -0.356
1.000Ce+3 + 4.000Cl- = CeCl4-
log_k -0.695
1.000Al+3 = Al+3
log_k 0.000
1.000Fe+2 = Fe+2
log_k 0.000
0.250O2 + 1.000Fe+2 + 1.000H+ = Fe+3 + 0.500H2O
log_k 8.490
1.000Fe+3 + 4.000H2O = Fe(OH)4- + 4.000H+
log_k -21.604
2.000Fe+3 + 2.000H2O = Fe2(OH)2+4 + 2.000H+
log_k -2.922
1.000Cl- + 1.000Fe+2 = FeCl+
log_k -0.160
1.000Cl- + 1.000Fe+3 = FeCl+2
log_k 1.520
2.000Cl- + 1.000Fe+3 = FeCl2+
log_k 0.700
2.000Cl- + 1.000Fe+2 = FeCl2
log_k -1.740
1.000Fe+2 + 1.000H2O = FeO + 2.000H+
log_k -20.601
1.000Fe+3 + 1.000H2O = FeO+ + 2.000H+
log_k -5.483
1.000Fe+2 + 1.000H2O = FeOH+ + 1.000H+
log_k -9.501
1.000Fe+3 + 1.000H2O = FeOH+2 + 1.000H+
log_k -2.191
1.000Fe+3 + 2.000H2O = HFeO2 + 3.000H+
log_k -14.302
1.000Fe+2 + 2.000H2O = HFeO2- + 3.000H+
log_k -31.932
1.000Ni+2 = Ni+2
log_k 0.000
1.000Ni+2 + 2.000H2O = HNiO2- + 3.000H+
log_k -31.502
1.000Cl- + 1.000Ni+2 = NiCl+
log_k 0.151
1.000Ni+2 + 1.000H2O = NiO + 2.000H+
log_k -19.501
1.000Ni+2 + 1.000H2O = NiOH+ + 1.000H+
log_k -9.501
1.000Mg+2 = Mg+2
log_k 0.000
4.000Mg+2 + 4.000H2O = Mg4(OH)4+4 + 4.000H+
log_k -39.754
4.000Mg+2 + 4.000H2O = Mg4(OH)4+4 + 4.000H+
log_k -39.754
1.000Cl- + 1.000Mg+2 = MgCl+
log_k 0.350
1.000Mg+2 + 1.000H2O = MgOH+ + 1.000H+
log_k -11.681
1.000Zn+2 = Zn+2
log_k 0.000
1.000Zn+2 + 2.000H2O = HZnO2- + 3.000H+
log_k -28.140
1.000Cl- + 1.000Zn+2 = ZnCl+
log_k 0.394
2.000Cl- + 1.000Zn+2 = ZnCl2
log_k 0.470
3.000Cl- + 1.000Zn+2 = ZnCl3-
log_k 0.537
4.000Cl- + 1.000Zn+2 = ZnCl4-2
log_k -0.384
1.000Zn+2 + 1.000H2O = ZnO + 2.000H+
log_k -19.173
1.000Zn+2 + 2.000H2O = ZnO2-2 + 4.000H+
log_k -40.518
1.000Zn+2 + 1.000H2O = ZnOH+ + 1.000H+
log_k -8.674
1.000Ti(OH)4 = Ti(OH)4
log_k 0.000
PHASES
fix_H+
H+ = H+
log_k 0
Rh(element)
Rh + 0.500O2 + 2.000H+ = 1.000Rh+2 + 1.000H2O
log_k 22.694
delta_h -169.367 #kJ/mol #98sas/sho
analytical_expression -4.2198365E+2 -6.5807108E-2 3.1965536E+4 1.5071669E+2 -1.409249E+6
Rh2O(s)
Rh2O + 0.6666675O2 + 4.66667H+ = 1.33333Rh+2 + 0.66667Rh+3 + 2.333335H2O
log_k 32.170
delta_h -297.073 #kJ/mol #Internal calculation
analytical_expression -9.2880217E+2 -1.4590429E-1 6.5217476E+4 3.3096914E+2 -2.9537693E+6
Rh2O3(s)
Rh2O3 + 6.000H+ = 2.000Rh+3 + 3.000H2O
log_k 12.342
delta_h -213.359 #kJ/mol #Internal calculation
analytical_expression -1.0500191E+3 -1.6722402E-1 6.5471364E+4 3.7474604E+2 -3.0808349E+6
Pt(element)
Pt + 0.500O2 + 2.000H+ = 1.000Pt+2 + 1.000H2O
log_k -2.157
delta_h -24.919 #kJ/mol #By convention
PtS2
PtS2 + 0.750H2O = 1.000Pt+2 + 1.500HS- + 0.250S2O3-2
log_k -74.387
delta_h 392.207 #kJ/mol #Internal calculation
equilibrium_phases
fix_H+ 0.24
Rh(element) 0 0
Rh2O(s) 0 0
Rh2O3(s) 0 0
Pt(element) 0 0
PtS2 0 0
end
-----
TITLE
-----
complex formation
ERROR: Elements in species have not been tabulated, Rh.
ERROR: Reaction for species has not been defined, Rh.
ERROR: Calculations terminating due to input errors.
-------------------------------
End of Run after 0.311 Seconds.
-------------------------------
dlparkhurst:
The first species on the right-hand-side of the equation is the species that is being defined in the SOLUTION_SPECIES data block. You have two definitions for the aqueous species Rh+2:
--- Code: --- 1.000Rh+2 = Rh+2
log_k 0.000
...
Rh + 0.500O2 + 2.000H+ = 1.000Rh+2 + 1.000H2O
log_k 22.694
--- End code ---
The first one is a correct definition for the master species Rh+2; the master species for element Rh is defined in the SOLUTION_MASTER_SPECIES data block. The second definition is not correct. Only aqueous species are defined in SOLUTION_SPECIES. If you intend to define Rh as an aqueous species, then the reaction needs to be reversed to have Rh as the first species on the right-hand-side, and the log_k would be -22.694.
Navigation
[0] Message Index
[#] Next page
Go to full version