Jump to content
Geochemist's Workbench Support Forum

Resultant Species Not in Tdat?


Erik S Friis

Recommended Posts

Our application has a series of unit ops that does a mass balance using GWB. A unit op can have one or more species as defined in the currently loaded tdat file (data command).

In setting up the basis for the unit op we determine the basis-species for each input species and prorate the amounts. After running the go command we notice that some of the resultant species are not defined in the current tdat. This is a problem as the outputs to a given unit op will be used as inputs to add'l unit ops. Is it normal for some resultant species not to be defined in the current universe of species. Thoughts on how to handle this?

Are we forced to have our users ensure that all resultant species are defined (manually?). Thanks for any insight into the most effective way to handle this.

P.S. is breaking the input species down into the component basis-species to set up the basis the correct approach?

Link to comment
Share on other sites

Hello Erik,

The GWB does not account for species that are not defined in the thermo dataset. In a speciation calculation, you supply the composition of your system and the software calculates the distribution of mass amongst species using thermodynamic information provided in the thermo database loaded. For example, if a system’s composition consists of sodium, chloride, and solvent water at a given temperature, then the program will calculate the mass distributed amongst the dissolved species and minerals given the bulk quantity of each component. If we use thermo.tdat with the system above, the software will calculate the amount of the sodium component distributed between the free sodium ion (Na+), NaCl complex, and the halite mineral if it precipitates (assuming that you are using React). NaCl is not part of the basis species in the thermo.tdat but instead a secondary species that forms from reacting the basis species of Na and Cl, you will find it in the Aqueous Species section. You should never see GWB report a species that doesn’t exist within the dataset loaded. Users can easily edit datasets in TEdit or in a text editor, like Notepad, before the run to account for reactions not in the dataset. For more details, please see section 9 TEdit in the GWB Essentials User Guide.

You set the composition of your initial system using a set of basis species. The basis is the set of aqueous species that appear at the beginning of the thermodynamic database. You can alter the basis by swapping in aqueous species, minerals, or gases that you wish to use to constrain your geochemical system. For example, if your system is in equilibrium to quartz, you will add the component SiO2(aq) to your basis and then swap it for Quartz. For more information on setting up your basis, please see section 2 Configuring the Programs in the GWB Essentials User Guide.  

An important point to note is setting a bulk vs. free quantity in the basis. For example, you can constrain the sodium component in your basis pane by setting a bulk quantity, which would include the total amount of sodium present in all sodium bearing species. Alternatively, you can also set a quantity for the free sodium ion, which does not include the mass of sodium in Na-complexes, and have the software calculate bulk composition. For more details and examples, please refer to section 7.2 Equilibrium models in the GWB Essentials User Guide.

Hope this helps,
Jia Wang
Aqueous Solutions LLC

Link to comment
Share on other sites

Thank you Jia for the quick and detailed reply. If we are breaking down each input species to basis species and aggregating the unique basis species is there a need to use free or should we always be using it? This is still a bit unclear to me as it would seem that the bulk specification of sodium bearing species would be sufficient--makes no sense to me that a bulk specification of the sodium ion would include all sodium in other species...seems like double counting?  Perhaps two small examples (one with free and one w/o) would help.

Link to comment
Share on other sites

Hi Erik,

You're welcome. I am not sure what you mean by breaking down each input species to basis species. A good example of a free quantity is pH. pH is a measure of the activity of H+ alone. When you enter a pH, you're describing the hydrogen only in the H+ form and not including any H that's part of other aqueous species (e.g. CH4) or minerals. A typical use of a free quantity is when a user is setting the fluid in equilibrium with a mineral. For example, if the silica component in your system is in equilibrium with the mineral quartz, you should swap in Quartz for SiO2(aq) in your system. Minerals like this are typically set as a free unit since the amount entered represents only the silica that exists as quartz not the silicia in dissolved species such as SiO2(aq). 

On the other hand, most chemical lab analysis of a water sample provides bulk quantities. In natural waters, sodium may exist in fluid as Na+, NaCl, NaHCO3-, NaOH, and more but the measured concentration only reports the total quantity of Na+. When you enter this bulk concentration in the basis, the software solves a set of matrix equations to distribute the total mass of Na+ amongst all Na-bearing species. The bulk concentration is not just the dissolved Na+ ion alone. Please see section 7.2 Equilibrium models in the GWB Essentials User Guide to see a seawater speciation example. 

Hope this helps,
Jia

Link to comment
Share on other sites

Well what I mean by breaking down each input species is let's say the inputs to one of our unit ops consists of two species (an oxide and a mineral) and a given quantity of water. In order to specify the basis in mg/Kg we know the mg/Kg of each species and the amount of water but need to specify the basis in terms of mg/Kg of the basis species that the oxide and mineral are composed of, no? Since we know the mole weights of each basis species we can prorate the original densities to each basis species include H2O which is already a basis species and then sum? At that point we can specify the basis and run the go command to obtain our outputs. Is this not the correct approach? Thanks for any add'l insight.

Link to comment
Share on other sites

Here's an example of how we reduce the input species to basis species and prorate to form the basis:

tdat←'c:\Program Files (x86)\Gwb\Gtdata\thermo_coldchem.tdat'
      gwbLoadTdat tdat
94 1 1 1 1 1 1 gwbAllocToBasis 'H2O' 'Ca++' 'HCl' 'K+' 'K2O' 'Na+' 'SO4--'
 H2O   94.191244070000
 Ca++   1.000000000000
 H+     0.006246751707
 Cl-    0.972351747200
 K+     1.830157433000
 Na+    1.000000000000
 SO4--  1.000000000000
 

I suppose these concentrations would all be considered "bulk" as we are doing the calculations to determine the total concentration of each basis species. We are doing this b/c HCl and K2O are non-basis species in the thermo_coldchem database. I'm not sure if there's another (or simpler) way to do this.

Link to comment
Share on other sites

Hello Erik,

If a mineral is known to be in equilibrium with the fluid in your system at the start, then you would swap in the mineral in the basis and allow the program to calculate the dissolved concentration in equilibrium with that mineral. You shouldn't convert a mineral into aqueous species and then sum those concentrations into the basis pane. For example, if your fluid is in equilibrium with Quartz, add SiO2(aq) into the basis and then swap it for Quartz and set the volume of quartz. The speciation calculation in the GWB will calculation the dissolved silica component in addition to the mineral you input. In your input file, it'll look like this:

swap Quartz for SiO2(aq)
Quartz       = 1 free cm3
 
Also, you don't have to keep to mg/kg as the unit. The GWB accepts many units for minerals and dissolve species concentration. To see all units recognized by the GWB, see the GWB Reference Manual. 
 
I think it would be really helpful for you to revisit the sections in the Essentials User Guide on how The GWB configures its geochemical system. The best place to start would be in section 2.1 Configuring a calculation and 2.2 Setting and constraining the basis. You can find the commands accepted by each GWB app in the GWB Command Reference. 
 
Hope this helps,
Jia
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...