Beginners > PHREEQC basics
Approaches for pH (estimation, fixing etc...)
(1/1)
Tom:
ESTIMATING PH
Although field pH measurement of a solution is the most reliable method (providing it is done quickly post-sampling to reduce the effects of degassing), there are a number of ways of estimating pH with PHREEQC.
An email on the Q+A thread addresses this concisely:
http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/mail/msg00120.html
-------------
Q. (Edited) We have a set of solution data but do not have a measured pH. Can PHREEQC calculate this for us?
A. [David Parkhurst]
There are several ways to estimate pH, all less palatable than measuring the pH in the field without loss of CO2. Here are several options you could use depending on data availability or plausible assumptions.
(1)
You can use charge balance to estimate pH. It is a little risky because you are lumping all analytical errors and unanalyzed species (trace elements) into the estimate of pH. You would have to be very careful if you are also missing some major ion data. The calculation is simple, just include "charge" on the line estimating pH. The pH will be adjusted to charge balance.
SOLUTION
pH 7 charge
Na 1
END
(2)
If you have both alkalinity and total inorganic carbon, you can use this information to calculate pH. Just include both Alkalinity and C(4) in the solution definition and pH will be calculated.
SOLUTION
Na 1
Alkalinity 1
C(4) 1.5
END
(3)
If you know alkalinity and PCO2 you can calculate pH. This calculation assumes air equilibrium.
SOLUTION
pH 7 CO2(g) -3.5
Alkalinity 1
Na 1
END
(4)
Variations of (3) could use other minerals.
SOLUTION
pH 7 Calcite 0.0
Ca 0.5
Na 1
Alkalinity 2
END
----------------------
FIXING PH
It can sometimes be useful to fix pH in simulations. The examples below outline the use of pH fixing.
------------------
1)
Q. (Edited) I want to speciate a solution for a measured pH and for a pH of 7.5, how can I go about this?
A. [David Parkhurst, Edited]
The script below is an example for speciating a couple of waters and then adjusting the pH to 7.5. This example is adequate unless you want to consider iron and manganese, in which case you have to make some choices on redox. By default, during the adjustment to pH 7.5 redox species (iron, manganese, ammonium, nitrate, etc) all come to redox equilibrium.
SOLUTION 1 SEAWATER FROM NORDSTROM ET AL. (1979)
units ppm
pH 8.22
pe 8.451
temp 25.0
redox O(0)/O(-2)
Ca 412.3
Mg 1291.8
Na 10768.0
K 399.1
Fe 0.002
Mn 0.0002
Si 4.28
Cl 19353.0
Alkalinity 141.682 as HCO3
S(6) 2712.0
N(5) 0.29 gfw 62.0
N(-3) 0.03 as NH4
O(0) 3.0
SOLUTION 2 Precipitation from Central Oklahoma
units mg/L
pH 4.5 # estimated
temp 25.0
Ca .384
Mg .043
Na .141
K .036
Cl .236
S(6) 1.3
N(-3) .208
N(5) .237
END
PHASES
fix_pH
H+ = H+
log_k 0
EQUILIBRIUM_PHASES 1
fix_pH -7.5 NaOH 10
END
USE solution 1
USE equilibrium_phases 1
END
USE solution 2
USE equilibrium_phases 1
END
2)
Q. (Edited) I had a query with regards to alkaline (pH 10) solutions and CO2. I need to keep the pH constant for the entire reaction. Is the following code correct for what I am doing?
SOLUTION 1 Nutrient Solution, pH 10, No CO2
temp 30
pH 10
pe 4
redox pe
units umol/kgw
density 1
B 0.16
Ca 700
Cl 256 charge
K 133
Mg 133
Na 0
N(-3) 47
N(5) 423
P 3
Zn 0.1
Cu 0.04
Fe 5
Mn 0.2
S(6) 500
C 0.000005
-water 1 # kg
GAS_PHASE 1 CO2 addition
-fixed_volume
-pressure 1
-volume 100
-temperature 30
CO2(g) 0.78035
O2(g) 0.21965
A. [David Parkhurst, Edited]
The file below adds CO2 to your solution until calcite is saturated. It also adds NaOH to maintain the pH at 10. If you add enough CO2 to get close to 1 atmosphere pCO2, you will have a very concentrated solution of NaHCO3 and
the program could fail to converge. In this run, it takes about 25 micromoles of CO2 to get to calcite saturation, but you need to add 100 micromoles of NaOH and log(pCO2) is -7. It helps to add the oxygen to define the redox condition more robustly.
SOLUTION 1 Nutrient Solution, pH 10, No CO2
temp 30
pH 10
pe 4
redox pe
units umol/kgw
density 1
B 0.16
Ca 700
Cl 256 charge
K 133
Mg 133
Na 0
N(-3) 47
N(5) 423
P 3
Zn 0.1
Cu 0.04
Fe 5
Mn 0.2
S(6) 500
C 0.00001
-water 1 # kg
EQUILIBRIUM_PHASES 1
# Fix pO2 at .1 atm
O2(g) -1
# Add CO2(g) until calcite saturation
Calcite 0.0 CO2(g) 10
# Add NaOH to pH 10
FIX_H+ -10. NaOH 10
PHASES
# Fake phase used to fix pH
FIX_H+
H+ = H+
logK 0
-------------------------
Other approaches and examples of estimating or fixing pH very welcome on this topic. Thanks
smidera:
Dear all,
I'm trying to simulate produced brine from oilfield at processing facilities conditions (pressures ranging from 20 to 1 atm and temperatures from 20°C to 80°C).
I have a non-pressurised water sample from a separator and the composition in dry basis of the gas on the top of the separator. Therefore, I need do adjust the measured pH considering some dissolution of the separator gas in equilibrium with the produced brine. Also, the gas composition is not fully known since at 80°C the water in gas phase is very significant.
I would appreciate if you could comment my approach in the code below. I'm running it with pitzer database.
Thanks in advance :)
--- Code: ---SOLUTION 1 compositions from lab at 25°C
temp 25
pH 7
pe 4
redox pe
units mg/l
density 1 calc
Na 57169
K 2999
Mg 1415
Ca 7182
Sr 947
Ba 37
Cl 106544 charge
S(6) 541
Br 567
Acetate 759
Alkalinity 1128 as HCO3-
end
REACTION_TEMPERATURE
80 #separator temperature
USE SOLUTION 1
GAS_PHASE 1
-fixed_volume
-pressure 20 #separator pressure
-volume 0.001 #tiny volume to not change solution composition
Mtg(g) 18 # 90% methane in dry basis
CO2(g) 2 # 10% CO2 in dry basis
H2O(g) 0
end
--- End code ---
dlparkhurst:
I think I would just set the PCO2 to 2 atm (log10=0.3) at the formation conditions with EQUILIBRIUM_PHASES.
I'm not sure which database you are using with both Acetate and Mtg. Including a fixed Mtg partial pressure in EQUILIBRIUM_PHASES will have, I think, a small effect on the pH.
If you want to know the gas composition that is in equilibrium with the solution, you can take the reacted solution and add a GAS_PHASE (without CO2 and Mtg in EQUILIBRIUM_PHASES). If you use a fixed_pressure gas phase, a gas composition will only be calculated if the sum of the partial pressures exceeds the ambient pressure, which, at 20 atm, I think it would when H2O(g) is also included. Alternatively, you could use a small volume fixed_volume gas phase, which would always produce a gas phase.
Navigation
[0] Message Index
Go to full version