Jump to content
Geochemist's Workbench Support Forum

Multiple minerals from multiple analyses in SpecE8


Julie

Recommended Posts

Hi there,

 

I'm using SpecE8 in GWB v7.0.6 and running a standard script (p269 of the Reference Manual) to determine saturation indices for multiple analyses. I'm wondering if there's a way to get an output of multiple mineral phases that reach saturation for each set of analyses without specifying what the minerals are in the script. The example on p269 specifies Calcite (and CO2 fugacity) [see script below] but I'm wanting an output of all potential mineral phases that I can export to excel.

 

if {[report success]} {

puts $out_id \

"[report fugacity CO2(g)]\t[report SI Calcite]"

 

Can any one tell me if this is possible and if so what to include in the script to achieve it?

 

Thank you!

Julie

Link to comment
Share on other sites

Hi there,

 

I'm using SpecE8 in GWB v7.0.6 and running a standard script (p269 of the Reference Manual) to determine saturation indices for multiple analyses. I'm wondering if there's a way to get an output of multiple mineral phases that reach saturation for each set of analyses without specifying what the minerals are in the script. The example on p269 specifies Calcite (and CO2 fugacity) [see script below] but I'm wanting an output of all potential mineral phases that I can export to excel.

 

if {[report success]} {

puts $out_id \

"[report fugacity CO2(g)]\t[report SI Calcite]"

 

Can any one tell me if this is possible and if so what to include in the script to achieve it?

 

Thank you!

Julie

 

Hi Julie:

 

Sorry for the delay- since I'm not much of a programmer, I had to consult the GWB developers on this. I'll relay their advice to the best of my understanding.

 

You can accomplish this in one of two ways. The first is to set up a loop that cycles through all the minerals in the database and report those with saturation index reaching a certain criteria. For example, to report all minerals with SI > -5, use the following code:

 

set minerals [eval report all_minerals]
  foreach min $minerals {
  set si [eval report SI $min]
  if { $si > -5.0 } {
	 puts "$min $si"
  }
  }

 

There is one problem with this- the control script seems to fail for multi-word minerals in the database such as "Sanidine high". One work-around would be to remove spaces from multi-word minerals in the database, but this is tedious and less desirable.

 

A better approach would be to use GWB Professional's Remote Control feature. You can read about the Remote Control feature in the appendices of the GWB v7 Reference Manual. An example Tcl remote control script that accomplishes the same thing, but does not run into the multi-word issue:

 

source RC_helper.tcl
OpenGwbApplic {"/Program Files/gwb/spece8.exe"} SendCommand "read freshwater.sp8"

SendCommand "report all_minerals" minerals
foreach min $minerals {
  SendCommand "report SI \"$min\"" si
  if { $si > -5.0 } {
  puts "$min $si"
  }
}

SendCommand quit

 

There's a higher learning curve involve with the latter approach, but in the long run this will open the door to extremely powerful applications.

 

I hope that gets you going in the right direction!

 

Tom

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...