Beginners > SELECTED_OUTPUT

Fluoride Speciation, Controlling Factors & Exporting log K

(1/5) > >>

i_azharkhan:
Hello everyone,

I?m working on modelling 35 water samples collected from an acid mine drainage site (same general location, but from different spots).
My main objectives are:

1. Calculate the distribution of fluoride species in each sample (F⁻, HF, Al?F complexes, etc.).

2. Identify key factors affecting fluoride speciation?such as pH, ionic strength, major cations/anions, and possible equilibrium with fluoride-bearing minerals.

I have a few specific questions:

Multiple samples: Can we run all 35 samples together in a single PHREEQC input file, or do they need to be run separately?

Output analysis: If we export results to a CSV file after running the model, will it directly identify the key factors controlling fluoride speciation, or will we need to process the output data further (e.g., statistical analysis or correlation) to find those relationships?

Equilibrium phases: Which equilibrium phases are most relevant for fluoride in acidic mine drainage (e.g., fluorite, cryolite, and aluminum fluoride minerals), and how should they be set up in the input?

Exporting log K: From the saturation indices section, how can we export the log K values (equilibrium constants) used for each mineral phase to a CSV or output file?

I have full chemical analyses for all samples (major cations/anions, pH, temperature, etc.) and can format them for PHREEQC?s SOLUTION blocks.

If anyone has example input files, guidance on structuring multiple-sample runs, or advice on interpreting the results to pinpoint fluoride controls, I?d greatly appreciate it.

Thank you!

dlparkhurst:
Look in the manual at the data block SOLUTION_SPREAD. It allows a tab-delimited table of data where each row is a solution definition. You can enter the data in Excel and then cut and paste into an input file if you want.

When you run the file with a SOLUTION_SPREAD data block, the output file will contain the saturation indices for every mineral of the database that is composed of the elements in the solution.

Data can be written to a tab-delimited output file using the data blocks SELECTED_OUTPUT and USER_PUNCH. USER_PUNCH allows calculation of output values using the Basic functions described in The Basic Interpreter in the manual. One of the functions is LK_PHASE, which give the log K for the phase at the temperature of the calculation.

You will have to study the literature to decide which minerals are relevant to your system.

i_azharkhan:
Thank you for your guidance.

I tried running my dataset using the SOLUTION_SPREAD block, but when I run the file, I get errors for all elements saying that the solution ?has not converged.?

Could this be due to certain combinations of concentrations in my samples causing unrealistic charge balance or extremely low/high pH values?
Or is there something in my formatting or units that might be leading to the convergence problem?

Any advice on how to troubleshoot and get the model to converge for all samples would be greatly appreciated.

dlparkhurst:
Perhaps you have not set the concentration units correctly. Default is mmol/kgw. Use -unots to define mg/L, for example.

i_azharkhan:
Respected sir, the unit is in mg/L, but I'm still facing the same problem. I will share the input. Please kindly have a look.
Thank you.

SOLUTION_SPREAD
    -units    mg/l
     Al    Alkalinity      Ba      Ca         Cd      Cl          Cu       F       K      Mg         Mn    N(3)    N(5)      Na       P          Pb      pH     S(6)      Sr          Zn      Br        Fe
  mg/l          mg/l    mg/l    mg/l       mg/l    mg/l        mg/l    mg/l    mg/l    mg/l       mg/l    mg/l    mg/l    mg/l    mg/l        mg/l             mg/l    mg/l        mg/l    mg/l      mg/l
    252         17.63    0.03     350    0.04783    8.66       4.558     228    8.45     487     17.267    0.08    24.6    60.8     0.1      0.0089    4.48     3362    1.88       9.392    0.02      0.09
   5.43         35.26    0.16     487    0.04064    8.03        0.15    19.6    8.05     120     16.483    0.96    75.3     239    0.95     0.00018    6.33     2018    7.38       4.064    0.02      0.46
   1397           0.0    0.08     320    1.35149    17.3     100.389     181    3.99    1240     36.954    0.08    14.3    9.25     0.1     0.01164    3.01    14854    0.42     197.612    0.02       212
   0.12         155.8    0.02     860    0.00157     474      0.0809    0.21    8.10    12.4    0.44463    0.08    13.7     391     0.1     0.00002    7.09     2272    0.88       0.179    0.02      0.01
   0.02          22.3    0.04     566    0.00133     419     0.02924    0.43    7.26      11    0.19318    0.08    63.6     384     0.1     0.00003    6.91     1711    0.93       0.109    0.02      0.01
   0.05         164.8    0.05     714    0.00211     904     0.04083    0.24    5.63      59    1.24839    0.08    7.48     453     0.1     0.00001    6.36     1653    0.14     236.886    0.02      0.01
 1030.3           0.0     0.0     254      0.223      14         0.0     149    1.73     898      243.4    0.08    15.1     7.1     0.0       1.652       7     9905     0.0       172.5    0.02       139
   0.01           0.0    0.04     0.0       0.01     0.0        0.01    8.65     0.0     0.0       0.01    0.08     0.0     0.0     0.0        0.01    6.81      0.0     0.0        0.01     0.0      0.02
  60.11           0.0    0.02     0.0       0.01     0.0        1.03    0.51     0.0     0.0      21.44    0.08     0.0     0.0     0.0        0.01    5.21      0.0     0.0         1.7     0.0      0.04
   1539           0.0    0.01     0.0       3.74     0.0       183.8    0.04     0.0     0.0        532    0.08     0.0     0.0     0.0        0.49    3.33      0.0     0.0       354.5     0.0     197.8
 0.1465          22.3     0.0    15.4       1.21     0.0    0.002393    0.39    0.96    2.12       0.01    0.08    18.5    2.32     0.0      0.0009    7.54     14.1     0.0    0.018425     0.0    0.0523
 0.2758          24.1     0.0    16.5       1.23     0.0    0.003488    0.37    1.31    2.11     0.0067    0.08    18.4    2.59     0.0    0.000824    7.56     14.1     0.0        0.02     0.0    0.2237
  3.894         103.3     0.0     474       48.8     0.0     0.01809    13.8    14.4     119      3.759    0.08    16.6    76.9     0.0    0.055257    7.18     1500     0.0    0.100898     0.0     14.86
  0.324         190.2     0.0    68.5        4.8     0.0    0.003904    0.68    2.98    6.75     0.1125    0.08    11.4      61     0.0    0.542209    7.08      112     0.0    0.041691     0.0    0.6535
   34.1         126.2     0.0     634         19     0.0    0.002482    1.43    15.5     222      1.702    0.08    3.71     154     0.0    0.000859     7.3     1470     0.0      0.0209     0.0      70.3
 0.1806            91     0.0     165       16.8     0.0     0.00348     0.9    5.61      40     0.0295    0.08      22    40.2     0.0    0.000538    7.26      476     0.0    0.147055     0.0    0.0521
 0.2568          81.6     0.0    83.1       7.35     0.0    0.003801    0.14     2.3    15.6     0.1349      18      87    8.56     0.0    0.023853    7.17      101     0.0    0.022088     0.0    0.0892
 0.0832          29.6     0.0     100       11.5     0.0    0.002408    0.31    2.91    16.8     0.4923    21.8     209      12     0.0    0.000753    6.68      106     0.0    0.022807     0.0    0.0649
  0.552          24.1     0.0    28.8       3.68     0.0    0.004957    0.36    1.82    3.93     0.0035    0.08    15.3    3.93     0.0    0.000956    7.35     4402     0.0    0.016474     0.0    0.0342
 0.9926          53.7     0.0    28.7       2.35     0.0    0.011647    0.21    1.64     5.3     0.0446    0.08     8.2    6.96     0.0    0.028444    7.73     24.6     0.0    0.034792     0.0      1.08
  1.458          59.3     0.0     237       11.4     0.0    0.011003    2.09    4.27    72.3      1.856    0.08    12.1      39     0.0    0.121578     7.2      830     0.0    0.063056     0.0      2.03
  5.758          55.6     0.0     343        8.2     0.0    0.015322      21    10.9    58.7      8.451    0.08    32.8     226     0.0    0.054212    7.14     1380     0.0    0.302554     0.0     5.346
  102.1          11.1     0.0     514       13.2     0.0    1.109665     103    14.4     341      25.24    0.08    36.3     203     0.0    0.004472    4.77     3098     0.0    2.282672     0.0    0.3502
  63.23          14.8     0.0     520       12.8     0.0    0.596851    67.4    14.2     262       13.8    0.08    38.9     200     0.0    0.000603     5.1     2651     0.0     1.50632     0.0    0.2658
 0.7945         109.8     0.0     454         21     0.0     0.00845    14.6      11     340     0.0221    0.08       4     248     0.0    0.001147       8     2650     0.0    0.014109     0.0    0.5239
    0.0          11.1     0.0     510         12     0.0         0.0    66.7    13.7     292        0.0    0.08    35.4     206     0.0         0.0    5.33     2774     0.0         0.0     0.0       0.0
    0.0           7.4     0.0     520       11.5     0.0         0.0    53.1    13.7     289        0.0    0.08    36.7     200     0.0         0.0    4.99     2802     0.0         0.0     0.0       0.0
  23.66           9.2     0.0     179       6.28     0.0    0.330346    32.4    5.81    80.3      10.07    0.08    35.1    20.9     0.0    0.004062    5.22      715     0.0    1.874565     0.0    0.8982
  2.292          26.8     0.0    47.1       9.19     0.0    0.012326    1.85    3.67    9.69      1.599    0.83      15    10.3     0.0    0.005232     6.5      125     0.0    2.147558     0.0     13.64
 0.6008          29.7     0.0    3.58       7.65     0.0    0.004652    0.93    0.28     0.6     0.0795     6.8    14.5    0.82     0.0    0.583197    6.72     60.2     0.0      0.0396     0.0    0.3729
 0.5907          44.5     0.0     611       5.15     0.0    0.009522    3.56    26.3    78.7     0.0358    0.08    7.64    15.6     0.0    0.003815    7.37    16.98     0.0    0.047802     0.0    0.2901
  2.274         192.7     0.0     517       25.4     0.0    0.009242    28.2    14.6     613      58.76    0.08    4.29     343     0.0    0.000735    3.75     4030     0.0    0.768787     0.0    0.4194
  2.732         247.6     0.0     501       24.2     0.0    0.006868    25.3    11.2     500      48.42    0.08    3.84     366     0.0    0.000937    6.95     3560     0.0    0.335529     0.0    0.5686
   1580           0.0    0.07     334      2.822    11.9     146.804     224    0.57    1775     93.847    0.08    25.5    7.21    0.04     0.00205    2.92    19256    0.27     350.565    0.02      43.5
   0.82            19    0.06     565     0.0501    4.25      0.0637    2.89    12.5     152      6.593    0.08    6.52    9.69    0.04     0.00014    5.12     1990    0.41       1.309    0.02      0.06

SELECTED_OUTPUT 1
    -file                 fluoride_speciation_sample1.csv
    -reset                false
    -solution             true
    -pH                   true
    -temperature          true
    -alkalinity           true
    -totals               F  Al  Ca  Mg  Alkalinity  Fe  Cu
                          Cl  Zn  Sr  N(5)  N(3)  Mn  K
                          Cd  Ba  Br
    -molalities           F-  AlF+2  AlF2+  AlF3
                          AlF4-  CaF+  MgF+  CdF+
                          HF  HF2-  NaF  ZnF+
    -saturation_indices   Fluorite  Barite  Calcite  Basaluminite
                          Gypsum
END

REACTION 1
    Ca(OH)2    1
    0.02 moles in 40 steps
END

EQUILIBRIUM_PHASES 1
    Barite    0 0
    Fluorite  0 0
    Gibbsite  0 0

SELECTED_OUTPUT 2
    -file                 ca_precipitation_sample1.csv
    -reset                false
    -solution             true
    -pH                   true
    -totals               F
    -equilibrium_phases   Fluorite  Gibbsite  Barite
    -saturation_indices   Fluorite  Gibbsite  Barite

USER_GRAPH 1
    -headings               pH F_total
    -axis_titles            "Ca(OH)2" "Fluoride Removal %" "pH"
    -chart_title            "Fluoride Removal with Ca(OH)2 Addition"
    -axis_scale x_axis      0 10 1 1
    -axis_scale y_axis      0 100 10 10
    -axis_scale sy_axis     2 8 1 1
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X RXN
20 GRAPH_Y TOT("F") * 19000 (100*(1-TOT("F")/SYS("F")))
30 GRAPH_SY -LA("H+")
  -end
    -active                 true

END

Navigation

[0] Message Index

[#] Next page

Go to full version