Jump to content
Geochemist's Workbench Support Forum

Jia Wang

Admin
  • Posts

    698
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Jia Wang

  1. Hello Austin, It sounds like you've built your chemical model in a single-node system and want use it to build a reactive transport model. First, I just want to note that oxide type entries do not carry the same properties as a mineral reaction in the GWB. In the GWB, a mineral reaction is accounted for in the thermodynamic database with valid equilibrium constants for a temperature range. Oxides do not carry this information. When you add a simple oxide as a reactant in React, you are simply changing the chemical composition available in your system. Therefore, if you wish to set a solid composition in your starting system, whether it be in React or X1t, you will need to specify the composition as minerals rather than oxides. You can view the thermodynamic database loaded for your current run by going to File -> View -> select the file that ends with the extension .tdat. There are a couple of ways to set minerals in the initial system depending on the type of reactions desired. If a mineral is assumed to be in equilibrium or can be treated as in equilibrium with the initial fluid, you can use the swapping feature to swap it in for a component in the Initial pane. Doing so will tell the software to solve for the component concentration in equilibrium with the mineral swapped in. This mass will be set as part of your initial domain. Please see section 7.2 Equilibrium models in the GWB Essentials Guide for more information and examples on swapping. In the case where a mineral reaction should be accounted for kinetically, you can add the mineral in your Reactants pane by going to add -> Kinetic -> Mineral... Any mass specified here will also be counted as present in your system initially. Note that the software allows you to specify a mineral that's in equilibrium with your system initially (e.g. swapped into the Initial basis) but as a kinetic reaction when you start your simulation. If you would like to do that, you can swap the mineral into the basis and set 0 for the mass in the Reactants pane for the kinetic mineral. For examples of how kinetic reactions works in the GWB, please review section 4 Kinetic Reaction Paths in the GWB Reaction Modeling Guide. The Reactive Transport Modeling guide is a great resource for getting started with reactive transport modeling with the GWB. You can also search the Forum to see if other users had posted similar queries previously. It might not be the exact issue that you have but oftentimes, the solutions can share a lot of similarities. If you have specific technical issues with your model, please attach your input file and any relevant thermodynamic file so we can take a closer look. Hope this helps, Jia Wang Aqueous Solutions LLC
  2. Hello Eden, The software solves a set of numerical equations by iteration to arrive at a stable solution for the equilibrium state. For solving problems numerically, the software does not like zeros for constraints. If the quantity of the constraint is very small, you can typically set a negligible value. The constraint for O2(aq) is very important because it sets the oxidation state of your system. It would be best if you can set it using some information you can reasonably assume or measure directly. Do you have any information that you can use such as a Eh or pE measurement? If so, you can swap in the 'e-' for O2(aq) and provide the value to the corresponding unit. The software also allows you to use the concentrations of a redox pair to set the oxidation state for the whole system. For example, if you have Fe++ and Fe+++ concentrations you can add the basis species, Fe++, and swap the other species, Fe+++, for O2(aq). You might already be aware of this but redox species are by default set in equilibrium in the GWB, swapping species of a different oxidation state into the basis does not set the specific concentration for that valence state. Concentrations are set for the bulk component. If you would like to specify concentrations of separate species in different oxidation states, you will need to decouple it first. Once you have done so, you can add the redox species to the basis. Please refer to section 7.3 Redox disequilibrium in the GWB Essentials Guide. More information regarding bulk concentrations vs. free concentrations, please see the example in section 7.2 Equilibrium models in the same guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  3. Hello Helge, Thank you for attaching your files. The last time we troubleshooted, it looks like you had set the environment path variable for the GWB, but env.txt doesn't show it there anymore. Has anything changed on your machine since the last time you had a successful run? One easy way to ensure that environment variables are set correctly is to have the software installer do it for you. Could you try reinstalling the software and check 'set user PATH and PYTHONPATH environment variables' in the last step? If you continue to run into errors, please check our GWB plugin support section for explanations to some common errors: https://www.gwb.com/plugin-Python.php#SUPPORT If you continue to encounter issues, please let us know what you have tried so far and we will be happy to help with troubleshooting. Best regards, Jia
  4. Hi Gregg, The program does not recognize units for radioactivity for analytes for calculation purposes, such as speciation. You can add a user analyte which will allow a wider set of units for an analyte on the GSS spreadsheet and in some plots. Thanks for providing additional details to your model here. Regarding your questions on setting concentrations for various analytes, the program by default sets the concentration as the bulk concentration for the component and not just the individual species. Using your example with aluminum, the total concentration will be distributed amongst Al-bearing species when React calculates the equilibrium speciation of your fluid. It is sometimes helpful to the program for convergence purposes that you swap in the most abundant species in the Basis pane but most of the time it is not necessary. In your example with aluminum, you can keep Al3+++ but you can also swap to other aluminum species (e.g. Al(OH)3) depending on the conditions of your system. A bulk concentration is the default unit setting but in cases where you want to specify a free quantity, you can select the unit drop down menu and check the 'free' option. In this latter option, you set the concentration for a single species and not the whole component. Again, using your aluminum example, if you set the concentration as "free mg/l", then you are specifying the concentration of aqueous "Al+++". The program will calculate the additional aluminum concentration in solution based on your system's equilibrium. An example of a free quantity is your dissolved O2(aq) concentration, where the measurement reflects only aqueous O2(aq). The program assumes all reactions are in equilibrium by default, including species of elements with different oxidation states. The decouple feature allows users to disable the equilibrium relationship between species of different oxidation states, like Fe3+ from Fe2+, and specify a concentration for each. This is particularly useful in conditions where equilibrium between oxidation states should not be assumed. If you can assume that the redox couple is in equilibrium, then you can set the bulk concentration for Fe++ and leave the redox reaction coupled. This will allow SpecE8 to calculate the mass distribution for all iron species based on the oxidation condition of your system. You can set the oxidation state of the system in a couple ways. You can specify the O2(aq) concentration like you had. You can set a measured Eh or pE value as well. To do so, first add in O2(aq) and then swap e- into its place. Swapping allows you to alter the basis to reflect the geochemical constraints that you wish to impose in your calculation. Additionally, you can also set the oxidation of your system with concentrations from a redox pair, given that it is appropriate and the information is available. Using Fe2+/Fe3+ as an example, you will add both O2(aq) and Fe++ into the basis and then swap Fe+++ for O(aq), set the concentrations for both Fe++ and Fe+++. SpecE8 is a good starting point for learning how to set up a calculation in the GWB. If you would like to model a system including mineral precipitation, you can move your calculations to the React application. In any system in which you have supersaturated minerals, React will report calculations for the metastable fluid and then the true equilibrium state, in which supersaturated minerals have been allowed to precipitate. There will be two blocks of results in the output text file. 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. There is an abundance of resources available for you to get started with the GWB. I would recommend that you start with the GWB Essentials Guide, which you can launch from the 'Help' menu of any app, the Docs pane on the GWB Dashboard, or on the documentation webpage. In particular, section 2 Configuring the Programs will help with understanding how runs are set up in the GWB. You can also find information regarding analytes in GSS in section 3.3. Section 7.3 Redox disequilibrium explains redox species decoupling with an example in SpecE8. More information regarding reaction modeling in React can be found in the Reaction Modeling User Guide. Hope this helps, Jia
  5. Hello Gregg, GSS contains a default list of common units for describing concentrations in water chemistry analyses. Radioactivity units are not among them. If you want to specify a unit for radioactivity you can set a user-defined analyte. To do so, go to "+ analyte" -> 'user analyte...' -> Edit. Enter a name for your analyte and then set the category to 'Chemical parameters' and the dimension to 'Radioactive emission'. The default unit will then be set to pCi/l. Please note that user analytes are not considered in chemical calculations. For more information, please refer to section 3.3.4 User Analytes of the GWB Essentials Guide. A set of thermodynamic datasets are installed as part of the software package. You can learn about each dataset and see what types of reactions they are meant to model and the analytes they contain. As you have already discovered, a dataset may not have all the thermodynamic information you need. Many users customize their own version for specific studies using TEdit, the dataset viewing and editing application included in all GWB packages. You can add new reactions from literature or copy from one dataset to another, given that it is appropriate to do so. You can view a summary of all thermo datasets installed with the software on our thermo webpage. For more information on GWB dataset types and TEdit, please see section 2.3 Thermodynamic datasets and section 9 TEdit in the GWB Essentials Guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  6. Hello John, Thank you for attaching the scripts and the thermo dataset. Act2 creates a diagram to display the predominant aqueous species and the stability of minerals in a chemical system. The parameters used to create the diagram include all the reactions in the thermodynamic database and the constraints set in Act2. While you have set the y-axis to vary with the activity of Zr(OH)2++, the predominant aqueous species is Zr(OH)5- given the thermodynamic dataset and the temperature of 200C. The boundaries that you see in the plot represent the equilibrium reaction equation between the stable mineral and the predominant aqueous species. You can view this equation by clicking and hovering over the boundary. You can swap in Zr(OH)5- for Zr(OH)2++ in the basis pane as the diagramming species and the marker will fall on the boundary where you expect it. If you plot your React results in Gtplot and look under the variable type "Species Activity", you will find that the predominant Zr aqueous species in your system is Zr(OH)5- which is in agreement with Act2. In Act2, you can suppress a species such that it is removed from the program's calculations. In your case, I can sequentially suppress the predominant Zr species until Zr(OH)2++ appears on the plot. This would be the same as loading thermo.V8.R6+.tdat that came installed with the software since Log K information at higher temperature for some Zr species are not included. Unless set to extrapolate Log Ks, reactions that do not have thermodynamic information at the temperature of your calculation will not be considered. Hope this helps, Jia
  7. Hello John, Your input file and dataset was not attached. Could you please try attaching again so we can take a closer? Also please note that the axes in Act2 are reflecting the activity or log activity of species, not concentrations. Activity is equal to the concentration when the activity coefficient is 1. There's no way to plot concentration on activity diagram, the program can only plot species activities from the reaction trace. Best regards, Jia
  8. Hello Aditya, Thank you for the additional information. The GWB programs do not allow a reactant to be immobilized without some mechanism. For example, an aqueous species can adsorb or precipitate which will allow it to be removed from the fluid in a flowing system. What you described sounds a lot like how surface species are simulated in surface complexation reactions in the GWB. I would recommend looking into setting up either langmuir or non-electrostatic two-layer surface complexation type datasets. Both types will allow you to set up basis surface species, which are considered to be immobile surface sites unless otherwise specified. You can set up a surface complexation dataset with the basis species set as your polymers and add reactions to your surface dataset that reacts to form on that surface site. Complexes that form on these surfaces will not be transported. The best place to get started is to learn about the langmuir model and the two-layer model is in section 2.6 of the GWB Essentials Guide. You can see examples of both types in the Gtdata folder that comes installed with the software. Hope this helps, Jia
  9. The GWB Community is licensed for personal use. You may use it for work purposes if your employer finds the terms in the EULA acceptable. Best regards, Jia
  10. You're welcome Scott. We hope you're enjoying the software. Best regards, Jia
  11. Hello Peter, You're welcome. Just looking at your input file again, I am thinking perhaps that transport constraint isn't the issue here but more of how the problem is set up with the chemistry. If I reset the transport constraints to their default setting and run the simulation with 1 mmol/m3/yr of phenol, I can turn on the "explain_step" command to see what is limiting the size of the step. I also shortened the simulation length to 2000 years to troubleshoot. Running X1t, it looks like the step size is limited by the Q/K of the reactant of various minerals. You can change the kinetic rates of your minerals to 0 such that you can test whether or not phenol is actually appearing in your system as expected. Just checking the concentration of your carbonate species, most of the component's concentrations are in the form of CO2(aq), HCO3-, and methane instead of phenol. When I decouple the HCO3-/phenol redox couple, phenol actually began to accumulate in your system at what seems to be a more reasonable concentration. This also helped the program run more smoothly and the issue with the isotopic composition. Hope this helps, Jia
  12. Hello Karen, You're welcome. I am glad that was helpful. Hope you had a good Thanksgiving. Best, Jia
  13. Hello Peter, Just want to follow up and make a correction to my previous post. The Xstable controls the stability of the transport equation on the isotopes and not the convergence criterion. Best regards, Jia
  14. Hello Peter, The Xstable command controls the convergence criterion for isotopes in the Reactive Transport Modeling apps. It looks like you have already lowered the Xstable value in your model, along with the Courant constraint and the step_increase variable. If you need to maintain a specific concentration of phenol in the solution, an alternative approach could be to create a fake phenol mineral and set your system in equilibrium with that mineral. You can set the equilibrium constant so that the dissolution reaction maintains a constant level of phenol. I decoupled HCO3-/phenol and added phenol as a basis species, swapping in the fake mineral. This approach helped with the isotopic stability issue, and I was able to maintain it while running the simulation with a higher Courant number and step_increase value. You can experiment with these variables to reduce the run time Hope this helps, Jia Wang Aqueous Solutions LLC
  15. Hello, It is difficult to say without understanding the type of problem you are trying to study. Is there a specific process you are attempting to represent with the immobilized ion? To help you get started, here are some configurations and features designed to model specific mechanisms that may interest you. For instance, the software allows a fraction of the domain to function as stagnant zones, enabling solutes to diffuse into and out of these zones. This model is known as the dual porosity model. Refer to the GWB Reactive Transport Modeling guide for more information in sections 2.17 and 3.12. Additionally, the software can account for various types of surface complexation reactions, where ions can form surface complexes on mineral surfaces. A comprehensive description of all surface complexation models can be found in section 2.6 of the GWB Essentials guide. There are special configurations that are available in React, an application for modeling dynamic systems in a single node system. A flow-through type model allows the user to separate precipitated minerals or solid solution end members from back dissolving. These special configurations are not available in the reactive transport applications. Please see section 2 for more information on React. If you require further assistance with troubleshooting, please provide a more detailed description of what you're trying to achieve, along with any available input and thermodynamic files. Hope this helps, Jia Wang Aqueous Solutions LLC
  16. Hello Karen, Act2 creates a diagram to show the stability of minerals and the predominance of aqueous species in chemical systems based on all entries available in the thermodynamic database and the constraints for the current calculations. The most stable mineral will be displayed on the diagram and you cannot fix a mineral to be present. When you suppress a species or mineral, the calculation ignores it. Perhaps your thermo dataset has entries that are not representative of the system that you are trying to create a diagram for. Best regards, Jia Wang Aqueous Solutions LLC
  17. Hello, This message is displayed by Xtplot when you are trying to open a plot file with an incomplete run. Did your run complete successfully in X1t? If not, you should see a message in the Results pane. Hope this helps, Jia Wang Aqueous Solutions LLC
  18. Hello Peter, Thank you for the additional information. We are looking into this issue now. Best regards, Jia
  19. Hello Peter, Thank you for the script. To troubleshoot, could you double check that the header files used to compile the script are the same version as the version of the software installed? The dll should be recompiled every time the code and function is updated. If the above doesn't help to resolve the issue, you can try writing a function that returns a value of 0 to check if the dll is compiling correctly for the X1t to read in. Hope this helps, Jia Wang Aqueous Solutions LLC
  20. Hi Karen, I am not exactly sure what you are asking. With a custom rate law, you can additionally account for temperature dependence in your reactions if you desire. You can always repeat the simulation with different rate laws to see which one best describes your observation? I am not sure what would be the best fit for your work. Best regards, Jia
  21. Hello Karen, Thank you for your explanation and the relevant files. To start, I looked at your latest rate law script for K-feldspar and noticed that the variable for pre-exponential factor 1 was initially named "pre-exp1", but later in the script "pre_exp1" was called. You may want to double check variable names and values in your script to make sure that they are correct. If I run your script, I can see that the dissolution rate for the K-feldspar changes with time. If I plot rate constant, the value remains zero throughout the simulation. The reason for this is because no value or script was entered to calculate the rate constant explicitly. Your rate law script includes the rate constant calculation within and React can't extract that value out from the rate law script. By default, the rate constant is reported as zero. This method is completely valid for a custom rate law but if you would like for the program to calculate explicitly rate constant change over time to plot, I think a simple solution is to provide a basic script for the program to calculate the rate constant (instead of the rate law) and use either the built-in rate law or a custom equation for the rate law. This should be an easy modification with your current script. Instead of returning "rate", alter the return statement to return "R" after the line "R = r1+r2+r3" and then remove everything after that statement. After you attach the script for the rate constant calculation, you should also check the transient box so that the rate constant is evaluated at every time step. For the rate law, you can enter a custom equation "rate_con * surface *(1-Q/K)" or use the built-in option, as they are the same. For more information on field variables, please see the Heterogeneity appendix to the GWB Reactive Transport Modeling Guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  22. Hello Lian, The issue with setting constant capacitance in model runs is now corrected in the maintenance release 17.0.2. If automatic update is enabled, you should be prompted to update in the next few days when you open the GWB dashboard. You can also manually update by going to check for updates under the "Help" menu of any app or on the Support pane of the GWB dashboard. Best regards, Jia
×
×
  • Create New...