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 »
  • Beginners »
  • PHREEQC basics »
  • How to extract data from the Output file
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: How to extract data from the Output file  (Read 8825 times)

ss13217

  • Frequent Contributor
  • Posts: 11
How to extract data from the Output file
« on: 27/08/24 15:24 »
I want to extract data such as pH, Molality of H+, MacInnes Activity of H+, and Molality of S(6) for each simulation from the output file. How can I do that?

here is an example of my output
Code: [Select]
Using solution 22.
Using reaction 22.

Reaction 22.

  1.000e+00 moles of the following reaction have been added:

                 Relative
Reactant            moles

H2SO4                0.31034

                 Relative
Element             moles
H                    0.62069
O                    1.24138
S                    0.31034

-----------------------------Solution composition------------------------------

Elements           Molality       Moles

S                 3.103e-01   3.103e-01

----------------------------Description of solution----------------------------

                                       pH  =   0.527      Charge balance
                                       pe  =   4.000      Adjusted to redox equilibrium
      Specific Conductance (?S/cm,  25?C)  = 128016
                          Density (g/cm?)  =   1.01619
                               Volume (L)  =   1.01402
                        Activity of water  =   0.989
                 Ionic strength (mol/kgw)  =   4.495e-01
                       Mass of water (kg)  =   1.000e+00
                 Total alkalinity (eq/kg)  =  -6.207e-01
                         Temperature (?C)  =  25.00
                  Electrical balance (eq)  =   1.488e-11
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =   0.00
                               Iterations  =  22
                         Gamma iterations  =   5
                      Osmotic coefficient  =   0.90158
                         Density of water  =   0.99704
                                  Total H  = 1.116331e+02
                                  Total O  = 5.674760e+01

----------------------------Distribution of species----------------------------

                                                    MacInnes  MacInnes
                                MacInnes       Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?/mol

   H+              3.799e-01   2.968e-01    -0.420    -0.527    -0.107      0.00
   OH-             6.497e-14   3.372e-14   -13.187   -13.472    -0.285     -3.02
   H2O             5.551e+01   9.889e-01     1.744    -0.005     0.000     18.07
S(6)          3.103e-01
   HSO4-           2.408e-01   1.757e-01    -0.618    -0.755    -0.137     40.84
   SO4-2           6.958e-02   6.213e-03    -1.158    -2.207    -1.049     17.61

------------------------------Saturation indices-------------------------------

  Phase               SI** log IAP   log K(298 K,   1 atm)

  H2O(g)           -1.51     -0.00    1.50  H2O

**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm.
  For ideal gases, phi = 1.

------------------
End of simulation.
------------------

I only know how to do this
Code: [Select]
SELECTED_OUTPUT
-file output.xls
-ph                   true
-molalities   H+
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4316
Re: How to extract data from the Output file
« Reply #1 on: 27/08/24 16:23 »
There are options in SELECTED_OUTPUT to write all of these quantities to the selected-output file (output.xls in your case, although .tsv would be more correct).

Code: [Select]
SELECTED_OUTPUT 1
-reset false
-file output.tsv
-pH true
-molalites H+
-activities H+
-totals S(6)

For more flexibility, you can add USER_PUNCH 1, where you can "PUNCH" quantities defined by Basic functions and programming in the Basic language. See SELECTED_OUTPUT, USER_PUNCH, and The Basic Interpreter in the manual.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • How to extract data from the Output file
 

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