PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

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

Author Topic: Input erros  (Read 1291 times)

gmgmgm

  • Frequent Contributor
  • Posts: 15
Input erros
« on: 28/04/24 09:00 »
I tried to add Organic_C in the form of CH2O in PHREEQC, but I don't know why there is always an input error.
Code: [Select]
SOLUTION 1
    temp      25
    pH        5.1
    pe        4
    redox     pe
    units     mg/l
    density   1
    Ca        0
    Fe(2)     33.2
    Fe(3)     186.8
    Mn(2)     67.6
    S(6)      200 charge
    -water    1 # kg

EQUILIBRIUM_PHASES 1
    CO2(g)    -3.5 0
    O2(g)     -6.7 0

SOLUTION_MASTER_SPECIES
    C(0)          CH2O           0     CH2O           12

SOLUTION_SPECIES
CH2O = CH2O
    log_k     0
CH2O + 6OH- = CO3-2 + 4e- + 4H2O
    log_k     103

PHASES
Organic_C
    SO4-2 + 2CH2O = 2CO3-2 + 3H+ + HS-
    log_k     100
KINETICS 1
Organic_C
    -formula  Organic_C
    -m        1
    -m0       1
    -tol      1e-08
-steps       100 in 100 steps # seconds
-step_divide 1
-runge_kutta 3
-bad_step_max 500

RATES
    Organic_C
-start
  1   REM      Additive Monod kinetics for SOC (sediment organic carbon)
  2   REM      Electron acceptors: O2, NO3, and SO4
 10  if (M <= 0) THEN GOTO 200
 20  mO2   = MOL("O2")
 30  mNO3  = TOT("N(5)")
 40  mSO4  = TOT("S(6)")
 50  k_O2  = 1.57e-9
 60  k_NO3 = 1.67e-11
 70  k_SO4 = 1.e-13
 80  rate  = k_O2 * mO2/(2.94e-4 + mO2)
 90  rate  = rate + k_NO3 * mNO3/(1.55e-4 + mNO3)
100 rate  = rate + k_SO4 * mSO4/(1.e-4 + mSO4)
110 moles = rate * M * (M/M0) * TIME
200 SAVE moles
-end

USE equilibrium_phases 1
USE kinetics 1
USE solution 1
USER_GRAPH 1
    -headings               C SO4 S(-2)
    -axis_titles            "Carbon added, mol/L" "S(6) Concentration, mol/L" "S(2) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("S(6)")
30 GRAPH_SY tot("S(-2)")
  -end
    -active                 true

USER_GRAPH 2
    -headings               C Fe(2) Fe(3)
    -axis_titles            "Carbon added, mol/L" "Fe(2) Concentration, mol/L" "Fe(3) Concentration, mol/L"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y  tot("Fe(2)")
30 GRAPH_SY tot("Fe(3)")
  -end
    -active                 true

USER_GRAPH 3
    -headings               C Mn
    -axis_titles            "Carbon added, mol/L" "Concentration, mol/L" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y tot("Mn(2)")
  -end
    -active                 true

USER_GRAPH 4
    -headings               C Goethite Pyrolusite Mackinawite Manganite
    -axis_titles            "Carbon added, mol/L" "Concentration, mol/L" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x TOTAL_TIME
20 graph_y EQUI_DELTA("Goethite"),EQUI_DELTA("Pyrolusite"),EQUI_DELTA("Mackinawite"), EQUI_DELTA("Manganite")
  -end
    -active                 true

END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4067
Re: Input erros
« Reply #1 on: 28/04/24 22:27 »
To add a new species to the C system, you need to have an association reaction forming the species (and you would not have the reaction CH2O = CH2O).

However, I don't think you should define a new aqueous species or redox state. It would not be stable in solution in any case. Simply use CH2O as the -formula for the KINETICS reaction with no additional SOLUTION_MASTER_SPECIES or SOLUTION_SPECIES.
Logged

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

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2