Jump to content
Geochemist's Workbench Support Forum

webmaster

Admin
  • Posts

    225
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by webmaster

  1. From: Andy Wilde Subject: Bad pivot error I am attempting to simulate the reaction between hydrothermal brine and various rock types. The model proceeds in two stages: 1) Equilibrate 1.2 kg of brine with 25 kg of rock. 2) Pickup the products of above and flush through 1200 kg of brine. This approach has worked for several rocktypes, but not the carbonaceous shale. The latter generates the error *Bad Pivot* at the pickup stage and tells me that Ca++ needs to be defined even though it is defined at both stages of input. Can anyone help with this problem?
  2. From: Paul Foellbach Subject: EQ3/6-GWB database I would like to use a 200 bar file of EQ3/6 with GWB. How can I convert an EQ 3/6 database to the format of a GWB database ? From: Robert C Lee Subject: Re: EQ3/6-GWB database Paul, converting the EQ3/6 database requires: 1) re-writing the reactions to the basis set of GWB. 2) reformatting the info to the GWB thermo-file format. This functionality is something we are working on for T-Rex (the Geochem Thermo Archive) - but it's all still in alpha stage while we nail down the specifics of the XML definition for thermo data.
  3. From: Tullis Onstott Subject: Salinity effect on CO2 solubility We have some researchers here at Princeton working on injecting CO2 into deep, brine-filled, reservoirs and I was wondering where a good source of experimental data for the effect of salinity on CO2 solubility can be found? From: Mark J. Logsdon Subject: Re: Salinity effect on CO2 solubility This is discussed generally in Holland and Malinin (1979), The Solubility and occurrence of Non-Ore Minerals, in H.L. Barnes (ed), Geochemistry of Hydrothermal Ore Deposits, 2nd ed, p. 461-508, esp. pages 481-482. Their Fig. 9.16 cites experimental data from Holland and Borcsik (1965) and Ellis and Golding (1963), and the text gives an empirical relationship of calcite solubility to ionic strength due to Malinin (1975; a publication that looks to be available only in Russian). From: Robert G. Benson Subject: Re: Salinity effect on CO2 solubility In addition to the sources that Mark suggested, McKibben and Hardie, 1997, Ore-forming Brines in Active Continental Rifts, in Geochemistry of Hydrothermal Ore Deposits, 3rd ed., pp. 877 -935, have analytical data from a number of brines. I don't work with these systems much, but hope this helps too. I ran across this stuff earlier today looking for ideas for a geochem test.
  4. From: Jennifer Houghton Subject: Difference between Unix and PC versions I am trying to set up a simple problem in React for a class I teach (illustrating complexation) and the older Unix version will allow me to solve it while the newer PC version will not. Any ideas? The script is: Cu+ = 10 mmolal Na+ = 10 mmolal Cl- = 20 mmolal slide log activity Cl- to 1 go I've tried many variations on the PC and I keep getting booted out of the program completely with a message that says "lost species". The Unix version will solve this problem. From: Craig Bethke Subject: Re: Difference between Unix and PC versions React release 3.0.x sometimes has a problem in that it "loses" the charge balance species, or a species set at fixed activity. The problem is a memory allocation error and affects only the first species in your run, when the species are listed in alphabetical order. This bug will of course be fixed in future releases. There are a number of workarounds, but the simplest is to add to your run a species such as Ag+ that appears early in the alphabet. For example, if you include the command Ag+ = 10^-12 molal in your script, it will work fine.By the way, the script as it is set up has charge balance problems. You might add the command balance on Na+ to eliminate these.
  5. From: Garry Davidson Subject: Solubility contours Is there a way of getting GWB to draw solubility contours for, for instance, Zn in the pyrite field on an fO2-pH diagram at a given T? From: Craig Bethke Subject: Re: Solubility contours You use program Act2 to make fO2-pH diagrams. To make a "contoured" diagram, calculate a diagram for each contour level. Then, copy each diagram to the clipboard, paste it to an illustration program like PowerPoint, and assemble the final diagram as a composite of the individual calculations.
  6. From: Paul Foellbach Subject: Boiling Is there a possibility to model with GWB the process of boiling and phase separation between fluid and vapor ? Could I model with GWB a boiling hydrothermal fluid, that is depleted of the gases while boiling ? From: Craig Bethke Subject: Re: Boiling You can use React to trace simple boiling models: the gas reservoir must be of sufficiently large size that boiling the fluid does not affect the gas composition. To run such a model, fix the fugacity of each gas in the gas phase and then remove H2O from the fluid. The program, however, can not model the more complicated case in which an increase in system volume (or decrease in pressure) causes a gas phase to form and grow. To my knowledge, the only geochemical model to do this well is Mark Reed's CHILLER program. He is at the University of Oregon, e-mail mhreed(at)oregon.uoregon.edu.
  7. From: Dick Glanzman Subject: Multiple Species The water analyses from which I am trying to input the data include multiple species: for example, ammonium and nitrate plus sulfide and sulfate. I understand that one can be swapped in but does this not change the basis so that only one of the species is accepted in the modeling? Is there a technique to enter multiple species? From: Craig Bethke Subject: Re: Multiple Species When you have analyses of an element in its different redox states, you use the "decouple" command to configure a model accounting for redox disequilibrium in the fluid. For discussion and examples of doing so, consult the green book and the GWB User's Guide.
  8. From: Henry Kerfoot Subject: Perchlorate I am trying to assess the reduction of perchlorate by addition of organic compounds. However, GWB wants an initial chloride concentration. It seems as if decoupling ClO4- and inputing both initial chloride and Initial perchlorate concentrations results in a lack of reduction of perchlorate, even when elemental Carbon is being formed. Even kilogram amounts of Ethanol do not reduce 225 mg/l perchlorate (but make methane) ... My script for reaction with 0.3 mole Ethanol is attached ...... If I swap ClO4- for Cl- with the two coupled, the Step 0 concentrations in the output show Cl- but no ClO4-. Sometimes I get two sets of Step 0 outputs, and I always thoughtv that the first was the input data and the second showed the results of initial equilibration of the system .... In Step 0 (the first Step 0, where the initial equilibration has not yet occurred, with reactants not consumed at all) I find chloride but no ClO4-. (.. So, it seems as equilibration has taken place ... ??) What is the appropriate method to evaluate the reduction of perchlorate by Ethanol, if there is one? Am I missing a command that would allow me to do this? From: Craig Bethke Subject: Re: Perchlorate Try this: first decouple chlorine compounds (since you don't want to set a redox equilibrium between perc and chloride) and carbon compounds (since you want your reductant to be in redox disequilibrium w/ carbonate). Then set a kinetic rate law for the reaction you want to model. E.g., 3 ClO4- + 2 Ethanol -3 Cl- + 4 HCO3- + 4 H+ + 2 H2O From: Henry Kerfoot Subject: Re: Perchlorate I am getting a message that says the kinetic law is applicable only to Minerals.....? I seem to get that message when I try to input first-order perchlorate decay ..... With the perchlorate and ethanol decoupled, the O2(aq) (approximately 5 mg/l) does not seem to react with the Ethanol either ...... My objective is to model the reaction of Ethanol with the stoichiometric amount of perchlorate (including O2(aq) and nitrate electron demands) and to observe what happens to the dissolved manganese concentration with and without addition of CO2(g) for pH control. For 225 mg perchlorate (and 5 mg O2(aq) and 10.5 mg NO3-) I am adding 75.15 mg Ethanol. From: Craig Bethke Subject: RE: Perchlorate You need to set a kinetic redox, not mineral reaction. There are examples in the User's Guide, under “Kinetics of Redox Reactions�.
  9. From: Laiq Rahman Subject: modelling solid and gas phases in C-O-H system I'm having some trouble using GWB to investigate the relative redox potentials of solid-gas and gas-gas phase equilibria for the C-O-H system. I've arbitrarily chosen a few carbon redox couples from a C-O-H ternary diagram, and listed the couples below, in the order that I think is correct (most reducing on the left, most oxidising on the right) i.e., C/CH4, C/CO, C/CO2, CH4/CO, CH4/CO2, CO/CO2, I'm using RXN to fix log f O2(g) for each reaction by generating the basic equations and swapping in the required phases if necessary e.g., react CH4(g) swap O2(g) for O2(aq) swap CO2(g) for HCO3- long Which gives CH4(g) + 2 O2(g) = CO2(g) + 2 H2O Setting fugacities of CH4 and CO2 to unity, and activity of H2O to unity, I get log K = -2 log f O2(g). I divide the log K values at each temperature (0-300C) for this reaction by 2 to get log f O2(g), and use a spreadsheet to plot a graph of log f O2(g) vs each temperature. As another example, C/CO, has a log K = -1/2 log f O2(g), and for which I multiply log Ks by 2. By repeating a similar procedure for the other redox couples, I can then view their relative positions on a graph. I would expect the results to show that CH4/CO2 is relatively more reduced than CO/CO2, and CO/CO2 to be the most oxidised couple in the C-O-H system. However, from the calculated log f O2(g) values below, CO/CO2 appears to be the most reduced! For example, at 25C, I get the following log f O2(g) values (fugacities for all gases except O2(g) = 1bar, activity H2O =1) C/CH4 log K = log f O2(g) log K = - 74.2192 therefore log f O2(g) = - 74.2192 C/CO log K = - 1/2 log f O2(g) log K = 24.0309 therefore log f O2(g) = - 48.0618 C/CO2 log K = - log f O2(g) log K = 69.0888 therefore log f O2(g) = - 69.0888 CH4/CO log K = -1.5 log f O2(g) log K = 98.2502 therefore log f O2(g) = - 65.5001 CH4/CO2 log K = - 2 log f O2(g) log K = 143.3080 therefore log f O2(g) = - 71.654 CO/CO2 log K = - 1/2 log f O2(g) log K = 45.0578 therefore log f O2(g) = - 90.1156 Is my treatment of the solid and gas phases fundamentally wrong? Perhaps I'm not fixing the correct phase(s)? I'm using GWB v3.0 and log Ks are from the thermo.com.v8.r6.full database. From: Craig Bethke Subject: Re: modelling solid and gas phases in C-O-H system I think you might have gotten a little turned around in your thinking. Look at it this way: if the equal fugacity point of the CO2/CO reaction is at higher redox potential than that of the CO/CH4 couple, then CO would be the stable gaseous form of carbon over a range of redox conditions, and we would all probably be dead!
  10. From: Megan Elwood Madden Subject: Precipitation of primary minerals at 25 C I have been running some simple low temperature (25 C) basalt-water reactions and I am a bit puzzled by the mineral assemblages which are predicted-- Diopside, Epidote, Grossular, Albite, Annite etc. I would assume that these high temperature minerals would not be precipitating in a chemical weathering environment at 25 C. Why does this happen? Any ideas about how I can correct for this? I've suppressed many of the minerals I find particularly troubling (Diopside, grossular...) but in some cases that would include the majority of the minerals predicted and many times other questionable minerals are predicted instead. From: Mark J. Logsdon Subject: Re: Precipitation of primary minerals at 25 C Your question is a good one. We had an attempt at a discussion of this a number of months ago in the GWB user group, but it didn't get as far as I would have hoped. Later today I'll look through my archive and see if I can find that - I will forward it to you if I do. The short answer is that the program is converging on the lowest G assemblage that is permitted by the database. (See Chapters 3 and 5 of the Green Book.) So long as the database you are working with contains these phases, they must be part of the computation. The situation is equivalent to the one outlined in several places in the Green Book and the user's manuals where the proposed approach for ferric oxides at low-T is to use external information (your geological knowledge) to **assume** that ferric iron will not precipitate initially as hematite or goethite, but rather as an amorphous ferric oxyhydroxide Fe(OH)3 ("ferrihydrite"). Again, one can usefully **assume** that, at 20C or less, SiO2 will not precipitate as quartz, tridymite, or cristobalite, and perhaps not even as chalcedony, so you would suppress those phases, and the model will "precipitate" only amorphous silica. There are lots of other examples - dolomite as a plausible phase with respect to Mg controls, etc. The difficulty, as you are seeing, in working with a complex solution is that the database may contain some hundreds of minerals, and it can take a long while to clean up the database for your purposes. The way React is coded currently there is not any easy way around this. [You have to do the same thing (i.e., subjectively determine or at least constrain the acceptable mineral phases) in PHREEQC, but you build from the bottom up, so to speak, by adding phases for the model to consider rather than by subtracting them from the superset. This seems easier, but in some ways places more of a burden on the modeler because you may not know in advance how to build the set and so could artificially limit the solution. In GWB (assuming you are satisfied with the mineral database) you can screen downward by looking at the saturation indices and comparing them to your prior-knowledge base. It just takes a while. Here's a possible strategy that I sometimes find helpful: 1. Run React with "precip off". This will simply give you the apparent saturation state of the solution. You may or may not want to set "species" and "saturations" to "long" - you'll probably have to experiment with that. Then critically evaluate the output and set up a list of phases to be suppressed. 2. Re-enter the model, including the suppressed minerals (remember to reset "precip"). 3. Check the output again (and again) until you have purged the active database of all the phases you wish the calculations **not** to consider. 4. Save this input model as a "script" so that you don't have to go through all this pain on every simulation. (Then save your subsequent simulations with other names, of course.) You can easily make changes to the script at the beginning of the simulation runs if, for example, you decide to look at the differences that would arise from assuming chalcedony saturation instead of amorphous silica (by "unsuppress"=ing the phases you wish to add back in). This may seem pedantic, but I have found that the systematic approach actually (a) is more efficient in the long run and ( serves to focus my attention on the subjective nature of the modeling process. [You could also create a custom database with only the mineral phases that you wish to consider -- but be **sure** to follow the guidance on how to do this and also how to re-name your custom database. I get nervous messing about with databases and personally prefer to deal with the problem on a more ad-hoc basis. Also, the code is so fast on any plausible First-World computer that there is no great advantage in terms of modeling time to working with the sparse database. However, if you are going to be using this for thesis research, for example, you may want to consider this in the interests of elegance. Obviously, if you do this, it becomes harder to add phases back in if you change your mind or problem, because you will have to re-enter the database again before you begin modeling. This all strikes me as a matter of taste.] From: Craig Bethke Subject: Re: Precipitation of primary minerals at 25 C Mark gave you some good advice. It looks to me, however, like you may be having a different kind of problem. You haven't included an example of your input, so it's difficult to say for sure, but it looks to me like your reaction path is producing an alkaline fluid. If you are trying to model the weathering of basalt by reaction with water, this is the inevitable result. The hydrogen ions in solution are consumed by the dissolution reaction, which proceeds by proton attack. Real weathering, on the other hand, is driven by CO2 from the soil zone and atmosphere. Have you included CO2 in your model? If you do, your reaction path will remain acidic and you will not get the unexpected phases you mention.
  11. From: Paul Foellbach Subject: Volatility ratio respected in GWB ? Drummond and Ohmoto modeled the process of boiling hydrothermal systems 1985. They worked with the volatility ration (VR), a mass distribution coefficient for the partitioning of a volatile species. The ration is a relative measure of the affinity of a gas for the vapor phase in a liquid-vapor system and can be related to the Henry's law constant ration of pressure/molality for the volatile species by VR = K*V/ZRT where V is the specific volume of water vapor and Z, R and T are the compressibility factor (PV/nRT) for the gas in the vapor phase, the gas constant and absolute temperature. Is this volatility ratio respected in the calculations of GWB for the species CO2, H2S, CH4, H2 and SO2 ?
  12. From: Ross McCartney Subject: Calculations at pressures in excess of steam saturation pressures I have React release 3.1.2 and would like to undertake simple equilibrium calculations on some sedimentary formation water analyses (TDS < 20000 mg/l). Reservoir conditions are: T ~ 100oC and pressure ~ 400 bar. I only have analyses for major ions and I am only interested in determining whether equilibrium exists with a few minerals. Ideally, I'd like to modify 'thermo.com.v8.r6+.dat' so that (a) it contains a subset of constituents/species/minerals already present and ( so that the thermodynamic data are appropriate for the reservoir conditions. Any tips/guidance that anyone can offer will be greatly appreciated. I already have log K values for the species/minerals of interest at 0, 25, 60, 100, 150, 200, 250 and 300oC and 400 bar from SUPCRT92. From: Ross McCartney Subject: Re: Calculations at pressures in excess of steam saturation pressures I recently posted a message (see above). Based on the replies I received, the advice was.... 1. Substitute the log K values for those I have obtained from SUPCRT (ensuring that the reaction conventions in thermo.com.v8.r6+.dat are followed). 2. Change the numbers in the headings in each section (xx basis species, etc). I didn't receive any advice regarding the first section of the thermo.com.v8.r6+.dat data set and would be grateful for your further input: a) I tried modifying the 'pressures' in thermo.com.v8.r6+.dat to my pressure of interest (400 atm) but the pressure indicated on the React output was still the steam saturation pressure. Where are the pressure data used in React and is React using my input pressure or not? If I was to input data for 500 atm is there likely to be a problem? I ask this because 500.000 appears to be a flag to indicate no data in the dataset. c) Are the debye-huckel A and B, b-dot, c CO2, and c H2O terms pressure dependent? If so, are there any references that indicate how I can calculate these values for pressures other than those on the steam saturation curve. d) Are there any other bits of advice you can offer on the use of React for higher pressure calculations? From: Craig Bethke Subject: Re: Calculations at pressures in excess of steam saturation pressures a) I tried modifying the 'pressures' in thermo.com.v8.r6+.dat to my pressure of interest (400 atm) but the pressure indicated on the React output was still the steam saturation pressure. Where are the pressure data used in React and is React using my input pressure or not? The value you set for pressure in the thermo dataset has no actual effect on the calculations, which use the log Ks as specified. For some reason React seems to indicate a pressure of 1 atm when temperature is 100°C or below, but you can ignore this. We will investigate. If I was to input data for 500 atm is there likely to be a problem? I ask this because 500.000 appears to be a flag to indicate no data in the dataset. You can safely set a value of 500 for parameters in the header section.To check this yourself, set a value of 499.9999 and see if your results differ from when you set a value of 500. c) Are the debye-huckel A and B, b-dot, c CO2, and c H2O terms pressure dependent? If so, are there any references that indicate how I can calculate these values for pressures other than those on the steam saturation curve. Pressure affects both the ideal and nonideal components of the free energy change of reaction, so to be complete you would need to adjust both log K values and activity coefficients. Lewis and Randall, Ch.20, for example, give the relationship for the pressure dependence of the activity coefficient. Theory aside, however, I don't know of any practical advice for making this correction, which most people simply ignore.
  13. From: Paul Foellbach Subject: Arsenic (As) I attempt to work with the element Arsenic (As). The basis contains H2AsO4-. Is it possible to constrain a fluid composition by the concentration of the element As, for example As= 0.31 umolal) ? Or is the actual thermodynamic knowledge of As limited to species like H2AsO4- ? From: Craig Bethke Subject: Re: Arsenic (As) If there is only one basis entry for As (i.e., if you haven't decoupled any As redox reactions), then the arsenic concentration in umolal units expressed as elemental As is the same as concentration expressed in terms of the basis entry H2AsO4-, so you can enter these values to React directly.
  14. From: Matej Dolenec Subject: changing screen font size How can I change my screen font (text mode)? Right now I must used the magnifier to see anything. From: Craig Bethke Subject: Re: changing screen font size In the current version, the lettering in the text windows is unfortunately of fixed size, 10 pixels across by 16 high. Most people consider this to be reasonably large lettering. We are not sure from your message if the lettering on your computer is difficult to read in general, or if you have vision limitations and would benefit from larger lettering. If the former is the case, we suspect that your display is set to a resolution too high for your monitor. For example, if your display is set to 1280 x 1024 pixels, you might try 800 x 600. If this does not work, perhaps you can paste a screen capture into a document and send it to us by e-mail, so that we can see how the window appears on your computer. If the problem is with limited vision, however, then we will look at our code to see if we can produce a special "large text" version for you. If we are successful at changing the font size, I will make sure that future releases let the user choose a size. I'm sure that other people would appreciate such a feature.
  15. From: Paul Foellbach Subject: How can I include oxide components in the basis ? I attempt to build reactant, that has got the composition of a basalt. I would like to constrain a initial system by the components of SiO2, Al2O3, Fe2O3, FeO, MnO, MgO, CaO, Na2O, K2Oand H2O, I like to use this components to define the Basalt composition. For example, basalt components: SiO2 = 50.61%, Al2O3 = 15.93%, Fe2O3 = 1.42% ..... I can constrain SiO2(aq) and H2O, but how can I include the oxides into the calculation and in the basis? From: Craig Bethke Subject: Re: How can I include oxide components in the basis ? You cannot constrain the composition of a fluid by equilibrium with a set of oxide components because oxide components are fictive. In other words, they are simply a mathematical tool for describing composition. They do not actually exist as species or phases, and we do not know their chemical potentials. There are two ways to formulate the problem you describe. First, you can constrain the initial system by equilibrium with the minerals that actually compose the basalt. Second, you can take a fluid (perhaps rainwater?) and titrate the oxide components into it until you reach an invariant point. In this case the oxide are simple reactants; they are listed at the end of the thermo dataset.
  16. To: Paul Foellbach Subject: How can I edit the axis lables How can I edit and modify the axis labels ? From: Craig Bethke Subject: Re: How can I edit the axis labels To edit a plot from the GWB, choose “Copy to Clipboard� from the “Edit� menu, then paste the image into an Illustration program, like PowerPoint. Ungroup the graphic elements, as necessary, and click or double-click on any element to edit it.
  17. From: Ross McCartney Subject: Activity coefficients for neutral species In the user's guide (p. 172) it states that activity coefficients for CO2(aq) and some other electrically neutral species are calculated using coefficients derived from the "c co2" data in the thermo.dat dataset. However, using this data set for an equilibrium calculation I am getting CO2(aq) activity coefficients returned as "1.000" for a solution with ionic strength of 0.5. I've repeated the calculation using the thermo.com.v8.r6+.dat dataset and in this case the activity coefficients of all neutral aqueous species are returned as "1.000". Are these activity coefficient calculations optional and if so, how do I opt for them? I'd be very grateful for any advice. Many thanks. From: Craig Bethke Subject: Re: Activity coefficients for neutral species You can indeed control the method for calculating activity coefficients for neutral aqueous species. You do this in the thermo dataset by using the value of the species' ion size parameter (a0) as a flag. Specifically: When a0 = 0 (or any positive value), gamma is set to 1.0. When a0 = -.5, gamma is set to the value calculated from the C-CO2 block you mention (see the "green book" for details). And when a0 = -1, gamma is set to 10^(B-dot * IS), where B-dot is the b-dot parameter, of course, and IS is the "true" ionic strength. From: Ross McCartney Subject: Activity coefficients for neutral species I recently posted the question below to which Craig kindly provided an answer. However, can anyone tell me the source of the equation when gamma is set to 10^(B-dot * IS). Is it Helgeson and Kirkham (1974)? From: Craig Bethke Subject: Re: Activity coefficients for neutral species Ross, I don't know if this equation is in H+K 74 (why don't you take look?), but it is a widely used relationship for estimating activity coefficients for neutral species. For example, see p. 442 in Anderson and Crerar's text. In my class, we call it the "salting out equation", but maybe we just made that up. I've also heard it called the Setchenow equation. From: Mark J. Logsdon Subject: Re: Activity coefficients for neutral species Setchenow Eqn - see also the Langmuir text (1997), p. 144-145, which cites Lewis and Randall (1961). Also includes a table with "salting-out" coefficients for molecular species in NaCl solutions at 25C (with citations to sources).
  18. From: James Laurinat Subject: Scripting GWB REACT Is there a way to run REACT and save output files and command line input and output from a script file, either from Windows or MS-DOS? I would like to automate REACT calculations for a matrix of solution temperatures and compositions. Currently, I run a single-user license copy of REACT (Version 3.1) from Windows 98. From: Robert C Lee Subject: Re: Scripting GWB REACT Scripting was much easier when GWB used to be supported on UNIX (subliminal message: Port GWB to Linux NOW.). Before I continue, I should mention that PHREEQC is designed to be "script" driven - you may consider it. For GWB, it is still doable in Windows. Here is one approach: Simply supply the list of commands in a linear manner (just as you where sitting in front of the terminal) in an long input script. Then supply this script to react via "react -i myinput.dat". myinput.dat will look something like: # React script "Model 1" pH = 7 T = 25 total mg/l Ca++ = 31 [..more basis species here ] go $ren react_output.txt model1_out.txt reset # React script "ModelN" pH = 7.21 [..more basis species here ] go $ren react_output.txt modelN_out.txt reset [ more input ] The KEYS to this approach are: *The forked command to the shell "$ren react_output.txt model1_out.txt". This renames the default output so it doesn't get overwritten in the next run. You can fork *any* command to the shell using the "$", like "$format c:" if you like ;-) *The "reset" command - so you start the next run with a clean slate. Some Caveats are: *You'll have to rig a way to capture the messages to the terminal (the > "STDOUT") during execution if you want that info for each run (like electrical imbalances, etc). I know of no way to do this in Windows. *It will look ugly - the "MS-DOS" command window will pop up and disappear with each "$" command. Ignore it. From: Craig Bethke Subject: RE: Scripting GWB REACT A facility for just this purpose already exists in Windows (at least NT/2000/XP, its functionality in Win98 is somewhat limited, as I remember): it's called a “named pipe�. You write a master program in some language, open a named pipe, and then launch React as a slave program, using the named pipe as the input file. Now output to the pipe from the master program becomes input to React. You can also redirect the output stream. There's info on named pipes in most any advanced programming text, and on Microsoft's web site. From: Joel Brugger Subject: RE: Scripting GWB REACT I have also been calculating matrices of results for wide ranges of temperatures and fluid compositions. I am also planning to use react to calculate speciation within non-linear least-square regression programs to interpret solubility experiments. I am using a high-level programming language (in this case Matlab) to construct a *.rea script file, run GWB, and then extract the information I'm interested in from the react.output file. This works fine, but it is quite slow because it involves thousands of restarts of the react program. I have been campaigning for a more efficient way to communicate between react & external applications such as Matlab or visual basic. The most primitive - but already mightily powerful! - solution I can think of involves the possibility to give commands in the react window using a scripting language such as Visual Basic. The trick is to let the scripting application know when react has finished the calculation. I would appreciate advice about how easy it is to implement such capabilities in react. Also, please rise your hands if you are interested in such functions - may be there is a market out there for users who wish using react as a module in their own software! From: Robert C Lee Subject: RE: Scripting GWB REACT Joel - you're right. It would be wonderful for GWB to have a programmable library - in the same grain as the GNU math library. A library with a few simple calls would do the trick - just to make it easier to extend GWB. The user community could then work out the appropriate bindings for languages like Perl, Python, Matlab, etc. This is one way GWB could capture the some of the OpenSource excitement without giving away it's code entirely. From: Craig Bethke Subject: Re: Scripting GWB REACT To amplify on Rob Lee's comments: (1) Actually, GWB input is fully scriptable. Just create a file of input commands using a text editor. Then load the file by choosing File; Read Script, or by typing “read filename�. You can even read scripts from within scripts, using the “read� command. (2) Instead of renaming the output files to preserve them once they are created, it's probably easier to use the “suffix� command to give the file from each run a unique name. (3) If you'd like to eyeball the output from each run, you can put in your script a “pause� command after each “go�. Just hit the return key to continue executing the script. From: James Cleverley Subject: Scripts for GWB I am playing with scripting in react since the recent discussion and I am wondering if it is possible to implement C shell commands from with in the script such that you can include loops to define variables. For example measuring solubility over a range of redox-pH conditions where a nested loop in the script changes pH and redox variables for each run. $pH = 10 While $pH > 1 then log f O2(g) = -40 pH = $pH suffix $pH go $pH = $pH - 1 end loop
  19. From: Craig Bethke Maybe my calculator has a bad chip, but when I add up the mole weight for this compound, I get 1070.484 g/mol, not 1071.8606.
  20. From: Andy Wilde I'm attempting to add data for stilpnomelane to the database. When trying to read the new file I get the message: reaction mass imbalance by -2. I have checked the reaction stoichiometry and formatting (see below) but cannot work out the error. The offending data (minus formatting): Stilpnomelane type= formula= K.625Fe6AlSi8O21(OH)5.625:1.5H2O mole vol.= 375.390 cc mole wt.= 1071.8606 g 6 species in reaction -15.6250 H+ 0.6250 K+ 6.0000 Fe++ 8.0000 SiO2(aq) 1.0000 Al+++ 12.1250 H2O 99.9999 99.9999 99.9999 99.9999 99.9999 99.9999 99.9999 99.9999 * gflag = 1 [reported delG0f used] * reference-state data source: 89Miy/Kle * delG0f = * delH0f = -2736865 cal/mol * S0PrTr = 215.7 cal/deg/mol
  21. From: Robert C Lee Your solutions look sort of electrically imbalanced - perhaps you should use a solution composition more realistic in its distribution of elements. For any benchmark calculations, I would suggest performing the classic aq. geochem. problems first B seawater speciation, K-spar dissolution, seawater evaporation, etc. A lot has been said about these problems so it should free you of having to figure out the both the conceptual aspects of the models and lower-level details of benchmarking at the same time. FYI: I ran a series of calculations that compared output of PHREEQC, GWB, and EQ3/6 (I did it for both single-point speciation/saturation calculations and reaction-path calculations (it was mostly an exercise for fun ).As you expect, if you use the same thermo database in across the programs, the results are almost identical, particularly for single-point speciation/saturation calculations. However, there are differences in certain scenarios where programs have differing capabilities and/or formalisms in charge balancing, mineral dumping, and predicting precipitations in a multiply-saturated solution, but these are issues the modeler can resolve through different conceptual approaches. As always, it ultimately boils down to the thermo data and its appropriateness.
  22. From: Yasushi Yoshida We JNC (Japan Nuclear Cycle development institute) have developed the data format conversion program which enables to use the PHREEQE format database for GWB software. The coding of this conversion program is almost finished, and we would like to verify that database is precisely converted or not. For verification, we tried to do benchmark calculation between GWB and PHREEQE, comparing the calculation results of simple speciation and solubility calculation. In this process, we encountered problems. At first we made inputs of speciation and solubility. Inputs are like below: temperature = 25 swap e- for O2(aq) 1 kg free H2O Eh = -.2957 pH = 8.5 activity Ca++ = .01 activity Cl- = .01 activity Na+ = .01 activity Fe++ = .01 ---------------- <input of solubility> ----------------------- temperature = 25 swap e- for O2(aq) swap UO2(am) for U++++ 1 kg free H2O Eh = -.2975 pH = 8.5 free mol UO2(am) = 20 activity Ca++ = .01 activity Cl- = .01 activity Na+ = .01 activity K+ = .01 activity Fe++ = .01 By these input, we obtain outputs of calculation, and I have one question about these inputs. Each input has 4 or 5 element and their activity, and if more element is added in the system, a calculation doesn't converge. Usually thermodynamic database has more than 30 kinds of elements, and each element is related with several other elements as they compose complexes (i.e. element C is distributed as HCO3-, NaCO3+, MgCO3(aq), KCO3-, .... ). If speciation or solubility calculation for GWB software can handle less than 4 or 5 elements, it is difficult for us to verify the converted database by using such calculation way. And I also think our process is not correct for our purpose (speciation and solubility calculation by using GWB software). If we did wrong, what kinds of calculation should we do for benchmarking? And I have another minor question. I tried calculations shown above under the activity and mg/kg type input. As a result, mg/kg input type converge easier than activity input
  23. From: Craig Bethke To check that the system is buffered, you need only go to Plot Minerals in Gtplot and verify that each mineral in the buffer of interest is present over the entire pathway. If one or more of the minerals dissolves completely, try increasing the initial mass to a large value. If the mineral still disappears, or if you want to test the case in which no other minerals are present, set precip = off. And yes, you can use the flow-through or flush option if you wish.
  24. From: Alexander Smirnov Recently I was trying to model seawater being buffered by various mineral buffers (IW, PPM, HM, QFM) while heated from 25 to 300C. The problem that I have is how to actually model the buffering (or how do I know that the solution is buffered by given redox buffer). My input file looks as below. The input looks fine to me, but I don't know what to do with precipitation. Should it be turned ON or OFF, can I use flow-through or flush models (and still redox-buffer the solution?). My input file looks like this: temperature initial = 25, final = 300 swap Fayalite for Fe++ swap Magnetite for O2(aq) swap Quartz for SiO2(aq) swap N2(aq) for NH3(aq) 1 kg free H2O free mol Fayalite = 10 free mol Magnetite = 10 free mol Quartz = 10 total mmol N2(aq) = .59 pH = 8.1 total g/kg Cl- = 19.354 total g/kg Na+ = 9.5496 total g/kg Mg++ = 1.29 total g/kg Ca++ = .412 total g/kg K+ = .399 total g/kg HCO3- = .12 total g/kg SO4-- = .2712
  25. From: Greg Anderson The provisions for kinetics in REACT refer only to mineral dissolution and precipitation. I'm working with the kinetics of aqueous species in a homogeneous system. I suspect by creating fictitious minerals and adjusting the various parameters I can fool React into doing kinetics for my reactions. Has anyone tried this? Any advice?
×
×
  • Create New...