Jump to content
Geochemist's Workbench Support Forum

Brian Farrell

Admin
  • Posts

    1,055
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Brian Farrell

  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. 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. 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. 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. 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. 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
  12. 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
  13. 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
  14. Hi Johan, Thanks for the additional information. I'm looking into this issue. Regards, Brian
  15. Hi Jude, Please don’t post multiple topics about the same issue. I’ve responded to your query in the original post. We appreciate your patience and hope you enjoy using the free GWB Student Edition. Regards, Brian
  16. Hi Jude, Ok, you showed an Eh vs. log a HCO3- diagram before (Figure 1D/2D). Now you want to make an Eh-pH diagram (Figure 1A/2A) instead? If so, based on the caption to Figure 1A, you need to set the HS- activity to 10^-12 and add HCO3- with an activity of 10^-2. For each different diagram you want to make, you need to pay close attention to the conditions indicated in the figure caption. After getting the geochemical constraints right, the most important step is to make sure the thermodynamic data you’re using in Act2 matches that used in the original reference. There are potentially multiple different sources of data in thermo.comV8.R6+.tdat. It’s also possible the information in SUPCRT has changed over the years. I think you’ll need to calculate the log K for every relevant reaction from the delta G o formation values listed in Table 2 and see if they match the log K values in the GWB thermo dataset. If not, you can permanently modify the log Ks in the thermo dataset, or you can temporarily change them within an Act2 run using the “Alter log K” feature. Finally, it looks like the publication used a relatively short list of species in its calculation. Act2, on the other hand, will load every possible species that can be formed based on the specific basis – in your case Fe++, H2O, e-, H+, HCO3-, and HS-. You may need to suppress certain species, like FeHCO3+ or FeCO3(aq), if they appear in Act2 but not in the original calculation. For more information, please see the “alter” and “suppress” commands in the Act2 chapter of the GWB Command Reference. Please see as well the Using Act2 and Using TEdit chapters in the GWB Essentials Guide. Regards, Brian
  17. Hi Jude, It's really hard to tell without any knowledge of how your model or the originals were set up. One guess is that the originals considered only inorganic carbon, whereas you're forming various organic species under reducing conditions. You can decouple the various carbon redox species from the HCO3- basis species to limit your calculation to inorganic carbon. For more information, please see 2.4 Redox couples and 7.3 Redox disequilibrium in the GWB Essentials Guide. If you have more questions, you'll have to provide your Act2 input file, your thermo dataset, and more information about how the original diagrams were made. Regards, Brian Farrell Aqueous Solutions
  18. Hi Johan, Can you try using single quotes for the helper functions? For example, activity('H+'). Hope this helps, Brian Farrell Aqueous Solutions
  19. Hi KH, This is an interesting problem. It’s similar to the “mosaic diagram” feature in Act2, but it’s the axis variable that needs to speciate. There’s no way to account for this in the simple calculations that Act2 performs, apart from drawing separate diagrams for the regions in which HS- or H2S predominate. An actual multicomponent chemical model, like a SpecE8 calculation, allows you to handle more complexity. For a single condition, you can calculate the predominant Sb species or stable Sb minerals. You can set the composition of a fluid in terms of total (or component) concentrations, and the program will account for the complete set of equations describing the distribution of mass. You can take this analysis a step further in React by looking at the effect of one variable at a time. By titrating HS- into a fluid at a fixed pH (preferably using log steps), or by sliding the pH in fluids of specified total HS- concentration, you can look at the effects of total HS- or pH on species predominance and mineral stability. Essentially, these calculations are like transects plotted through the 2D diagram you’re envisioning. The best solution to make the diagram you want is to use the new Phase2 program in GWB12. It was created for problems like this. It’s essentially a two-stage calculation in which a series of React paths are stacked together to form a 2D grid. Some diagrams may resemble what you can calculate in Act2, but you have many more capabilities and fewer simplifying assumptions. I've attached an example of the diagram I think you're trying to make, using Phase2 and the thermo.com.V8.R6+.tdat dataset. Hope this helps, Brian Farrell Aqueous Solutions LLC
  20. Hi Polly, I’m glad to hear that your uraninite solubility calculation worked out well. You might try charge balancing on a different ion, or disabling charge balancing entirely, since this is a simple solubility diagram calculation. Regards, Brian Farrell Aqueous Solutions
  21. Hi Raquel, GSS is a spreadsheet for storing water analyses. As you've discovered, you can create "user-defined variables" to store certain properties, like your gas weight percents. GSS doesn't use these in any of its calculations, though. The only input GSS accepts for its calculations are the concentrations of the basis species (thermodynamic components in the fluid) and a few parameters like temperature, pH, and Eh. GSS can calculate gas fugacity or partial pressure from the activity of the dissolved gas species. You need to create a chemical model of the fluid to do this. For your information, GSS uses a program called SpecE8 to perform its calculations. You should familiarize yourself with SpecE8 before working with GSS. From the screenshot of your spreadsheet, it appears you've already found how to add the temperature. Click +analyte > Chemical parameters > Temperature. For pressure, click +analyte > Physical parameters > Pressure. For more information, please see the Using SpecE8 and Using GSS chapters of the GWB Essentials Guide. Regards, Brian Farrell Aqueous Solutions
  22. Hi Raquel, The partial pressure of a gas in a mixture is roughly equal to the mole fraction of that gas in the mixture multiplied by the total pressure. Regards, Brian Farrell Aqueous Solutions
  23. Hi Polly, You asked me in another post if certain values were arbitrary, like a CO2 fugacity or the activity of a main species in an activity diagram. I responded that they were not. I didn’t say that you should always include a complete analysis of your fluid in all your calculations, especially for general diagrams like those in the report. As you might recall, I told you I didn’t believe a value for CO2 fugacity was even required to reproduce a particular diagram from your report. I really can’t say for sure how the rest of the diagrams in the report were constructed. You really need to consult the authors for that information. I can’t keep guessing. As for your latest questions: 1. Each of these calculations are done at many steps (many pe values, or many pH values). The information you see at the bottom of React’s text output file is simply output from the last step in the calculation. The information in the table you’re referencing is simply information drawn from various points in different calculations. You need to look in your output files (text or plot) for the specific conditions to fill each cell in the table. 2. Figures 1 and 2 are from two different types of React calculations. Figure 1 is a from a sliding pe path in React, with pH fixed at 8.6. I believe there is a unique calculation for each mineral, but I’m not sure. It is repeated at two different temperatures. So, I think it’s created from eight different simulations. Figure 2 is from a sliding pH path in React, with pe fixed at -5.73. Like Figure 1, there are four minerals and two temperatures, so possibly eight different simulations. You can use Gtplot to make plots like those you’ve shown. In your script, you added Uraninite as a simple Reactant. You shouldn’t do that. It’s common to swap the mineral of interest into the Basis (the initial system) in diagrams like this, as described in below. You of course need to ensure that other minerals don’t precipitate later in its place. There’s an example solubility diagram in the React section of GWB.com/diagrams.php entitled “Mineral solubility”. You can click on the React icon to download the script. It sets a fluid in equilibrium with Kaolinite at pH 3, then scans all the way to pH 9. We’ve shown a plot of the species distribution in the fluid as a function of pH, but we could have alternatively plotted the Al+++ Component in the fluid (the sum of the dissolved Al+++ species) to see the total dissolved aluminum. It’ll look like a curve traced just above the highest concentration species at each pH. You could easily make similar calculations to figure the solubility of your minerals as a function of pH or pe. 3. Your calculation doesn’t look correct at the moment. When you do get it set up, you’ll need to make sure you retrieve the information from the correct points. Regards, Brian
  24. Hi Sebastian, There’s an example diagram in the React section of GWB.com/diagrams.php entitled Mineral solubility. You can click on the React icon to download the script. It sets a fluid in equilibrium with Kaolinite at pH 3, then scans all the way to pH 9. We’ve shown a plot of the species distribution in the fluid as a function of pH, but you could easily plot the Al+++ Component in the fluid (the sum of the dissolved Al+++ species) to see the total dissolved aluminum. It’ll look like a curve traced just above the highest concentration species at each pH. In this example, the mineral is least soluble at ~pH 5.4, and the solubility increases in either direction from there. You could easily make a similar diagram with a sliding temperature path to figure the effect of temperature on the solubility of an iron mineral. Of course, there are many factors that can control the solubility of minerals, such as pH, oxidation state, ionic strength, the presence of various complexing ligands in different concentrations, and temperature. React (or SpecE8) can calculate the solubility of a mineral in any fluid you specify, but not every fluid, at least in a single calculation. In other words, you can’t determine from a single reaction path the maximum solubility of a mineral considering every possible fluid composition. You can only find the maximum solubility subject to the prescribed conditions. React lets you consider one variable at a time, and Phase2 lets you consider two at a time. Hope this helps, Brian Farrell Aqueous Solutions
  25. Hi, There might be a little wiggle room in how you define open or closed systems, but you should always be able to justify that the software settings you use match your conceptual model. At the most basic level, the program doesn’t add or remove mass unless you tell it to, so by default a simulation is closed. A very simple example of a closed system (with respect to mass) is a fluid that’s heated to determine the effect of temperature on species stability. No mass is added to or removed from the system, so it’s closed. In another example, a bioreactor is filled with oxygenated water, amended with a carbon substrate, and inoculated with aerobic microbes, then sealed off from the atmosphere with a stopper and left to sit for several days (the closed system simulation starts after the inoculation and feeding). The microbes will consume oxygen, causing its concentration in the fluid to decrease. Because it’s sealed, nothing is added or removed, so it’s a closed system. If that bioreactor is left open to the atmosphere, however, O2 will dissolve into the fluid as it’s consumed to maintain a constant fugacity. In the GWB, you’d use a fixed O2 fugacity path to define this type of open system. The program fixes the O2 fugacity at its original value by allowing gas to enter the fluid from an external reservoir (the atmosphere). Thus, it’s an open system. A configuration that depends on your concept of open vs. closed systems is a titration path. Imagine adding an acid to an alkaline fluid, to see how the pH changes. You might add HCl as a simple reactant. In this example, it seems like a pretty straightforward open system, since you’re gradually adding acid to a fluid. Alternatively, consider a water-rock system composed of halite and water. In our conceptual model, the halite is present in the solution, but it hasn’t reacted at all yet. You could add halite as a simple reactant to the fluid, so that’s its entire mass is gradually exposed to the fluid, or you could set a kinetic rate law, by which it dissolves at a certain rate that can change with time. You might conceptualize the “system” as being composed of the fluid and the rock, in this case, so that the system might be said to be closed. It can be helpful to plot the mass of various components in the fluid, the rock (all minerals), the sorbate, the system (all of the above) and so on. In GWB12, you can additionally plot the mass reacted for all types of reactants: simple, sliding, fixed, or kinetic. If the model includes a time span, you can additionally plot reaction rates for any type of reactant. It can be very useful to make plots of these as a function of reaction progress to help verify that your numerical model matches your conceptual model. In the future, please post new topics on the front page of the GWB forum, not in the archive of old posts. Regards, Brian Farrell Aqueous Solutions
×
×
  • Create New...