0

what if a primary species is not defined in the database?

The modeling I am working on involves some initial species that are not defined as primary species in the database. Although I have figured out how to define a new mineral in the database, but not sure if I can modify or add the basis species? If it is allowed, how do we accomplish this?

8replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • If a component (e.g., carbon or sulfur) is included in the database with a primary species (say, HCO3- or HS-, respectively) that looks different from the species you are considering (say, H2CO3 or H2S, respectively), just use the primary species that is already defined (the form of that primary species does not matter). Do not add a new primary species (for the same component) or the system will be over-determined. If you are talking about an entirely new component (say, aluminum), then you are free to choose the primary species that you prefer (e.g., Al+3, or Al(OH)4-), and all secondary species and minerals reactions (and their log(K) values) must be defined in terms of primary species only. Note that choosing a primary species that is typically a dominant species can significantly help convergence. If desired, the utility kswitch distributed with the code can be used to switch a secondary species with a primary species (and thus recompute all the stoichiometries and log(K)'s in the database to reflect the new primary species).
    Like
  • Thanks for yor information, Nic, that was very helpful. One more question related to this, if the component has several aqueous phases, and one of them is the primary species, do I use the concentration for the primary species as the initial concentration, or do I use the total concentration? (For example, there is fe+2, fe+3, and other aqueous complexes, and I have all the concentration results from Phreeqc. Therefore, not sure which one to use as input to TOUGHREACT?)
    Like
  • In your case you need to enter the total concentration of Fe (with ICON=1).  The true concentration of the actual primary species (and of all secondary species) will then be computed by toughreact from mass-balance/mass-action equations.  In some cases, you may know the actual activity of a given primary species (e.g., 10^-pH for H+).  In this case set ICON=3 and the input concentration will be interpreted as the activity of that specific species, and toughreact will compute the total concentration of that species.

    Like
  • Oh, I see how TOUGHREACT handles the speciation problems.
    I am using Phreeqc to generate realistic initial water chemistry for TOUGHREACT (which will be in equilibrium with the mineral system), because the original data I gave caused the sigular matrix problem. But another problem associated with using Phreeqc is the charge balance issue, I am not sure if TOUGHREACT requires the input initial water to be charged balance (I guess it does, because otherwise it won't run). However, Phreeqc would give charged species in the equilibriated water (such as H3SiO4-), which do not exist as primary species (only SiO2(aq) as primary). So I don't know how would TOUGHREACT handle this?
    Like
  • Toughreact does not require a charge-balanced input water composition.  Any imbalance is carried along during simulations (like a conservative species, changing only when water is evaporated or diluted).  Optionally, if ICON is set to 4 for a charged primary species, the concentration of that species will be computed to yield charge balance.

    Like
  • I am still trying to figure out why I encounter "singular matrix in chemical solver" problem all the time. I have input the initial water composition after equlibriated with the mineral system, but I still get this error message all the time, even with very simple chemistry. I wonder how can we make sure that the chemistry works? This is probably a very broad questions, but really did not understand how the initial chemistry should be set up?
    Like
  • Same here. I always encounter "singular matrix in chemical solver"

    Like
  • A singular matrix reflects an overdetermined system. This could be trying to equilibrate the fluid with two identical or nearly identical phases (e.g. Quartz and amorphous silica, or gypsum and anhydrite) or using primary species that are not fully independent of each other and of the secondary species. For example, if H2O, O2 and SO4 are primary species, HS can't be a primary species because it is a function of SO4, H2O and O2. Conversely, if H2O, HS, and SO4 are primary species, O2 must be a secondary. A third case of singular matrix is Gibbs phase rule violation when concentrations of some species are fixed by equilibrium with minerals an/or gases on input (ICON options). For example, you cannot fix Ca with calcite, HCO3 with given CO2 partial pressure, and fix pH at the same time. This is because any two of these three parameters fix the third one: CaCO3(s) + CO2(g) + H2O = Ca++ + 2HCO3- while at the same time CO2(g) + H2O = HCO3- + H+. etc...
    Like
Like Follow
  • 8 yrs agoLast active
  • 8Replies
  • 2788Views
  • 4 Following