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 »
  • Processes »
  • Dissolution and precipitation »
  • Looking for help to solve errors "Element or phase not defined in database"
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Looking for help to solve errors "Element or phase not defined in database"  (Read 35 times)

Max0109

  • Contributor
  • Posts: 1
Looking for help to solve errors "Element or phase not defined in database"
« on: March 13, 2023, 04:46:45 PM »
I'm running a program for the dissolution of basalt in water and calculating alkalinity. I'm using the database T_H.DAT, but it keeps giving me errors. Do I have typo mistakes in the input file T_H.DAT? Or are there some mistakes in my code? How can I solve these errors? I put my Phreeqc code below. Many thanks!
             
ERROR: Element or phase not defined in database, T.
ERROR: Element or phase not defined in database, M.
ERROR: Program terminating due to input errors.

DATABASE D:\T_H.DAT
SOLUTION_SPECIES
HCO3- = H+ + CO3-2
    log_k           10.329
    delta_h -3.561 kcal
    analytical_expression     107.8871        0.03252849      -5151.79        -38.92561       563713.9
    gamma  5.4     0.0

PHASES   
Forsterite                 
        Mg2SiO4 + 4H+ = 2Mg+2 + H4SiO4
        log_k    28.306
        delta_h -48.578 kcal
   
Diopside                       
        CaMgSi2O6 + 4H+ + 2H2O = Ca+2 + Mg+2 + 2H4SiO4
        log_k    19.894
        delta_h -32.348 kcal
   
Anorthite                     
        CaAl2Si2O8 + 8H2O = Ca+2 + 2Al(OH)4- + 2H4SiO4
        log_k   -19.714
        delta_h 11.58 kcal

CO2(g)   
        CO2 = CO2                                                                   
        log_k           -1.468
        delta_h -4.776 kcal
        -analytical     108.3865      0.01985076   -6919.53      -40.45154      669365.0
     
# Define basalt1 solution
SOLUTION 1 basalt1 solution
pH 7.0
temp 25.0
pe 4.0
redox pe
units mg/kgw
density 1.000
water 1000 # kg
pressure 2.0
Alkalinity 0 # initial alkalinity
Na 0.005
K 0
Ca 0.50.45 # 45% Ca in Anorthite
Mg 0.050.05 # 5% Mg in Forsterite
Fe 0
Mn 0
Si 0.45*0.5 # 50% Si in Anorthite
Cl 0
S(6) 0
HCO3- 0.0 # bicarbonate
CO2(g) 0.0 # carbon dioxide
END

#calculate the amount (in moles) of each mineral present in 1 kg of basalt1
EQUILIBRIUM_PHASES 1 basalt1 minerals
Forsterite 0
Diopside 0
Anorthite 0

# Add any additional information
REACTION_TEMPERATURE 25.0
REACTION_PRESSURE 2.0

# Add basalt dissolution reaction
REACTION 1 Basalt

# Set up time-dependent simulation for two weeks
TIME 0 336

# Define the reaction path
USE solution 1
USE equilibrium_phases 1
RUN_CELLS

SELECTED_OUTPUT
    -file   alkalinity.out
    -reset  false
    -step   7*24*60
    -molalities

END
Modify message
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Looking for help to solve errors "Element or phase not defined in database"
« Reply #1 on: March 13, 2023, 07:12:49 PM »
In SOLUTION, you cannot make these two definitions:

Code: [Select]
HCO3- 0.0 # bicarbonate
CO2(g) 0.0 # carbon dioxide

You have defined Alkalinity, which is often numerically approximately equal to HCO3-. There are ways to specify the CO2(g) partial pressure in a SOLUTION definition.

You cannot define

Code: [Select]
TIME 0 336

There is no keyword time. Time only affect TRANSPORT and KINETICS. In both cases, there are identifiers to set the time step.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Looking for help to solve errors "Element or phase not defined in database"
 

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