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 »
  • Conceptual Models »
  • Design of conceptual models »
  • Asking about PHREEQC for Struvite & CSTR modelling
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Asking about PHREEQC for Struvite & CSTR modelling  (Read 4317 times)

bilapr

  • Contributor
  • Posts: 1
Asking about PHREEQC for Struvite & CSTR modelling
« on: 15/02/21 09:13 »
Hello, everyone.

I'm currently using PHREEQC Interactive2.14.2 for modelling struvite kinetics. I have some questions for you:
1. I have synthetic wastewater from
- KH2PO4 (PO4 3- 8512 mg/L)
- NH4OH (NH4 + 1600 mg/L)
- MgCl2 (Mg 2+ 2129 mg/L)
- SiO2 (Si 875 mg/L)
- CaCO3 (Ca 2+ 101 mg/L)
- NaHCO3 (HCO3 - 3849 mg/L)
- NaF (F - 3500 mg/L)
Then I want to predict the formation of struvite in a batch reactor such as the file I attached below. But the result is not converged due to non-bicarbonate greater than total carbonate ion. What can i do to fix it?
2. The second question is, could you give me some examples for modelling struvite in CSTR with the same input in the first question?

Thank you for your time, glad to hear from you.


      TITLE Struvite
   Solution Wastewater
   units mg/L
   pH     8.5
   Mg     2129
   P      8512 as PO4-3
   N(-3)  1600 as NH4+
      F      3500
      Si     850
      Ca     101.2
   Alkalinity   3548 as HCO3-
   
   SOLUTION_MASTER_SPECIES
   N2      N2   0.0   N2   28.0
   SOLUTION_SPECIES
   N2= N2
   log_k   0.0
   gamma   2.5   0.0
   Mg+2 + NH3 = MgNH3+2
      log_k = 0.24
   delta_h = 0
   Mg+2 + 2NH3 = Mg(NH3)2+2
   log_k = 0.2
   delta_h = 0
   Mg+2 + 3NH3 = Mg(NH3)3+2
   log_k = -0.3
   delta_h = 0
   Mg+2 + OH- = MgOH+
   log_k = 2.6
   delta_h = 0
   CO3-2 = CO3-2
      log_k           0.000

   PHASES
      Fix_H+
      H+ = H+
      log_k  0.0
   STRUVITE
   MgNH4PO4:6H2O = Mg+2 + NH4+ + PO4-3 + 6H2O
   log_k  -13.15
   delta_h -5.282
   NEWBERITE
   MgHPO4:3H2O = Mg+2 + HPO4-2+ 3H2O
   log_k    -5.51
   delta_h  0.00
   BOBBIERITE
   Mg3(PO4)2:8H2O = 3Mg+2 + 2PO4-3+ 8H2O
   log_k    -25.2
   delta_h   0.00
   MAGNESIUM PHOSPHATE
   Mg3(PO4)2:22H2O = 3Mg+2 + 2PO4-3 + 22H2O
   log_k      -23.28
   delta_h   0.00
   BRUCITE
   Mg(OH)2 = Mg+2 + 2OH-
   log_k      -11.16
   delta_h   -113.996
   
   EQUILIBRIUM_PHASES
      Struvite    0.0     0.0
   Bobbierite  0.0    0.0
   Magnesium  0.0    0.0
   Brucite     0.0    0.0
      Hydroxyapatite 0.0 0.0
   Fluorite   0.0   0.0

   END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4213
Re: Asking about PHREEQC for Struvite & CSTR modelling
« Reply #1 on: 15/02/21 16:17 »
First, install PhreeqcI version 3. https://water.usgs.gov/water-resources/software/PHREEQC/phreeqci-3.6.2-15100.msi

I have revised your file and run with phreeqc.dat. Note you only need to add items in SOLUTION_SPECIES that you want changed from the database. For instance, CO3-2 is defined in the database, so there is no need to redefine it. Your definitions for N2 were incorrect. I have added N2 in SOLUTION_SPECIES and decreased the log_K so that N2(aq) will be negligible.

Your solution definition leaves out several elements, which is part of the cause of the convergence error. I have generated your initial solution by adding the salts to pure water and adjusting the pH. You should check whether I added the right amounts of salts. The USER_PRINT block gives my calculation.

With the new initial solution, the minerals struvite and fluorite are calculated to precipitate.

You'll have to check the literature or other people for examples; I haven't worked in this system.

Code: [Select]
# thermodynamic definitions
SOLUTION_SPECIES
12H+ + 2NO3- + 10e- = N2 + 6H2O
    log_k     0
    delta_h   -312.13 kcal
    -dw       1.96e-09
Mg+2 + NH3 = MgNH3+2
    log_k     0.24
Mg+2 + 2NH3 = Mg(NH3)2+2
    log_k     0.2
Mg+2 + 3NH3 = Mg(NH3)3+2
    log_k     -0.3
Mg+2 + OH- = MgOH+
    log_k     2.6

PHASES
Fix_H+
    H+ = H+
    log_k     0
STRUVITE
    MgNH4PO4:6H2O = 6H2O + Mg+2 + NH4+ + PO4-3
    log_k     -13.15
    delta_h   -5.282 kJ
NEWBERITE
    MgHPO4:3H2O = 3H2O + HPO4-2 + Mg+2
    log_k     -5.51
BOBBIERITE
    Mg3(PO4)2:8H2O = 8H2O + 3Mg+2 + 2PO4-3
    log_k     -25.2
MAGNESIUM
    Mg3(PO4)2:22H2O = 22H2O + 3Mg+2 + 2PO4-3
    log_k     -23.28
BRUCITE
    Mg(OH)2 = Mg+2 + 2OH-
    log_k     -11.16
    delta_h   -113.996 kJ
END

# make initial solution
USER_PRINT
10 PRINT "KH2PO4 ", 8512/1000/GFW("PO4")
20 PRINT "NH4OH  ", 1600/1000/GFW("NH4")
30 PRINT "MgCl2  ", 2129/1000/GFW("Mg")
40 PRINT "SiO2   ", 875/1000/GFW("Si")
50 PRINT "CaCO3  ", 101/1000/GFW("CaCO3")
60 PRINT "NaHCO3 ", 3849/1000/GFW("HCO3")
70 PRINT "NaF    ", 3500/1000/GFW("F")
SOLUTION 1
REACTION
KH2PO4    8.9625e-02
NH4OH     8.8698e-02
MgCl2     8.7570e-02
SiO2      3.1156e-02
CaCO3     1.0091e-03
NaHCO3    6.3079e-02
NaF       1.8423e-01
1 mol
EQUILIBRIUM_PHASES
Fix_H+ -8.5 NaOH 10
SAVE solution 1
END

# equilibrate with minerals
USE solution 1
EQUILIBRIUM_PHASES 1
    Bobbierite 0 0
    Brucite   0 0
    Fluorite  0 0
    Hydroxyapatite 0 0
    Magnesium 0 0
    Struvite  0 0
PRINT
-user_print false
END



Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Design of conceptual models »
  • Asking about PHREEQC for Struvite & CSTR modelling
 

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