Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Design of conceptual models
»
Considering air and its components in PHREEQC
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Considering air and its components in PHREEQC (Read 7607 times)
Tom
Admin
Posts: 123
Considering air and its components in PHREEQC
«
on:
May 02, 2014, 09:50:04 AM »
Often it is useful to consider the interaction of the gasses in air with solutions during PHREEQC simulations. I have come across a number of methods for introducing or reacting air including through EQUILIBRIUM_PHASES and through GAS_PHASE.
I hope we can use this topic to discuss approaches for considering the interaction of air and any limitations involved. For example, when a given approach is most applicable and how it may differ from natural conditions.
The following from the PHREEQC Q+A thread is a great starting point:
http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/mail/msg00038.html
Q. (adapted for this post)...
I am trying to simulate the dissolution of the gas composition of air in solution which is bubbled with humidified air in lab experimental condition. Two approaches used:
1)
GAS_PHASE 1 Air
-fixed_pressure
-pressure 1.0
-temperature 25.0
CO2(g) 0.000316
O2(g) 0.2
N2(g) 0.78
2)
EQUILIBRIUM_PHASES 1
Fix_H+ -8.0 NaOH 10.0
CO2(g) -3.5
O2(g) -0.69897
N2(g) -0.1079
Problems were encountered with lack of convergence for approach 2. Q. Which approach should I use
A. (David Parkhurst):
The experiment you describe fixes the partial pressures of the gases and EQUILIBRIUM_PHASES is the right keyword data block to use.
The reason you are having numerical problems is related to the introduction of N2 and O2. PHREEQC calculates redox equilibrium in reaction calculations and thermodynamically, N2 and O2 should react to form NO3. Fixing partial pressures of N2 and O2 generates huge amounts of NO3, and the program fails to converge. If you assume the N2 is essentially inert, the following input file will make the calculation without allowing N2 to react to NO3, by defining a new "element" Ngas, which has only one aqueous species, Ngas2 and the gas component Ngas.
SOLUTION_MASTER_SPECIES
Ngas Ngas2 0 Ngas2 14
SOLUTION_SPECIES
Ngas2 = Ngas2
LogK 0.0
PHASES
Ngas
Ngas2 = Ngas2
log_k -3.260
delta_h -1.358 kcal
SOLUTION #example solution
units mg/l
U 1
EQUILIBRIUM_PHASES 1
CO2(g) -3.5
O2(g) -0.69897
Ngas -0.1079
REACTION
NaOH 1
0 .0000001 .000001 .00001 .0001 .001 .01 .1 1 mol
---------------------------
Please feel free to contribute if you have used an approach which considers gasses and let us know some more details...
Logged
Tom
Admin
Posts: 123
Re: Considering air and its components in PHREEQC
«
Reply #1 on:
May 02, 2014, 09:57:18 AM »
Another example, this time of GAS_PHASE, with a thorough description of how GAS_PHASE works:
http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/mail/msg00287.html
---------------
Q. I want to calculate CO2 gas dissolution into water solution. For example, If 350ppmV-CO2 gas phase exists with a solution of pH=7:
SOLUTION 1
temp 25.0
pH 7
pe 4
redox pe
units mg/kgw
GAS_PHASE 1
-pressure 1
-volume 1
-temperature 25
CO2(g) 0.00035
END
The result of the calculation shows that total C in the solution is 1.4E-5 mol/L and pH is 5.6. I think this result is reasonable. However, by replacing the volume to 1000 instead of 1, the result shows that total C is 1.4E-2 and pH=4.1.
On the other hand, by replacing pressure value to 1000 instead of 1. total C is 1.4e-5 and pH=5.6. I think that the solubility has not be changed with volume by Henry's Law. Do I have some misunderstanding about this ?
A. (David Parkhurst)
There are several different ways to conceive of the physical situation.
If you want to take pure water and add CO2(g) to produce a specified partial pressure of CO2, then SOLUTION and EQUILIBRIUM_PHASES data blocks are used. Pure water is speciated and then a reaction calculation equilibrates the solution with CO2(g). In the reaction calculation, the pH will adjust as the CO2 is added to the solution. This is the most common way of handling a gas, and the key is that the partial pressure is desired to be fixed.
SOLUTION 1
temp 25.0
pH 7
pe 4
redox pe
units mg/kgw
EQUILIBRIUM_PHASES
CO2(g) -3.5
END
The GAS_PHASE datablock defines an initial gas phase composition. The program then reacts this gas phase with a solution and the gas components are distributed between the aqueous and the gas phase. During the reaction,
the partial pressure of the gas components are not fixed, they vary with reaction. The gas phase maintains either a fixed volume, with the total pressure varying, or a fixed total pressure with the volume varying.
Neither -fixed_pressure nor -fixed_volume are defined in your example, so the default of fixed pressure is used. The physical setup for your input file is that CO2 is present initially in a volume of 1 Liter at a partial pressure of .00035 atmospheres; you can calculate how many moles of CO2 are in the gas phase from the ideal gas law PV = nRT. Note that -pressure defines the pressure that is obtained during the reaction and -volume defines the initial volume of the gas phase (for a -fixed_pressure gas phase).
This gas phase with a number of moles of CO2 calculated by the ideal gas law is allowed to react with a kilogram of pure water. The CO2 dissolves into the water and in this case the gas phase disappears because even by putting all of the CO2 into the dissolved phase, the partial pressure of CO2 in the water is less than 1 atmosphere, the pressure
specified to be necessary to maintain a separate gas phase.
If you increase the initial volume of the gas phase to 1000 liters, you will have more CO2, but it still dissolves completely into the water phase. If you increase the initial volume to 5000 Liters, you have enough CO2 that a liter of gas remains after equilibration with the water; the partial pressure of CO2 is 1 atmosphere (as specified by -pressure). If you change the pressure to 1000, you get the same result as a pressure of 1 atm because the partial pressure is less than 1 after the reaction, which is also less than 1000 atm.
GAS_PHASE 1
-pressure 1
-volume 1
-temperature 25
CO2(g) 0.00035
END
Logged
dlparkhurst
Top Contributor
Posts: 3088
Re: Considering air and its components in PHREEQC
«
Reply #2 on:
May 02, 2014, 10:25:19 PM »
Just a couple of comments. In one of the examples, Ngas was added as an element and aqueous species to avoid reaction of N2 with O2. In the current phreeqc.dat and Amm.dat databases, there is an equivalent definition named "Ntg". Thus, you can use Ntg whenever you want to model dissolved nitrogen that is inert to reactions with other redox elements, instead of defining a new Ngas element.
There is a big conceptual difference between using EQUILIBRIUM_PHASES and GAS_PHASE for the purpose. With EQUILIBRIUM_PHASES, you are specifying the partial pressure of each gas that will obtain in the reacted solution (unless all of the moles of a gas dissolves before attaining the specified partial pressure). If you specify a large number of moles, you are equilibrating the solution with essentially an infinite reservoir, which is appropriate for a solution in contact with the atmosphere or some other large reservoir of gas.
With GAS_PHASE, you are normally defining a finite amount of gas. When that finite volume reactacts, the resulting partial pressures will be calculated by equilibrium between the solution and the gas phase, and will not be known beforehand. If the solution is initially pure water, then the resulting partial pressures will necessarily be less than the partial pressures used to define the initial gas phase composition because some gas will dissolve into the water. Now you can specify a very large volume of gas initially, in which case the amount that dissolves (or exsolves) from the water will be negligible, in which case the resulting partial pressures will be very close to the initial gas phase definition. In this case, the GAS_PHASE calculation will be nearly identical to an EQUILIBRIUM_PHASE calculation using the sampe partial pressures.
Another feature of GAS_PHASE calculations is that you must chose whether it is a fixed-pressure gas phase, or a fixed-volume gas phase. Fixed pressure gas phases only exist if, when all gases are put into solution, the sum of the partial pressures exceeds the specified pressure for the gas phase. Equilibrium will then distribute the gases between the solution and the gas phase. If the sum is less than the specified pressure for the gas phase, no gas phase is present at that point in the calculations.
A fixed-volume gas phase is always present. The composition of the gas phase is calculated such that the partial pressure of a gas component in the gas phase is equal to the partial pressure of the dissolved gas.
With version 3, phreeqc.dat, Amm.dat, and pitzer.dat, have a non-ideal gas formulation based on the Peng-Robinson approach. Where I have said "partial pressure", with non-ideal gases the correct term is fugacity. The Henry's law constant relates the activity in solution with the fugacity in the gas.
Logged
Tom
Admin
Posts: 123
Re: Considering air and its components in PHREEQC
«
Reply #3 on:
May 03, 2014, 07:48:26 AM »
Thank you David for that excellent contribution, I'm sure this will prove useful for anyone trying to conceptualise a model involving gases. It has certainly helped me understand how PHREEQC deals with gases.
Logged
stu_barclay
Contributor
Posts: 1
Re: Considering air and its components in PHREEQC
«
Reply #4 on:
March 09, 2018, 01:27:54 PM »
Thanks all for the useful comments about equilibrium phase and using it to handle reactions that interact with the atmosphere. I put together this quick model that oxidizes pyrite using atmospheric oxygen resulting in rapid pH reduction.
# Calculate sulphate formation from pyrite oxidation
SOLUTION 1
-units mg/kgw
-temperature 25.0
pH 6.8
Ca 10
Mg 2
Na 6
K 2
C 75 charge_balance
S 2
Cl 1
Fe 1
EQUILIBRIUM_PHASES 1
O2(g) -0.69897 #log10 of atmospheric O2 partial pressure - held constant
REACTION
Pyrite 0.042 #moles of 1cm3 pyrite reacted
0.042 moles in 100 steps #add pyrite in 100 steps
END
Logged
zsszabo86
Frequent Contributor
Posts: 17
Re: Considering air and its components in PHREEQC
«
Reply #5 on:
June 22, 2023, 12:33:16 AM »
Dear authors of this discussion! I used the ideas I read here for my model. I run a simulation where calcite reacts with water at atmospheric conditions. It is important to include at this point atmospheric H2 and O2 in my models as later I will also simulate experiments with such gases (maybe not O2, but it might be important at some point). My problem is that if I include both O2(g) and H2(g) among equilibrium phases, they start to react and produce water. So I do not get dissolved O2 and H2 in the water, but I get more and more water. Do you have any tips for me how to make sure that I just get a solution composition in equilibrium with calcite and air?
Logged
dlparkhurst
Top Contributor
Posts: 3088
Re: Considering air and its components in PHREEQC
«
Reply #6 on:
June 22, 2023, 01:41:28 AM »
The phreeqc.dat and Amm.dat databases have Oxg and Hdg, which are O2 and H2 analogues, but they do not react. Oxg(g) and Hdg(g) are the associated gas components. They would participate in formation of a GAS_PHASE. Any redox reaction with either of them would require REACTION or KINETICS.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Design of conceptual models
»
Considering air and its components in PHREEQC