Jump to content
Geochemist's Workbench Support Forum

Decoupling iron in a script


Julie

Recommended Posts

Hello,

 

I'm running a script (slightly adapted from that on p 269 of the Reference Manual) in SpecE8 to determine saturation indicies for multiple analyses. I would like to include in that script a means of decoupling Fe2+ and Fe3+. Does anyone know what the code is for decoupling? I'm tried 'decouple iron' with no result.

 

Thanks

Julie

Link to comment
Share on other sites

I've tried 'decouple iron' with no result.

 

Hi Julie:

 

Very minor syntax error- try capitalizing iron: 'decouple Iron' should work.

 

fyi- to test any of these commands, try typing them out in the Command pane of SpecE8 or React.

 

Hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

Thank you Tom!

 

I've included 'decouple Iron' in the script and it is being read however I'm not sure of where to put it to take effect. If I include it prior to the reading of the input file i.e. prior to:

 

set in_id [open "BoreChem Input.txt" r]

 

I get an error "Can't find Iron to decouple". If I include it in the script after the above line then the Fe3+ value is not being read by SpecE8 as I'm using thermo_phreecq.dat as the database and it does not recognise Fe3+ in the input file. Because Fe3+ is not read into SpecE8, the decoupling of Iron isn't possible.

 

My question is, do I need to add Fe3+ to thermo_phreecq.dat to resolve this?

 

Thanks Tom!

Julie

 

 

 

Hi Julie:

 

Very minor syntax error- try capitalizing iron: 'decouple Iron' should work.

 

fyi- to test any of these commands, try typing them out in the Command pane of SpecE8 or React.

 

Hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

Thank you Tom!

 

I've included 'decouple Iron' in the script and it is being read however I'm not sure of where to put it to take effect. If I include it prior to the reading of the input file i.e. prior to:

 

set in_id [open "BoreChem Input.txt" r]

 

I get an error "Can't find Iron to decouple". If I include it in the script after the above line then the Fe3+ value is not being read by SpecE8 as I'm using thermo_phreecq.dat as the database and it does not recognise Fe3+ in the input file. Because Fe3+ is not read into SpecE8, the decoupling of Iron isn't possible.

 

My question is, do I need to add Fe3+ to thermo_phreecq.dat to resolve this?

 

Thanks Tom!

Julie

 

Hi Julie:

 

Can you attach your script so that I can take a look at it?

 

Regards,

 

Tom

Link to comment
Share on other sites

Hi Tom,

 

Attached is the script (BoreChem sp8 Script.txt) and the input file (BoreChem Input.txt). I'm using 'thermo_phreeqc.dat' as it's provided with GWB (ie. I've made no changes).

 

A couple of things seem to be happening:

 

On reading the input file Fe3+ does not appear in the basis list (only Fe2+).

 

As the script runs a series of warnings appear in the Run window that relate to the mole weight of various Fe species being incorrect.

 

I am using the output of the PHREEQC program to compare the saturation results I'm getting from GWB. In both cases 'thermo_phreeqc.dat' is being used and the input data are the same. Because Fe3+ is not being recognised I'm missing a series of Fe3+ bearing phases (hematite, goethite etc.) in the output from GWB which appear in the output of PHREEQC.

 

I hope that makes sense!

Julie

BoreChem_sp8_Script.txt

BoreChem_Input.txt

Link to comment
Share on other sites

Hi Julie:

 

Turns out the solution is rather simple.

 

In the default LLNL database element list (thermo.dat), Fe is termed 'Iron', whereas in the PHREEQC database element list, Fe is termed 'Fe'. So:

 

- the command 'decouple Iron' works for thermo.dat

- the command 'decouple Fe' works for thermo_phreeqc.dat

 

I have changed the decouple command in your script and verified that it works.

 

Hope that helps,

 

Tom

Link to comment
Share on other sites

Hi Tom and thank you!

 

That's working and I'm getting the saturation indices I expected.

 

I do have one more question for you though... I am getting warning messages in the run window indicating that the more weight for all Fe species are incorrect and that what was expected is different to the calculated value. Did you get these same messages when you ran the script?

 

Thanks Tom!

Julie

Link to comment
Share on other sites

Hi Tom and thank you!

 

That's working and I'm getting the saturation indices I expected.

 

I do have one more question for you though... I am getting warning messages in the run window indicating that the more weight for all Fe species are incorrect and that what was expected is different to the calculated value. Did you get these same messages when you ran the script?

 

Thanks Tom!

Julie

 

Hi Julie:

 

Nope- didn't see that message. Can you send me a screenshot showing the exact message?

 

Thanks,

 

Tom

Link to comment
Share on other sites

Hi Tom,

 

Attached is a copy of the warning message about incorrect mole weights for various iron species and minerals.

 

 

Thanks

Julie

 

Hi Julie:

 

My version definitely runs without the error. All of the minerals being flagged in your screenshot are Fe-bearing, and the mole weight errors all vary by exactly the same amount, so my suspicion is that your copy of thermo_phreeqc.dat was compromised. I would guess either the mole weight value for the Fe element or Fe++ basis species.

 

Easiest fix is probably just to download a new copy of the database from the GWB thermodynamic database page.

 

Let me know if that fixes the problem.

 

Regards,

 

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