SOLUTION_MODIFY using species, not elements

88 views
Skip to first unread message

Ivan M

unread,
Mar 1, 2013, 10:53:55 AM3/1/13
to phreeqpy-users
Dear all,

Going through the documentation for SOLUTION_MODIFY in the version 3.0 of Phreeqc and IPhreeqc, it seems to be impossible to change the concentration of a species, like O2 or SO4, being only possible to change the concentrations of S and O, for example. 

I'm familiar with the discussion of transporting elements versus transporting species, but in this particular case I have to interface with another code that does some kinetic reactions outside Phreeqc using species, not elements. 

Knowing that, is there a workaround where I can change the concentrations or total number of moles of a _species_ using SOLUTION_MODIFY or other way, either using Phreeqc or other approach, or the only way is doing the kinetic reactions _inside_ Phreeqc and transporting only elements?

Cheers
_________________________________________
Ivan S.P. Marin, PhD
 
Postdoctoral Associate
Département de géologie et de génie géologique
Pavillon Adrien-Pouliot, local 3744
1065. ave de la Médecine
Université Laval
Québec (Québec) Canada
G1V 0A6
418-656-2131 poste 7246

Parkhurst, David

unread,
Mar 1, 2013, 12:00:40 PM3/1/13
to phreeqp...@googlegroups.com
You can do any reaction with SOLUTION_MODIFY, but some do not make sense.

To add a millimole SO4-2, you increase S by 1 and O by 4 and charge by -2 millimoles. However, there is no chemical reaction that adds simply SO4-2; it is a charge balanced addition like Na2SO4, or a redox reaction. If you are oxidizing S-2 to SO4, then there may be no additions to the solution, but in that case, you need to consider S(-2) and S(6) as separate elements in PHREEQC. I am a little worried that your other program is not as careful in defining the entire chemical system as is required by PHREEQC.

David


--
You received this message because you are subscribed to the Google Groups ""phreeqpy-users" group.
To post to this group, send email to phreeqp...@googlegroups.com.
To unsubscribe from this group, send email to phreeqpy-user...@googlegroups.com.
For more options, visit this group at https://groups.google.com/d/forum/phreeqpy-users?hl=en.
 
More information about PhreeqPy can be found at http://www.phreeqpy.com.
---
You received this message because you are subscribed to the Google Groups "phreeqpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phreeqpy-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ivan M

unread,
Mar 1, 2013, 6:34:33 PM3/1/13
to phreeqpy-users
Dear David,

Thank you for your answer. Let me try to explain a bit better, using O2 - I'm planning to do the same with SO4-2 and S2O8: there's a kinetic reaction using O2 that is done in the outside program. There's also transport, that right now is transporting the species, O2, and not the element, O (I can transport the other elements as elements, not species). So I'm trying to do is

1. Advect the substrates, the elements, charge balance, total O and H, and O2
2. Pass the O2 and elements concentrations to Phreeqc
3. Phreeqc returns the reacted values after changing the number of moles using SOLUTION_MODIFY, including changes in the concentration of O2 in solution
4. Use these values to do a kinetic reaction outside Phreeqc
and iterate till convergence. 

The concentrations of O2 will change outside Phreeqc in steps 1 and 4, and these steps, both the advection and the kinetic reaction, use the concentration of O2, not O. The problem lies exactly in step 2: The outside program gives me the O2 concentration, but I can't change the concentration of O2 using SOLUTION_MODIFY. 

Do you think that adding 2 x O number of moles at step 2 (or removing them) would be equivalent to adding number of moles of O2 in a solution in Phreeqc?

Thank you again for your patience.

_________________________________________
Ivan S.P. Marin, PhD
 
Postdoctoral Associate
Département de géologie et de génie géologique
Pavillon Adrien-Pouliot, local 3744
1065. ave de la Médecine
Université Laval
Québec (Québec) Canada
G1V 0A6
418-656-2131 poste 7246


2013/3/1 Parkhurst, David <dlp...@usgs.gov>

Parkhurst, David

unread,
Mar 1, 2013, 10:11:57 PM3/1/13
to phreeqp...@googlegroups.com
Do you think that adding 2 x O number of moles at step 2 (or removing them) would be equivalent to adding number of moles of O2 in a solution in Phreeqc?

Yes. Total O includes O2.

But I am still dubious that your other program will handle the reactions consistently with PHREEQC.

If you are planning to work with SO4-2 and S2O8, then you will need to uncouple these two redox states for phreeqc, otherwise, phreeqc will calculate complete redox equilibrium among all redox species (O2, SO4-2, S2O8, HS-, and all other redox elements--Mn, Fe, etc).



Ivan M

unread,
Mar 4, 2013, 4:58:31 PM3/4/13
to phreeqpy-users
Thanks again, David. 

I'm not sure that my code is right, but it seems that if I try to modify the solution components using SOLUTION_MODIFY with 

-totals
   O2   0.3

or any variation (O(0), O)

the amount of oxygen goes to the total amount of oxygen (that can be obtained by a USER_PUNCH TOT("O")) and not to O2 dissolved in the solution. If I run a similar input file for Phreeqc directly O2 goes to the dissolved oxygen into solution and TOT("O") does not change. What I'm doing incorrectly?

Thanks

Parkhurst, David

unread,
Mar 4, 2013, 5:57:25 PM3/4/13
to phreeqp...@googlegroups.com
You need to increment total_o by the number of atoms of O in the O2 that you want to add.

Ivan M

unread,
Mar 5, 2013, 4:55:41 PM3/5/13
to phreeqpy-users
Hi David,

Adding to total_o the number of atoms of oxygen that comes from O2 indeed worked. 

Now, to decouple the redox equations as you mentioned for SO4-2, I'm trying to use SOLUTION_MODIFY to add only S(6), as the manual states, with

iphreeqc.AccumulateLine("SOLUTION_MODIFY 1");
iphreeqc.AccumulateLine("   S(6)   1");
iphreeqc.AccumulateLine("RUN_CELLS; -cells; 1; END");

But the log generated for the reaction after the SOLUTION_MODIFY indicates that only S was added:

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

Elements           Molality       Moles

S                 1.000e+00   1.000e+00

And all redox states are included, like S(-2), that are undesired. The manual states that if I add a redox state with parenthesis, like S(6), all S will be removed from the solution and S(6) will be added. Could you please point what is wrong with my AccumulateLine statement?

Thanks again. 

Cheers

_________________________________________
Ivan S.P. Marin, PhD
 
Postdoctoral Associate
Département de géologie et de génie géologique
Pavillon Adrien-Pouliot, local 3744
1065. ave de la Médecine
Université Laval
Québec (Québec) Canada
G1V 0A6
418-656-2131 poste 7246


2013/3/4 Parkhurst, David <dlp...@usgs.gov>

Parkhurst, David

unread,
Mar 5, 2013, 5:06:58 PM3/5/13
to phreeqp...@googlegroups.com
Decoupling redox states is more complicated. You cannot do it through SOLUTION_MODIFY.

You need to make definitions in SOLUTION_MASTER_SPECIES and SOLUTION_SPECIES. Example 9 shows how to do it for Fe(2) and Fe(3).

The attached file decouples all redox states of redox elements. You probably want some combination of coupled and decoupled redox states.
redox.dat
Reply all
Reply to author
Forward
0 new messages