Jump to content
Geochemist's Workbench Support Forum

Some General GWB Questions (Using GWB API)

Recommended Posts

Here are a few general GWB questions.

1. When GWB is loaded is the default database thermo.tdat if no other database is specified?

2. Can only a single database (tdat) file be loaded at one time?

3. When a tdat file is loaded is that the entire universe of elements, basis species, species that GWB is aware of?

4. When specifying the "inputs" to a reaction before the Go command is executed, will the inputs only consist of basis species? Or can they be gasses, minerals, oxides, etc too (i.e. any non-basis species)? In talking to a colleague we speculated that aqueous species could also be inputs (e.g. copper cyanide) but the swap command (which I have not looked at yet) would need to be used. Is this the case?

It seems like several constraints (e.g. pH can also be entered) at this stage as well.

5. If an input to a unit operation in our application contains component(s) that are not known by GWB (i.e., not in the tdat) file is that a viable scenario? I'm a software engineer, not a chemist so sorry if this is a stupid question, but I guess what I'm asking is what is specified in the tdat file a hard constraint?

6. Regarding the resultant species from the reaction (after the Go command is issued) will all of these species be defined in the currently loaded tdat file or can we get resultant species from the reaction that are not defined in the file?

Thanks for any insight.

Link to comment
Share on other sites

Hi Erik,

  1. A user can specify under File > Preferences… in most apps (or the Settings tab of the GWB dashboard) the default thermo dataset to be something other than thermo.tdat. One can also specify a default dataset using an environment variable (see 2.3 Thermodynamic datasets and 2.8 Environment variables in the GWB Essentials Guide). 
  2. Yes, a single .tdat file can be loaded at a time. If you incorporate surface chemistry in a calculation, however, you load one or more surface (.sdat) datasets in addition to the thermo dataset.
  3. Yes, that's correct.
  4. The input at a basic level consists of a description of the temperature and chemical composition of the system. Beyond constraining the original basis entries, you might use basis swaps to prescribe equilibrium with gases of known partial pressure or minerals in equilibrium with the fluid (e.g. swap O2(g) for O2(aq); P O2(g) = .2 bars). The pH setting is just a special constraint for the H+ basis entry. Additional options can be specified as well (constraints for isotopic calculations, suppressing certain species, controlling the extent of redox disequilibrium, and so on). You can find the complete set of input commands in the GWB Command Reference. Each app (e.g. SpecE8, React, ...) has its own chapter. You might also look at the example files included within the Script folder of the software. Each is described in one of the User’s Guides (e.g. SpecE8 in the GWB Essentials Guide, React in the GWB Reaction Modeling Guide). 
  5. GWB won't be able to do anything with components it doesn't know about. So you could not tell GWB about them, or get an error if you do, I suppose. A user can edit the thermo dataset before a run if additional reactions are needed.
  6. The species and components and so on included in the output file will all be defined in the thermo dataset in use. The output also includes a few specially calculated parameters (e.g. total dissolved solids, carbonate alkalinity, fluid density, and so on) that are not defined in the thermo dataset.

Hope this helps,

Brian Farrell
Aqueous Solutions

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.

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.

  • Create New...