Jump to content
Geochemist's Workbench Support Forum

Brian Farrell

  • Content count

  • Joined

  • Last visited

  • Days Won


Brian Farrell last won the day on August 16

Brian Farrell had the most liked content!

Community Reputation

10 Good

About Brian Farrell

  • Rank
    Advanced Member

Profile Information

  • Gender

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Abdulaziz, In a reactive transport model, it's best not to constrain the amount of a mineral using absolute units, like g or cm3, because changing your discretization will change the system. Relative units are much better. Since calcite is the only mineral, and you know the porosity (.16), set the mineral abundance to .84 vol. fract. You'll definitely need a lot more than three nodes to get an accurate solution. Start with 20 or 50, perhaps, to get a basic understanding of your system without costing too much in terms of computational effort, then increase the resolution to 100 or several hundred, perhaps. For a discussion, please see the Numerical Dispersion lesson in the GWB Online Academy. It doesn't sounds like the limestone was in contact with the initial dilute fluid for very long, so I'm not sure it's appropriate to assume the initial pore fluid is in equilibrium with calcite. In other words, I wouldn't swap calcite into the basis on the Initial pane. Your Aziz model.x1t is ok in this regard, but I'd put smaller values than .1 mg/kg for the various solutes, unless those values are actually known. I would add Calcite as a reactant, specifying it's abundance as described above. I think that takes care of your questions. You should not set a value for "reactants times". Looking at your inlet fluid, I would set smaller, but nonzero, values for the Ca++ and HCO3- in solution. As for the Cl- component, I think it's correct to set it as the charge balancing ion, but the value you set doesn't actually matter because the program adjusts the Cl- component to balance out the other ions in solution. The "as HCl" setting is unnecessary here. Finally, I think you'll want to double-check your width and height settings to ensure you have the same cross-section area as your cylindrical column. You also might want to double-check your flow rate. Regards, Brian
  2. Brian Farrell

    ChemPlugin Time Marching Loop

    Hi Erik, If you were writing a simple model that considered only advective transport of a non-reacting solute, you might figure the limiting time step from only the Courant condition. And if the velocity didn’t change with time, you could hard-code that value into your time marching loop. When you construct a reactive transport model that accounts for a variety of other processes, though, such as diffusion, heat transfer, and kinetic reactions, you need to account for the stability of the solution to each of their governing equations. ChemPlugin’s ReportTimeStep() member function in fact does this. The X1t and X2t programs use similar logic, which is described in section 2.20 Time marching in the GWB Reactive Transport Modeling Guide. In your program, it might be ok to set your own time step without querying ChemPlugin, as long as it’s smaller than the largest possible time step that ChemPlugin would allow. But really, you should always have ChemPlugin instances report the stable time step. You can compare with your own desired time step, if you’d like, then use the lowest of the values. Based on a previous conversation, it sounds like you might be worried that kinetic reactions are making the simulation take too long. Simply ignoring the reported stability limits would be a bad idea. Instead, you should consider whether you really need so many kinetic reactions, especially really, really fast kinetic reactions. Use kinetics for the more slowly reacting minerals, and equilibrium for the others. Regards, Brian Farrell Aqueous Solutions
  3. Hi Jeonghwan Hwang Aqueous species, such as the free H+ or OH- ions, must have positive concentrations. Thermodynamic components (the original basis that you see in the text output file), however, can have negative concentrations. For a discussion, please see section 3.2.2 Components with negative masses in Craig Bethke’s Geochemical and Biogeochemical Reaction Modeling text. FYI, the pH is listed at the top of the block of output for each step in the calculation. Keep in mind that the theory of chemical equilibrium does not include any information about time. You’ve set up an equilibrium model, so the time span you’ve set is meaningless. If you set time-dependent processes, such as a rate of simple reactant addition, an internal heat source, a dual porosity model with diffusion into a stagnant zone, or a kinetic rate law, however, the time span will actually have meaning and be used in the calculation. I’m not sure how important it is to your calculation, but if you want to consider how a mineral like montmorillonite dissolves with time, you need to set a kinetic rate law. You might be able to find kinetic rate laws and parameters in the literature, but you should be careful to ensure that they are appropriate for the system you’re modeling. For more information, please see Chapter 16 Kinetics of dissolution and precipitation in the GBRM text, as well as Chapter 4 Kinetic Reaction Paths in the GWB Reaction Modeling Guide. Hope this helps, Brian Farrell Aqueous Solutions
  4. Brian Farrell


    You can start with a delta plot showing all the species in the fluid, then one-by-one hide the species with the largest concentration changes that aren’t due to H+ transfer. For example, the concentration of CaCl+ decreases more than anything else, and the free Ca++ and Cl- ions increase almost stoichiometrically. It's clear there's no H+ transfer involved, so right-click on the curve corresponding to each species and select "Hide this variable". After a few more similar steps, you’ll see that the species we’ve highlighted have the largest change in concentration and thus best explain the pH change in our chemical model. I’m glad to hear you figured out how to overlay the plots outside our software. For anyone else reading, there are a couple different options for using MS Office products to superimpose results from separate calculations together. One method is to export the numerical values from your plots into Excel (Edit > Copy As > Spreadsheet), then plot them together there. A second method is to copy each plot as an enhanced metafile (Edit > Copy As > Enhanced Metafile) into its own slide in PowerPoint. You should make sure that the axis range spans the entire data range of interest (in your case, from 0-12 mg/kg), so that the two plots fit together correctly. Next, ungroup each image, then copy one of the curves and paste it into the other slide. For more information, please see the “How do I retrieve numerical data from my plots?” and “How do I overlay my diagrams?” slideshows in the Using GWB section of https://www.gwb.com/tutorials.php. Regards, Brian
  5. Hi Polly, You're correct, I did misunderstand your question. Thank you for attaching the file. This is a phreeqc dataset. The GWB does not read phreeqc datasets, and phreeqc does not read GWB datasets. If you want to copy some information from one dataset to another, you'll have to format it as expected by the appropriate program. Regards, Brian
  6. Brian Farrell


    Hi Christophe, Perhaps you modified the script somehow? Or maybe you aren’t plotting the same variables in the same way? If you post a screenshot of your plot, I might be able to figure out what you’ve done. Regards, Brian Farrell Aqueous Solutions LLC
  7. Hi Polly, I’m not exactly sure what you mean, but I’ll take a shot. The GWB has easy-to-use graphical interfaces for interactively entering information or commands, viewing the current settings, saving files, running calculations, or launching plots. When you save a thermo dataset that you’ve modified in TEdit, for example, you create a .tdat file. When you save a model you’ve created in React, your script is saved as a .rea file. You can also prepare input files directly in a text editor. If you’re making or editing a thermo dataset, you supply the data according to the format described in the Thermo Datasets chapter of the GWB Reference Manual. If you’re making a React input file, you supply commands using the syntax in the GWB Command Reference. When you save the file, simply change the “Save as type” from “Text Document (*.txt)” to “All Files (*.*)”, then type the appropriate extension in the File name (e.g. .tdat or .rea). That way, it can be identified by the appropriate GWB app. Any GWB input file can be read in the app (e.g. TEdit or React) or in a text editor (e.g. Notepad). Double-clicking on a file will open the app, but you can right-click on the file and use the “Open with” or perhaps “Edit with” option to view the files in your text editor of choice, if that’s what you prefer. You might want to use features like Find, Find and replace, Go to line #, etc. that exist in some text editors but are not yet coded into TEdit. Or, you might find it’s useful to see the entire React configuration in a few lines of commands, for example, rather than looking through the settings on multiple panes and dialogs. Hope this helps, Brian Farrell Aqueous Solutions LLC
  8. Brian Farrell

    Influence of element's order in Basis?

    Hi Frank, Evaporation problems become extremely difficult as the solvent mass approaches 0. Even the working example “fails” before reaching the end of the simulation. This is noted in the evaporation examples in the GBRM textbook and the GWB Reaction Modeling Guide. Eventually a lot of really small numbers (some positive, some negative) are added together, and the net result is a really, really small number. In cases like this the order in which the numbers are added, which reflects the order of the species in the basis, can make a difference. Mathematically it’s a little head-scratching, but it’s a real computer science issue. Keep in mind that you’re plotting the results in terms of solvent water remaining on a log scale, so it appears the aborting examples fails much, much earlier than the working example. The two examples yield essentially identical output until the aborting example fails after reaching a Xi value (Xi ranges from 0 to 1 over the course of a simulation) of .9857. The “working” example continues slightly further before failing at Xi = .9987. Hope this helps, Brian Farrell Aqueous Solutions LLC
  9. You’ll probably know better than anyone whether your diagram is meaningful for your study. Typically, you think about the reactions that might occur in your system, then use those reactions to build a stability diagram. To understand how Act2 constructs the diagram, you can view Act2’s output file, which reports the various assumptions made, the reactions considered, and the values of the equilibrium constants for those reactions. Or, you can use Rxn to look at each of the equilibrium lines individually. I’ve included below two classic references on stability diagrams in geochemistry, but many textbooks will include at least some information on constructing stability diagrams. Bowers, T.S., K.J. Jackson and H.C. Helgeson, 1984, Equilibrium Activity Diagrams. Springer-Verlag, Berlin, 397 p. Garrels, R.M. and C.L. Christ, 1965, Solutions, Minerals, and Equilibria. Freeman, Cooper & Co., San Francisco, 450 p. Hope this helps, Brian
  10. Hi Jeonghwan Hwang, I’m glad to hear that you found the minerals you need. As stated in the figure caption, you can swap Boehmite for Al++ in the “diagram species” section, K-feldspar for K+ in the “in the presence of” section, and Calcite for Ca++ in the “in the presence of section”. To include K-felspar in the "In the presence of" section, you should first add Mg++ as the Y axis variable, then swap in K+^2/Mg++. That way you can add K+ to "in the presence of" section and swap it out for K-feldspar After you plot a diagram, you can click View Results to the see the list of assumptions, reactions, and equilibrium lines that go into making a diagram. Hope this helps, Brian
  11. Brian Farrell

    Transferring Activation

    Hi Matt, I've reset your license. You should now be able to install and activate on a different machine. I hope you enjoy using the free GWB Student Edition. Regards, Brian Farrell Aqueous Solutions LLC
  12. Brian Farrell

    Chemplugin: Pore Volume (PV) and Extendrun()

    Hi Johan, In most cases you cannot reconfigure (i.e. call Config() again) an instance whenever you want. One case is after time stepping is complete, before an ExtendRun() member function call. Note that the reconfiguring you do in conjunction with ExtendRun() is limited to reconfiguring the reactants in a run (e.g. cp.Config(“remove reactant NaOH”)). You can’t change other aspects of the configuration, such as the temperature, the set of basis species, or the concentrations of species in the basis. You can change the temperature of an instance after it has been initialized using the SlideTemperature() member function. Alternatively, when first configuring the instance, you can use the “temperature initial = , final = “ configuration command to slide temperature over the course of time stepping. The former option gives you more control over how temperature varies. Is the Br- tracer coming from the beginning of the stream? If so, one idea is to create, configure, and initialize different instances (e.g. low and high Br- concentration reactors) from the start, then link/unlink or change flow rates as necessary during time stepping (e.g. cut off flow from the first inlet and turn on the second inlet instance). A second case in which you can reconfigure a run is to use the “adjust_rate” ChemPlugin configuration command (e.g. cp.Config(“adjust_rate Br- 50 mg/s”) to change the rate at which a simple reactant like Br- is being added to the system “on the fly”. In this case, you don’t need to create multiple inlet instances ahead of time. You simply add a slug of Br- at some point in time stepping to serve as the tracer. Hope this helps, Brian
  13. Brian Farrell

    Script in Chemplugin

    Hi Johan, The inner quotes in the kinetic rate law need to be escaped with a backslash (e.g. \"H+\" or \'H+\') . For the thermo data, the issue is the same. You can do something like this: cmds = ('data = "C:\\Program Files\\ChemPlugin\\Gtdata\\thermo.com.V8.R6+_MRM_JF.tdat" ', Hope this helps. We appreciate your patience. Regards, Brian
  14. Hi Jeonghwan Hwang, There are various thermodynamic datasets installed with the software. You can search through them for minerals that you need. In a text editor, you might try to search (ctrl+F) on smectite or clay to find minerals of that type that would be representative of a montmorillonite group mineral. Or in TEdit, the GWB’s graphical thermo data editor, you can use the filter option to show only minerals with Al+++, SiO2(aq), etc to find the clays. If you don’t see the mineral you need in any of the datasets, you can add a new mineral using information from the literature. You need to supply its reaction and log K at one or more temperatures, as well as its mole weight and mole volume. For more information, please see the Thermo Datasets chapter in the GWB Reference Manual and the Using TEdit chapter in the GWB Essentials Guide. Regards, Brian Farrell Aqueous Solutions LLC
  15. Brian Farrell

    Script in Chemplugin

    Hi Johan, Thanks for the additional information. I'm looking into this issue. Regards, Brian