PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?  (Read 4985 times)

Andrew Hoch

  • Contributor
  • Posts: 3
Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« on: 06/03/19 09:49 »
Hi,

I hope this is the right area to post this question.

For background, I am developing a specialized reactive transport code using the Fortran interface to PhreeqcRM (version 3.3.12).  The code is required to perform simple aqueous speciation calculations, and because the ionic strengths of the solutions could be high, the speciation calculations use the Pitzer equations / database.

My understanding from the documentation is that PhreeqcRM should enforce mole balance for all the elements in its speciation calculations (including hydrogen and oxygen), as well as for charge.  And in fact, most elements (including oxygen) and charge are conserved during the speciation calculations.  However, that does not appear to be the case for hydrogen.

If I specify an initial amount of hydrogen (computed as the component concentration of hydrogen multiplied by the product of porosity, saturation and representative volume) for a reaction cell, and then do a speciation calculation (RM_RunCells), the final amount of hydrogen (computed as the component concentration of hydrogen multiplied by the solution volume) is different from the initial amount.

My question is: Why does hydrogen not satisfy its mole balance equation during a speciation calculation?  Is there perhaps a reason why this constraint has been relaxed?  Or is there a bug in PhreeqRM when it is used together with the Pitzer equations?

Thank you in advance,

Andrew (Hoch)
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4222
Re: Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« Reply #1 on: 06/03/19 16:39 »
A couple comments. First, make sure you have defined PITZER; -redox true. By default one of the mole balance equations needed for redox reactions is not included.

Second, there is no way to specify total hydrogen in an initial solution (SOLUTION) calculation. The total concentration of H is calculated from the distribution of species.

You can set the total hydrogen and oxygen with PhreeqcRM (although there is an option to define H and O or H excess, O excess, and H2O). In PHREEQC, you can also set total H using SOLUTION_RAW or SOLUTION_MODIFY.  If you have set it in this way, and -redox is true, you should get mole balance on H, of course considering any other reactions that may add or remove H.

The RM_DumpModule method in PhreeqcRM will write a SOLUTION_RAW data block after the reactions have occurred. Note that the units of SOLUTION_RAW are moles that are calculated by a conversion from the transport units (often mg/L). See RM_SetUnitsSolution for more details of the conversion.

I don't know of any reaaon to have mole balance errors in H or any other element. If there were, then you would get different concentrations between the RM_SetConcentrations and RM_GetConentrations when there are no reactions defined for a cell. If that is the case, I will take a look at the input and output concentrations for all elements for a single cell to try to figure out why. I would need your database to make calculations. It would also be useful to have a dump (SOLUTION_RAW) of the cell in question.

Logged

Andrew Hoch

  • Contributor
  • Posts: 3
Re: Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« Reply #2 on: 06/03/19 23:00 »
Hi David,

I suspect your first comment could be the explanation of my problem. The keywords "PITZER; -redox true" were not present in my original input data set. And I think you are saying that the hydrogen mole balance equation is omitted as a consequence.

Anyway, after adding the keywords, I get error messages saying:

ERROR: H2(aq) not defined in solution species.
ERROR: O2(aq) not defined in solution species.

Therefore, it appears that I have to change something more when I specify my initial solutions. Currently, I use something like:

SOLUTION 1 # boundary condition water (present at inlet)
temp 20
pressure 1 # this is the pressure applied at the inlet
pH 7 charge
units mol/kgw
Cl 2
Ca 1

But I am not sure how to change this specification (remembering that I am using the Pitzer database, which does not include any redox couples).
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4222
Re: Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« Reply #3 on: 07/03/19 01:53 »
You must define O2(aq) and H2(aq) to ensure that there are redox couples that can respond to redox reactions. The following runs with pitzer.dat.

Code: [Select]
PITZER
-redox true
SOLUTION_MASTER_SPECIES
H H+ -1.0 H 1.008
H(0) H2 0 H
H(1) H+ -1.0 0
O H2O 0 O 16.0
O(0) O2 0 O
O(-2) H2O 0 0
SOLUTION_SPECIES
2 H2O = O2 + 4 H+ + 4 e-
-log_k -86.08
-delta_h 134.79 kcal
-dw 2.35e-9
-Vm  5.7889  6.3536  3.2528  -3.0417  -0.3943 # supcrt
2 H+ + 2 e- = H2
-log_k -3.15
-delta_h -1.759 kcal
-dw 5.13e-9
-Vm 6.52  0.78  0.12 # supcrt
END
SOLUTION 1 # boundary condition water (present at inlet)
temp 20
pressure 1 # this is the pressure applied at the inlet
pH 7 charge
units mol/kgw
Cl 2
Ca 1
REACTION
O2 1
0.25 mmol
END
« Last Edit: 07/03/19 01:58 by dlparkhurst »
Logged

Andrew Hoch

  • Contributor
  • Posts: 3
Re: Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
« Reply #4 on: 07/03/19 06:30 »
That is all very clear now.

Thank you for your help.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Lack of hydrogen balance when using PhreeqcRM together with Pitzer equations?
 

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