PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Database Error
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Database Error  (Read 269 times)

victoriaade

  • Contributor
  • Posts: 3
Database Error
« on: October 21, 2022, 12:30:53 PM »
Hi,

I am having similar issues with mine with the errors
 ERROR: Elements in species have not been tabulated, DFOB3-.
ERROR: Reaction for species has not been defined, DFOB3-.
I adapted the minteq database adding:

SOLUTION_MASTER_SPECIES
DFOB      DFOB-3          1.0     560.684 560.684

SOLUTION_SPECIES

DFOB-3 = DFOB-3
   log_k 0

SOLUTION_SPECIES

DFOB-3 + H+ = H(DFOB)-2
   log_k   11.45
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
DFOB-3 + 2H+ = H2(DFOB)-
   log_k   21.44
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
DFOB-3 + 3H+ = H3(DFOB)
   log_k   21.44
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
Zn+2 + DFOB3- = Zn(DFOB)-
   log_k   12.027
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109973
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Zn+2 + H+ + DFOB3- = ZnH(DFOB)
   log_k   22.105
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109975
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Zn+2 + 2H+ + DFOB3- = ZnH2(DFOB)+
   log_k   27.25
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109977
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+3 + DFOB3- = Fe(DFOB)
   log_k   33.07
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109973
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+3 + H+ + DFOB3-  = FeH(DFOB)+
   log_k   43.47
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109975
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+3 + 2H+ + DFOB3- = FeH2(DFOB)+2
   log_k   44.15
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109977
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+2 + H+ + DFOB3- = FeH(DFOB)
   log_k   22.54
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109977
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+2 + 2H+ + DFOB3- = FeH2(DFOB)+
   log_k   29.41
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109977
      #        log K source:   NIST46.3                     
      #      Delta H source:   NIST46.3                     
      #T and ionic strength:   
Fe+2 + 3H+ + DFOB3- = FeH3(DFOB)+2
   log_k   34.99
   delta_h   0   kJ
   -gamma   0   0
      #                  Id:   4109977
      #        log K source:   NIST46.3                     
      #      Delta H source:   N
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Database Error
« Reply #1 on: October 21, 2022, 03:26:50 PM »
An element name must have a capital letter followed by zero or more lower case letters. "DFOB" is interpreted as composed of elements D, F, O, and B. It looks like you want to define DFOB as an "element", so that it is not composed of additional elements. The name Dfob would be legal, and you would have to replace all instances of DFOB with Dfob.

Code: [Select]
SOLUTION_MASTER_SPECIES
Dfob      Dfob-3          1.0     560.684 560.684
« Last Edit: October 21, 2022, 03:29:29 PM by dlparkhurst »
Logged

MichaelZ20

  • Top Contributor
  • Posts: 105
Re: Database Error
« Reply #2 on: October 24, 2022, 07:09:19 PM »
Dear David,
How can the alkalinity of Dfob in SOLUTION_MASTER_SPECIES be estimated?
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Database Error
« Reply #3 on: October 24, 2022, 07:28:31 PM »
Determine the predominant species at 4.5 for a pure Dfob solution. Alkalinity will be the number of hydrogen ions needed to convert the master species (Dfob-3 in your definitions) to the predominant species.
Logged

MichaelZ20

  • Top Contributor
  • Posts: 105
Re: Database Error
« Reply #4 on: October 24, 2022, 09:09:19 PM »
Thank you, David!
What initial value of alkalinity should be set in SOLUTION_MASTER_SPECIES?
What to do if there are several species with close concentrations? Should I sum their portions multiplied by the required numbers of hydrogen ions?
« Last Edit: October 25, 2022, 05:57:31 AM by MichaelZ20 »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Database Error
« Reply #5 on: October 24, 2022, 09:42:28 PM »
Alkalinity is a little arbitrary in detail. I said pH 4.5 because that is the approximate endpoint for an alkalinity titration of natural waters. If you were working with natural orgainic acids, you might continue a titration to lower pH.

It is possible to assign a non-integer number in SOLUTION_MASTER_SPECIES if two or more species exist at your normal end point. You can also perform a numerical titration with PHREEQC to estimate the alkalinity value for SOLUTION_MASTER_SPECIES; you would divide the equivalents of acid added to an endpoint by the equivalents of pure base to obtain the value for SOLUTION_MASTER_SPECIES. 
Logged

MichaelZ20

  • Top Contributor
  • Posts: 105
Re: Database Error
« Reply #6 on: October 25, 2022, 06:56:26 AM »
Is this right?

SOLUTION_MASTER_SPECIES
 Dfob      Dfob-3          -2.0     560.684 560.684
#Dfob      Dfob-3           0.0     560.684 560.684  # C25H48N6O8 ; for alkalinity determination

SOLUTION_SPECIES
Dfob-3 = Dfob-3
   log_k 0

SOLUTION_SPECIES
Dfob-3 + H+ = H(Dfob)-2
   log_k   11.45

Dfob-3 + 2H+ = H2(Dfob)-
   log_k   21.44

Dfob-3 + 3H+ = H3(Dfob)
   log_k   21.44

END

PHASES
Fix_pH
   H+ = H+
   log_k 0
END

EQUILIBRIUM_PHASES
Fix_pH  -4.5  HCl

SOLUTION 1
pH 7 charge
Dfob 0.001 

PRINT
-alkalinity
END

# SOLUTION_MASTER_SPECIES
# Dfob      Dfob-3           0.0     560.684 560.684  # C25H48N6O8

#   Total alkalinity (eq/kgw)  =  -3.383e-05

#   Species          Alkalinity    Molality   Alk/Mol

#   H+               -3.183e-05   3.183e-05     -1.00
#   H2(Dfob)-        -2.000e-06   1.000e-06     -2.00   # ~100% ;  Dfob-3 + 2H+ = H2(Dfob)- ; -2 * 1 = -2
#   OH-               3.222e-10   3.222e-10      1.00
#   H3(Dfob)         -9.424e-11   3.141e-11     -3.00
#   H(Dfob)-2        -3.301e-12   3.301e-12     -1.00
« Last Edit: October 25, 2022, 06:58:39 AM by MichaelZ20 »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Database Error
« Reply #7 on: October 25, 2022, 04:06:21 PM »
Looks right, but you need to assign alkalinity of +2, rather than -2, to Dfob-3 in SOLUTION_MASTER_SPECIES.

It's suspicious that H3(Dfob) has the same log K as H2(Dfob)-. Given the data Dfob has been converted to the predominant species H2(Dfob)- by about pH 6, and H3(Dfob) is irrelevant. It takes two H+ to convert Dfob-3 (the master species) to H2(Dfob)-, which gives you the assigned alkalinity. Note in the simulation that Dfob-3 is not the predominant species in the initial solution. The alkalinity of the initial solution is composed of OH-, HDfob-2, and Dfob-3.

Code: [Select]
SOLUTION_MASTER_SPECIES
Dfob      Dfob-3          2.0     560.684 560.684
SOLUTION_SPECIES
Dfob-3 = Dfob-3
   log_k 0
Dfob-3 + H+ = H(Dfob)-2
   log_k   11.45
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
Dfob-3 + 2H+ = H2(Dfob)-
   log_k   21.44
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
Dfob-3 + 3H+ = H3(Dfob)
   log_k   21.44
   delta_h   0    kJ
   -gamma   0   0
      #                  Id:   3309171
      #        log K source:   NIST46.2                     
      #      Delta H source:   NIST46.2                     
      #T and ionic strength:   
SOLUTION
pH 11 charge
Dfob 1
Na   3

REACTION 1
HCl 1
3e-3 in 15
USER_GRAPH 1
    -headings               rxn pH H3Dfob H2Dfob- HDfob-2 Dfob-3
    -axis_titles            "HCl added, moles" "pH" "Molality"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X RXN
15 GRAPH_Y -LA("H+")
20 GRAPH_SY MOL("H3(Dfob)"), MOL("H2(Dfob)-"), MOL("H(Dfob)-2"), MOL("Dfob-3")
  -end
    -active                 true
Logged

MichaelZ20

  • Top Contributor
  • Posts: 105
Re: Database Error
« Reply #8 on: October 25, 2022, 06:26:15 PM »
Dear David,
Thank you for your advice!
Additional question: what is the "pure base" in your example?
"you would divide the equivalents of acid added to an endpoint by the equivalents of pure base to obtain the value for SOLUTION_MASTER_SPECIES"
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Database Error
« Reply #9 on: October 25, 2022, 07:14:53 PM »
If you add Na3Dfob to pure water, either in the SOLUTION definition or REACTION, then all of the alkalinty in the solution is due to adding the salt, even though the distribution of species is OH-, HDfob-2, and Dfob-3. It takes 2 equivalents of acid per mole (should have said moles instead of equivalents before) of Dfob-3 added to reach the end point.

By pure base, I simply meant Dfob-3.
Logged

MichaelZ20

  • Top Contributor
  • Posts: 105
Re: Database Error
« Reply #10 on: October 25, 2022, 07:41:45 PM »
David, thank you for your explanation!
Logged

victoriaade

  • Contributor
  • Posts: 3
Re: Database Error
« Reply #11 on: October 28, 2022, 12:29:42 PM »
Thanks for your help David!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Database Error
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2