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.