Jump to content
Geochemist's Workbench Support Forum

Jia Wang

Admin
  • Posts

    729
  • Joined

  • Last visited

  • Days Won

    29

Posts posted by Jia Wang

  1. Dear GWB users,

    We are proud to announce the release of GWB 2023! GWB 2023 adds site-mixing and temperature-dependent solid solutions models, the capability to import and export EQ3/EQ6 thermodynamic databases, and much more! Plus, the amazing ChemPlugin self-linking software object is now included with the GWB Professional subscription at no extra cost.

    Supported subscriptions will upgrade automatically within three days, or simply click "Check for updates" on the GWB dashboard.

    GWB community users can request a new license through our webstore.

    Not yet a subscriber? Sign up now or contact us for a same-day quote.

    Best regards,
    Jia Wang
    Aqueous Solutions LLC

  2. Hello Adam,

    You're welcome. I am glad you found the examples helpful. I took a quick look at the second script and compared it to your first script. Your first script had the CO2 gas swapped in for H+, but your second script has CO2(g) swapped in for HCO3-. Is this correct?

    With your original script, I unsuppressed Anorthite as a test and was able to converge with going as far as 100 kg of anorthite. Once the system is saturated with respect to the anorthite, it simply starts to accumulate. Not really sure what minerals you're expecting your system to form when titrating the anorthite. Are there any specific secondary minerals you are expecting to form in this system? It initially sounds like you were doing a test with anorthite titration until it's saturated but perhaps I am not really understanding what you are hoping to achieve ultimately. You could try unsuppressing one mineral at a time when testing. Again, the program will consider everything that's not suppressed as part of the simulation.

    Best regards,
    Jia

  3. Hello Adam,

    You're welcome. React titrates incrementally the reactants you have set in your Reactants tab and reports the equilibrium state at each step. By default, React divides titration paths into 100 steps. For example, in your script, 100 grams of Anorthite is set to titrate into the initial fluid over the course of the simulation. The program is going to add in 1 gram of Anorthite at each time step into the initial system until all 100 grams are added. The equilibrium state of your system is reported at each step.

    In its calculation of the equilibrium state, React will allow supersaturated minerals that are most thermodynamically stable in your system to precipitate, if precipitation is enabled and the mineral is not suppressed from forming. If suppressed, the mineral is not considered. The mineral assemblage does not differentiate between primary (i.e. the mineral(s) you are titrating in) minerals or secondary (other minerals that were not present initially) minerals. In your case however, the program won't consider any minerals for precipitation in its calculation because they are all suppressed. If you disable precipitation (go to Config -> Options), it would also have the same effect.

    I think it's also important to note here that the only thing that matters for a simple reactant is its composition. Perhaps an example will be best to demonstrate what I mean. In a new React instance, set an initial fluid with 1 mg/kg of SiO2(aq) and in the Reactants pane, add 10 mmol of Amrph' silica as a simple mineral. Include a suffix like _amrph_silica.

    1 mg/kg SiO2(aq)
    react 10 mmol Amrph^silica
    suffix _amrph_silica
    go

    In another React instance, I will set the same initial system but now titrate in 10 mmol of quartz instead.

    1 mg/kg SiO2(aq)
    react 10 mmol Quartz
    suffix _qtz
    go

    Comparing the results, you will see that Quartz precipitates in both cases, because it is the most thermodynamically stable silica mineral in this system. In both cases, the simple reactants are changing the composition of your system by adding SiO2. Whether it is Amrph^silica or Quartz (or another silica polymorph), does not affect the results. If you return to either of the simulations and suppress all silica minerals (Amrph^silica, Chalcedony, Cristobalite, Quartz, and Tridymite), then no minerals will precipitate and all the silica titrated in will remain in fluid. Disabling precipitation in the Options dialog will also have the same effect.

    If you would like more details regarding the conceptual model behind React and other GWB apps, I would recommend checking out the Geochemical and Biogeochemical Reaction Modeling Textbook by Craig Bethke in addition to the user guides installed with the software. I think you will find chapter 2 Modeling Overview very helpful.

    Hope this helps,
    Jia

  4. Hello,
     
    I took a quick look at your script and I noticed that you have suppressed all minerals. When you do this, the program won't allow any minerals to precipitate even when it's supersaturated. As you decrease the amount of water even further, the program can't numerically converge on a stable state for your system which has a lot of highly supersaturated minerals. Did you intend to suppress all minerals? If I unsuppress Anorthite in your system, I am able to run your script at a much lower water to anorthite ratio than 0.33 and have no issues with convergence.
     
    I think this would also answer your questions in the other post too. If you want to allow Anorthite to accumulate in your system when it's thermodynamically favorable, then you would need to unsuppress Anorthite. The mass reacted you plot under the Variable Type is the total amount of stuff (minerals, aqueous species, etc) you have added to your system in the reaction path. In your case, you only added 100 grams of Anorthite. To see the minerals that precipitate in your system, you would want to plot the Variable Type "Minerals". Again, if you suppress all minerals, the program won't consider any minerals for precipitation in your system.
     
    If you would like to see more examples of titration paths and how they work, please see the example in section 3.1 in the Reaction Modeling User Guide. For more information on the suppress feature, please see section 6.1 the GWB Command Reference.
     
    Hope this helps,
    Jia Wang
    Aqueous Solutions LLC
     
  5. Hello Liheng,

    Thank you for attaching your thermo dataset. I tried running your input file and have a couple of suggestions for you to check.

    I noticed that for your kinetic minerals, there's a large rate difference at which the minerals dissolve. Your Fo80 is dissolved almost entirely very early on in the simulation compared to the two other kinetic minerals. You might want to double check that the kinetic minerals are correct for your rate law. In particular, the pre-exponential factor for Fo80 is several orders of magnitude larger than the other minerals. Does your rate law include any promoting or inhibiting species? You can see the rate and rate constant calculated during the simulation under the "Reactant parameters" parameters. Are these rates and rate constants what you expect? You can use a "go initial" run (under the "Go" on the menu bar) to get X1t to calculate the initial equilibrium state before any reaction starts.

    In general minerals that react very quickly within your system can be swapped in your Basis pane and treated as equilibrium reactions. Minerals that react slowly but measurable over the course of the time scale of your system would work well being constrained kinetically. Determining the type of reaction would be helpful in picking the right mechanism to represent them in your system.

    I also noticed that you have set your O2(aq) component as a bulk constraint, which I don't think is causing the short run time issue, but you might want to double check whether this should be set as a free constraint. Please see more regarding free vs. bulk constraints in section 7.2 Equilibrium models in the GWB Essentials User Guide.

    Another note, I also recommend that you take a look at all the minerals that are precipitating within your column. The software considers all minerals provided in the database during calculation. If there are minerals that are forming and you don't expect them to form, you can suppress them and that removes those minerals from consideration. To do so, go to the Config menu and click on Suppress... Please find more information regarding the suppress command in section 8.108 in the GWB Command Reference.

    Hope this helps,
    Jia Wang
    Aqueous Solutions

     

  6. Hello Zixuan,

    I think the difference is simply due to the different intervals at which the output results are pulled into the plot and not that the additional fluid is changing your earlier results. X1t by default uses the plot interval at 0.02 of the entire simulation. This would mean that if your simulation ran for 1 year, then simulation results produced at 0.02 years intervals are plotted (entries from 0.02, 0.04, 0.06yrs, and so on). In your 0.5 year simulation, the entries used for plotting are intervaled at 0.01 years (you can get this by multiplying 0. 2 by 0.5). You can set your longer simulation(5.5 years) to plot at the same time interval as your shorter simulation by changing the dxplot value.

    To get entries at 0.01 year intervals, I simply use 0.01 and divide it by the total length of simulation, 5.5 years, and your dxplot value should be set at approximately 0.001818

    You can set the dxplot by either using the command "dxplot = 0.001818" or go to Config-> Output...-> change the default dxplot value. You can find more information regarding dxplot in section 8.32 of the GWB Command Reference.

    Hope this helps,
    Jia

  7. Hello,

    Thanks for attaching your files. I am afraid I don't quite understand your question. Could you provide some additional details on how the input file was changed between the two plots? The check_transport.x1t input file sets a 60-day interval for your simulated wastewater. I can see that you have three other additional inlet fluids defined: "NaOH pH=9", "clean", and "100uM Wasterwater". Was an additional interval added to the simulation with the "NaOH pH=9" and "clean" fluids after 60 days?

    Best,
    Jia

  8. Hello Liheng,

    I think your case will require you to provide your own equation or script for the variable "rate constant". When you are setting up a kinetic mineral reaction, the software by defaults ask you to provide a kinetic rate constant or you can toggle to the option below to provide an activation energy (Ea) and a pre-exponential factor (A) for the Arrhenius equation, from which the software can calculate k+. Since you are using a custom equation for calculating your rate constant, you will need to specify your own input for rate constant using one of the custom options. If you click on the "+" button next to "rate constant", you will see the option for constant, equation, script, function, and script file. You can select any of the options that's not "constant" and provide the appropriate equation, script, or function to define your rate constant. For example, if you choose equation, you will need to input the equation from your screenshot, including activity or molality of your promoting or inhibiting species (i.e. H+, OH-). If you specify the promoting or inhibiting species in the "powers" section, your entire rate law will be multiplied by it and not just the acidic mechanism expression in your equation.

    In general, specifying an equation or script for a rate constant is very similar to how you will specify a custom rate law. You can see the format for setting these up in section 5 of the GWB Reaction Modeling User's Guide. You can use the internal parameters and helper function provided in table 5.1 and 5.3 of the GWB Reaction Modeling User's Guide to help write your equation.

    Best regards,
    Jia

  9. Hello Liheng,

    I would also like to let you know about another option. Since your expression is for the rate constant alone, you might also consider using the built-in rate law, but just set the rate constant as a transient field variable. The mechanics are very similar to a custom rate law (you can set a simple equation, a basic script, etc.), but you don’t have to worry about all the other parts of the rate law, assuming those follow the built-in law. The built-in rate law for each type of kinetic reaction is detailed in Chapter 4 of the GWB Reaction Modeling User's Guide. For more information regarding transient variables, please see the Heterogeneity Appendix in the RTM Guide and 1.2 Field variables in the Command Reference for more information. 

    Best,
    Jia Wang

  10. Hello Liheng,

     Huan had initially posted his custom rate law script for troubleshooting. Perhaps he would be willing to share with you. If you like though, you can write your own custom rate law with a bit of effort. The software allows you to provide a custom rate law in several ways, you can provide an equation, a basic script using a built-in editor, a basic script file, or a rate law function. I think for your purpose, you might want to start with an equation or a basic script. For details and examples on how to write your own custom rate law, please see chapter 5 in the GWB Reaction Modeling User's Guide. If you need help troubleshooting your custom rate law, please post your input file and scripts so someone can take a closer look.

    Best regards,
    Jia Wang

  11. Hello Polly,

    The GWB does not account for buoyancy factor. The software accounts for the effect of gas on an aqueous system by gas partial pressure or fugacity. For example, you can set a gas partial pressure in equilibrium with your system, then have the software calculate the corresponding dissolved concentration of the gas. If you do not set a gas fugacity or partial pressure initially, the software will calculate the values given the composition of your fluid. It's important to note that the GWB does not keep track of the physical volume of gas in the reservoir. Additionally, please note that the reactive transport programs consider flow of the aqueous phase only; they are not multiphase simulators.

    Best regards,
    Jia Wang
    Aqueous Solutions LLC

  12. Hello,

    I think there are a couple of issues here. In the screenshot provided, you didn't enter a mole weight for the mineral, and therefore the Status line is indicating that you have a mismatch between the program calculated mole weight vs an empty value.

    In cases where you are certain that the stoichiometry of your reaction is correct, you can hit the "Adjust mw" button and TEdit will calculate the mole weight of your mineral and you can choose to use that value. In this case though, as you have pointed out, the database doesn't contain silicic acid (H4SiO4) which is used in the clinopyroxene reaction. The species in reaction you have put in, by just using SiO2(aq), isn't stoichiometrically balanced. For example, you can see that the left side of your equation has 8 hydrogens and the right side has none. There is also a similar issue with oxygen. If you want to put in the reaction exactly as your paper, you will need to add a reaction for H4SiO4, which isn't typical to have both silica and silicic acid in a dataset. Assuming that H4SiO4(aq) and SiO2(aq) + 2 H2O can be used interchangeably, you can rebalance the reaction from literature and include the correct reaction coefficients for each species.

    For more information on editing thermo datasets using TEdit, you can visit our tedit webpage and see section 9 in the GWB Essentials User's Guide.

    Hope this helps,
    Jia Wang
    Aqueous Solutions LLC

  13. Hello Phil,

    If you provide a calculation with the proper constraints, the software will be able to calculate the partial pressure of the gases in equilibrium with your system initially and during the reaction path at every step. For example, the reaction for CO2(g) is CO2(g) + H2O = H+ + HCO3- in thermo.tdat. If you would like the program to calculate gas fugacity or partial pressure, then you will need to provide a constraint for H+ and HCO3-. H2O is the solvent and required in all runs. This applies to simulations run in SpecE8, React, Phase2, X1t, and X2t.

    If you wish to set your initial system in equilibrium to a gas partial pressure or fugacity, you will need to swap the partial pressure into the initial constraint for your calculation. For more information on partial pressure models, please refer to section 7.5 of the GWB Essentials User's Guide.

    Hope this helps,
    Jia Wang

  14. Hello,

    You're welcome. To disable precipitation in React, you can use the command "precipitation=off" or go to the Options... dialog under the Config menu and uncheck precipitation. You can see an example of this dialog in section 2.3 Initial Systems of the GWB Reaction Modeling User's Guide.

    I looked at your titration path and it seems correct. Perhaps you would want to double check the conditions you initially set to calculate the solubility of CO2. Your initial fluid looks to have a much lower concentration of salts than 0.1 molal.

    Best regards,
    Jia

     

  15. Hello,

    I think the issue here is not related to your reaction path but rather the initial state that of your system. React will solves for the equilibrium state of your initial fluid before any reaction path takes place. If any minerals are supersaturated, the program will by default allow minerals to precipitate. An easy way to see this is to perform a "go initial" run from the Command pane or go to Run -> Go Initial. If you open the resulting React_output.txt file (Results pane, View Results button), you can see that there are two step 0 blocks which reports slightly different results. The first block shows the results calculating speciation of the initial fluid and you can see that it is supersaturated with respect to a number of minerals in the Mineral Saturation states section. The second block shows the equilibrium state of your system after supersaturated minerals are allowed to precipitate. You can see that a small amount of quartz and dolomite is predicted to precipitate at equilibrium. The precipitation of these minerals will alter the original fluid composition and the pH in this particular case decreases. The second step 0 block is the result you see plotted in Gtplot.

    If you disable precipitation, React will not allow any new supersaturated minerals to form. You will only see the first block of data outputted to your text file. This might make sense for certain reactions that are too slow to observe in the time span of your experiment.

    For more information on setting up the initial system in React, please refer to section 2.3 in the GWB Reaction Modeling User's Guide.

    Hope this helps,
    Jia Wang

  16. Hello Adam,


    I think I misunderstood your initial question. Were you referring to the "Basis composition" section that prints out to React_output.txt by setting the “print basis long” command?

    If so, the "Basis components" section in the React_output.txt file will show the minerals and species that express the bulk composition that is swapped in the initial system and is updated as the reaction path proceeds. The "Original basis" is the composition expressed in terms of the basis species in the thermo dataset loaded. For example, if you had set up the initial fluid by swapping in Calcite for HCO3-, then the "basis components" will list Calcite but HCO3- will still appear in the "Original basis" section. You can still check that they represent the same bulk composition by calculating the mole numbers of the elemental composition for both sections and see that they are the same.

    The "Components in fluid" plotted in Gtplot are the concentrations in "Original basis".

    Hope this helps,
    Jia

     

  17. Hello Adam,

    The Original Basis section and the Components in Fluid (in Gtplot) represent the same concentrations. Gtplot uses the values from the simulation output file that ends with the file extension .gtp. The values in React_text output are rounded to fewer significant digits than .gtp files. Perhaps this is where the discrepancies are coming from? If you would like to see the exact values from Gtplot, you can go to Config -> Output... -> select the radio button for "character" on the line that says "XML". If you run the input file again, React will print the Gtplot file in a human readable format, which you can open and view in a text editor.

    The mol/L unit is the moles divided by the fluid volume reported in that step. The bulk volume is made up of the fluid volume, mineral volume, and inert volume. If there are no mineral present and no inert volume set, then your bulk volume is equal to your fluid volume.

    Hope this helps,
    Jia Wang
    Aqueous Solutions LLC

  18. Just an additional note about the "add" dropdown menu. The list will only display basis species from the thermo dataset loaded. If you wish to add a redox species, you would need to first decouple it in the "Redox Couples..." dialog (found under the Config menu) . For example, oxalic_acid(aq) is a redox reaction in thermo.com.V8.R6+.tdat and would appear on the "add" list if you decouple it from HCO3-. Decoupling a redox reaction allows the user to constrain each oxidation state of the element separately. For more information, refer to sections 2.4 Redox Couples and 7.3 Redox Disequilibrium in the GWB Essentials User's Guide.

    Best regards,
    Jia

  19. Hello,

    The default thermo dataset thermo.tdat was originally published by Lawrence Livermore National Laboratory. You can find the information regarding the publication at the top of the thermo dataset or in the Headers Pane if you open it in TEdit. Please contact the corresponding author regarding compilation method and discrepancies.

    If you like to edit the dataset to use the value you calculated, you can use TEdit or simple text editor to do so.

    Could you describe what you have done so far in setting up your siderite-magnesite solid solution? If you are using SpecE8 to perform chemical speciation calculations, make sure that the "type" set for your solid solution is "continuous", which should be the default when you are configuring it in SpecE8. You may also add solid solutions to a thermo dataset and load it in along with the rest of your thermodynamic parameters. Note that solid solutions will be available only in discrete mode in Act2 and Tact.

    For more information on solid solution configuration, you can refer to section 2.5 of the GWB Essentials User's Guide.

    Best regards,
    Jia Wang
    Aqueous Solutions LLC

  20. Hello Cansu,

    I think a good place to start is to look at some of the databases that are installed with the GWB software (located in the Gtdata folder). thermo_minteq.tdat is a database released with Visual Minteq 2.40 and contains many of the species you are looking for. thermo.com.V8.R6+.tdat is an expanded dataset published by Lawrence Livermore National Laboratory that contains some oxalate species.

    You can add reactions to create a customized database if the necessary reactions are available for your work. For the new reactions to be considered in a simulation, you must at least designate one log K value when adding it into your database. You can find more information regarding TEdit, in section 9 of the GWB Essentials Guide. For dataset formats, please see the Thermo datasets chapter in the GWB Reference Manual.

    If you are adding or editing one of the installed databases for your work, I recommend saving the edited version with a new name so you will always have the original dataset to refer to. If you do overwrite them, you can always download the files again from our Thermo webpage.

    Hope this helps,
    Jia Wang
    Aqueous Solutions LLC

  21. Hello Dirk,

    Thanks for attaching the excel file. The porosity is calculated as the fluid volume divided by the bulk volume of the system. The bulk volume is composed of the mineral volume, fluid volume, and any inert volume that may be prescribed at each time step. So if your overall mineral volume decreases, the total bulk volume will decrease and the porosity will increase in React.

    In React, there's no way to fix the bulk volume of your system. The reactive transport model applications, X1t and X2t, on the other hand require the user to set a domain, which has a fixed bulk volume for each node. If you want, you might want to consider trying your model in one of the RTM apps.

    Hope this helps,
    Jia

  22. Hello Nourah,

    I would like to follow up with a couple additional comments. I also want to let you know that if you would like to preserve the kinetic mineral reactions in the Reactants pane and the equilibrium minerals at the end of your first simulation, you can do a Run-> Pickup -> System -> Entire command instead of "Fluid". This way, all the minerals in equilibrium with your fluid will be swapped into your Basis pane for you second simulation and your kinetic reactions in the Reactants pane will remain. You will still need to add the command for fixing CO2(g) fugacity on your Reactants pane and adjust the simulation period to the desired length.

    I also noticed that you have suppressed all aqueous species besides basis species, which does not seem correct. Perhaps you had intend to only suppress all minerals instead of all species?

    Best regards,
    Jia

     

×
×
  • Create New...