PhreeqcUsers Discussion Forum

Please email phreeqcusers at gmail.com with your name and affiliation to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • Adding sulfamic acid to a database
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Adding sulfamic acid to a database  (Read 11240 times)

Stefano

  • Contributor
  • Posts: 5
Adding sulfamic acid to a database
« on: 15/01/19 15:02 »
Hi there,

i just started my master thesis and i am going to simulate the titration of a landfill leachate. The water gets biological treatment and a carbon-sorption treatment afterwards, which leads to a raise in pH and causes solids to precipitate. In order to prevent this, HCl is used to fix saturation indices. I think i am fine with the basic task of modelling, but now i am asked to use sulfamic acid instead of HCl. I cannot find any data for sulfamic acid in the given databases and now i wonder what and how to add to the database in order to be able to use sulfamic acid for my simulation.
Here is a link to the pubchem page of sulfamic acid:https://pubchem.ncbi.nlm.nih.gov/compound/sulfamic_acid#section=Top

Best regards,
Stefano
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4315
Re: Adding sulfamic acid to a database
« Reply #1 on: 15/01/19 23:47 »
Other possibilities are that you will need to consider the oxidation/reduction reactions or complexing with ions, but for a first approximation to acid/base reactions, sulfamic acid will have the same result as HCl.

If you want to go through the process, you can define a new "element", say Sulfam, with master species H2Sulfam, that reacts to HSulfam- with a pK of 0.995 (https://en.wikipedia.org/wiki/Sulfamic_acid), but at pH above 2, the acid will be essentially completely dissociated, just as HCl.

Logged

Stefano

  • Contributor
  • Posts: 5
Re: Adding sulfamic acid to a database
« Reply #2 on: 25/01/19 14:13 »
Dear Mr. Parkhurst,

first of all thank you very much for your advice in how to handle sulfamic acid in my simulations.

However, despite using the information i found in various threads i was not able to do the calculations i need for my thesis.

Here is, what i have tried so far:

SOLUTION 1
    temp      30
    pH        7
    pe        4
    redox     pe
    units     ppm
    C         2900
    Ca        120
    Cl        3470
    K         840
    Mg        160
    Na        2350
    N(5)      140
    S(6)      170
    -water    1 # kg


REACTION 1
HCl 8.777            
H2O 37.736
   .053956 mol in 10 steps      

USER_PRINT
10 PRINT SOLN_VOL

USER_GRAPH 5
 -chart_title  "Titration Curve"
 -axis_titles "Acid Added (mL)", "pH"
 -axis_scale x_axis  0 1 0.1
 -axis_scale y_axis 0 14 0.5
 -start
10 VT=SOLN_VOL
20 V = VT-1000
30 pH = -LA("H+")
110 GRAPH_X V
120 GRAPH_Y pH
END

This was my attempt to use a titration you posted in 2017 and apply it to titrate my pretreated landfill leachate with 32 w% HCl. I tried different combinations of total HCl and number of steps, but i could not make it work until now.


SOLUTION 1
    temp      30
    pH        7
    pe        4
    redox     pe
    units     ppm
    C         2900
    Ca        120
    Cl        3470
    K         840
    Mg        160
    Na        2350
    N(5)      140
    S(6)      170
    -water    1 # kg
END
REACTION 1
      HCl 8.777
   H2O 37.736
    .053956 mol in 10 steps 
END
EQUILIBRIUM_PHASES 1
   Calcite 0.63 -1.0
END
USE solution 1
USE reaction 1
USE equilibrium_phases 1
USER_GRAPH 1
    -headings               Reaction Ca Calcite
    -axis_titles            "HCl added, moles" "Ca, mol/kgw" "Calcite, mol/kgw"
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 graph_x RXN
20 graph_y TOT("Ca")
30 graph_sy EQUI("Calcite")
  -end
    -active                 true
END

This was another simulation, where in the reaction originally CaCl2 was added to react with sulfate and form gypsum. I would like to use it to calculate the amount of HCl needed to make sure nothing precipitates (Calcite, Aragonite and Dolomite seem to precipitate in original solution).
 Therefore i set Calcite saturation index to -1.0 but the graph shows a constant concentration of 0.0 mol Calcite/kgw although it should not be zero at the beginning, should it?

Is there a way to fix saturation indices just like fixing ph with fix_ph and the chemical that is used to fix it (something like "fix_calcite -1.0 HCl 10")?

Thank you very much in advance and best regards,

Stefano

P.S.: This thread might be moved to another subforum as it is now no longer database related.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4315
Re: Adding sulfamic acid to a database
« Reply #3 on: 25/01/19 20:16 »
You are adding about 50 mL of strong acid and generating solutions of pH < 1.

I have not checked your HCl definition, but assuming it is right, you can make a solution as follows which starts with a negligible volume of water and adds the REACTION. The resulting solution has a calculated volume 0.865, so it takes 1.155975817 of that solution to make a liter.  You need this information to add the proper amount of acid. You should probably do it directly with the density of the HCl solution because the volumes calculated by PHREEQC may not be as accurate. As I recall concentrated HCl should be 12 N.

Code: [Select]
SOLUTION 10
-water 1e-6
REACTION 1
HCl 8.777           
H2O 37.736
SAVE solution 10
END
MIX 2
10 1.155975817
END

In any event, let's assume that 1.155975817 of your REACTION is equal to a liter of acid. Thus 1.155975817e-3 is equal to one milliliter. The following produces the titration:

Code: [Select]
SOLUTION 1
    temp      30
    pH        7
    pe        4
    redox     pe
    units     ppm
    C         2900
    Ca        120
    Cl        3470
    K         840
    Mg        160
    Na        2350
    N(5)      140
    S(6)      170
    -water    1 # kg


REACTION 1
HCl 8.777           
H2O 37.736
#   .053956 mol in 10 steps 
# 1.155975817 mol is 1 L
 1.155975817e-2 in 100 steps   # 10 ml HCl in 100 steps

USER_PRINT
10 PRINT SOLN_VOL

USER_GRAPH 5
    -axis_titles            "Acid Added (mL)" "pH" ""
    -chart_title            "Titration Curve"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
 #10 VT=SOLN_VOL
 #20 V = VT-1000
 30 pH = -LA("H+")
110 GRAPH_X RXN /  1.155975817e-3
120 GRAPH_Y pH
  -end
    -active                 true
END

(2) Dolomite requires the most acid in this case, but you will not know in general whether calcite or dolomite (aragonite is unstable relative to calcite under normal conditions) will require the most acid. This calculation determines the moles of HCl needed to lower the saturation index to zero. Note if the solution is undersaturated, PHREEQC will try to remove HCl, which may or may not be possible. I leave it to you to determine the number of milliliters of acid needed.

Code: [Select]
SOLUTION 1
    temp      30
    pH        7
    pe        4
    redox     pe
    units     ppm
    C         2900
    Ca        120
    Cl        3470
    K         840
    Mg        160
    Na        2350
    N(5)      140
    S(6)      170
    -water    1 # kg
EQUILIBRIUM_PHASES
Dolomite 0 HCl 10
END
Logged

Stefano

  • Contributor
  • Posts: 5
Re: Adding sulfamic acid to a database
« Reply #4 on: 30/01/19 15:53 »
Dear Mr. Parkhurst,

once again thank you very much for your support.
It seems like I managed to do all the calculations that I need so far (copying some more of your code i found in the forums), now theres only one small, cosmetical issue left.

In the "Saturation Index vs. pH" (Graph 5), I cant get the headings right, despite using the corresponding part of the tutorial (https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/phreeqc3-html/phreeqc3-51.htm).
The headings wont include the first curve, no matter what I tried.
Thank you in advance for any help provided.

Code: [Select]
SOLUTION 1
    temp      25
    pH        10
    pe        4
    redox     pe
    units     ppm
    C         98.5
    Ca        120
    Cl        3470
    K         840
    Mg        160
    Na        2350
    N(5)      140
    S(6)      170
    -water    1 # kg




USER_PRINT
10 PRINT SOLN_VOL


REACTION 1
HCl 12.9073           
H2O 55.4939


 1.155975817e-3 in 100 steps   # 1 ml HCl in 100 steps


SELECTED_OUTPUT
        -file   ex2.sel
        -pH
        -si     calcite  dolomite
USER_PRINT
10 PRINT SOLN_VOL


USER_GRAPH 5
    -headings Calcite Dolomite
    -axis_titles            "pH" "SI"
    -chart_title            "Saturation Index vs. pH"
    -initial_solutions      true
  -start
 #10 VT=SOLN_VOL
 #20 V = VT-1005
 30 pH = -LA("H+")
110 GRAPH_X pH
120 GRAPH_Y SI("Calcite")
130 GRAPH_Y SI("Dolomite")
  -end


USER_GRAPH 6
    -axis_titles            "Acid Added (mL)" "pH"
    -chart_title            "Titration Curve"
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
 #10 VT=SOLN_VOL
 #20 V = VT-1005
 30 pH = -LA("H+")
110 GRAPH_X RXN /  1.155975817e-3
120 GRAPH_Y pH
  -end
    -active                 true
END

P.S.: Is there a way to donate via paypal, direct banking or maybe crypto currency? I would really like to donate, as your effort makes this forum a relieable source of help for any PhreeQC newcomers, but I dont own a credit card.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4315
Re: Adding sulfamic acid to a database
« Reply #5 on: 30/01/19 16:11 »
When using GRAPH_X and GRAPH_Y, you need to define a heading for the X variable even though it does not appear.

Code: [Select]
USER_GRAPH 5
    -headings pH Calcite Dolomite
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • Adding sulfamic acid to a database
 

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