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 »
  • A Guide to use User_Graph
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: A Guide to use User_Graph  (Read 1250 times)

process

  • Contributor
  • Posts: 6
A Guide to use User_Graph
« on: April 26, 2019, 03:50:36 PM »
Hi all,

I am new to Phreeqc. I am a Ph.D. student at BGU Israel working on modeling wastewater effluents for Ca-P and Carbonate precipitation in other to study their scaling effects on modified NF membranes. I wish to output my result graphically but don't know how to do it. Can someone put me through? I also attached my input file here
Thanks in advance.
« Last Edit: April 26, 2019, 03:54:08 PM by process »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: A Guide to use User_Graph
« Reply #1 on: April 26, 2019, 04:22:40 PM »
Look at the example data blocks for USER_GRAPH or examples 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, or 22 in the manual.
Logged

John Mahoney

  • Top Contributor
  • Posts: 81
Re: A Guide to use User_Graph
« Reply #2 on: April 26, 2019, 05:55:36 PM »
Right now, the model you presented is only going to calculate Speciation and Saturation Index information.   It might be easier to look over the output and extract the small amount of data you need and drop that into EXCEL manually.  If you are eventually going to look at a lot of samples, then I would suggest that you simply use SELECTED_OUTPUT and perhaps USER_PUNCH and export into EXCEL.   You will have a lot more options in EXCEL to get your ideas presented than in USER_GRAPH.  I typically use USER_GRAPH to check things quickly when I am developing a model, so I do not have to go back and forth in EXCEL, but it takes more time to set up USER_GRAPH because I do not use it too often. 

I suggest as a start something like: 

SELECTED_OUTPUT 1
    -file                 selected_output_1.sel
    -simulation           true
    -pH                   true
    -temperature          true
    -alkalinity           true
    -ionic_strength       true
    -charge_balance       true
    -totals               Ca  P
    -saturation_indices   Amor_CalciumPhosphate Struvite Monetite

would get you started.  Add phases and other parameters as needed.    The totals are written out in mol/L, you can covert as needed in EXCEL.  If you want an output that provides concentrations in mg/L then you will need to write a USER_PUNCH file, which will be added to the selected_output file.  USER_PUNCH OUTPUT shows up on the right of the selected output file.  These blocks, like USER_GRAPH blocks, are written in old BASIC and you need line numbers. 


 
USER_PUNCH
-headings  Ca_mg/L  P_mg/L  SI_Calcite
-start
10 PUNCH TOT("Ca")*40*1000
12 PUNCH TOT("P")*31*1000
15 PUNCH SI("Calcite")
-end


I usually name the SELECTED_OUTPUT file with and XLS extension so EXCEL will open it after it checks that it is OK to do so.  But as written this can be imported into EXCEL.   I also suggest a better name than selected_output_1.sel .  I GET : 

      sim          state           soln         dist_x           time           step             pH             pe           temp            Alk             mu         charge             Ca              P   si_Amor_CalciumPhosphate    si_Struvite    si_Monetite        Ca_mg/L         P_mg/L     SI_Calcite   
           1         i_soln              1            -99            -99            -99            7.3              4         25.000     0.00618666      0.0267016    -0.00388342     4.5063e-03     2.0028e-03         0.5879      -999.9990         0.7685     1.8025e+02     6.2087e+01     3.3362e-01   


Also the log K for Your MgSO4:7H2O and Mg(OH)2 phases seems wrong.  I found Epsomite and the log Ksp is -2.14 not +10. 
 Epsomite            296
   MgSO4:7H2O = Mg+2 + SO4-2 + 7H2O
   log_k      -2.140
   delta_h   2.820 kcal

There is a similar issue for the Mg(OH)2 phase
I found brucite

Brucite             19
   Mg(OH)2 + 2H+ = Mg+2 + 2H2O
   log_k      16.84
   delta_h   -27.1 kcal


Logged

process

  • Contributor
  • Posts: 6
Re: A Guide to use User_Graph
« Reply #3 on: April 27, 2019, 12:14:29 PM »
Thanks so much. The guide was helpful.

I still have a challenge with the graph. In the line for active under selected output. I do select true so as to write the output on the file name I chose. But when I click ok it reverses to false. So the output file is not written or stored. I tried severally but having the same result. How can I fix this?.
« Last Edit: April 27, 2019, 12:18:14 PM by process »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: A Guide to use User_Graph
« Reply #4 on: April 27, 2019, 03:52:40 PM »
Sounds like you are using PhreeqcI. There is a bug that sometimes sets -active to false. Simply replace false with true in the main edit screen.
Logged

process

  • Contributor
  • Posts: 6
Re: A Guide to use User_Graph
« Reply #5 on: May 05, 2019, 10:46:00 AM »
It worked!

Thank you so much.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • A Guide to use User_Graph
 

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