Jump to content
Geochemist's Workbench Support Forum

Jia Wang

Admin
  • Posts

    724
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by Jia Wang

  1. Hello, I still am not quite sure what you are trying to do. You can't introduce surface species in the middle of simulation. When you fix a fugacity in the Reactants pane, it keeps the same fugacity that is set in your initial system throughout the simulation. If you had set the fugacity in the Basis or had provided all the needed components for the software to calculate the fugacity (e.g. pH, HCO3-) in equilibrium with the fluid, then that's the fugacity the program fixes to. You can't choose a different value to fix at the onset or change it during your run. If you want to end your simulation at a different fugacity, you can use a sliding path instead. See section 3.6 Sliding activity and fugacity of the GWB Reaction Modeling Guide to learn more. I believe you have everything you need to write your own script from the examples installed and using the instructions in the Reference Manual and Command Guide. I can see a few problems with your script. First, you are not calling the same variable for retrieving the results. You had initialized myGWBrun at the top so you need to call the same thing at the end when retrieving results. In all the examples given in the guide, you can see that the command "go" is included at the end of the cmd list to trigger the script to run. Otherwise, you are not actually running the simulation and therefore you get no results. Please review section 7.3.3 Retrieving the results of the GWB Reference Manual, which describes what each argument stands for. If you are running an X1t script, the argument in the spot for the y-node position is ignored. A couple of useful tips. You can have the Plug-in print out a text output and Xtplot plot file for your run. This will be helpful for troubleshooting, especially as you are learning how to use the Plug-in. Note that you should specify the thermo dataset and any surface dataset for the run when initializing the object. If you like, you can also set up Python to read in an X1t file instead of configuring the commands individually in the Python script. See explanation on how to configure these in section 7.3.1 Initializing the GWB application in the GWB Reference Manual. Hope this helps, Jia
  2. Hello Jaxon, You're welcome. In GWB 10, you can find all commands accepted by the GWB applications and information on the Plug-in in the GWB Reference Manual. This is installed with your software and should be in your Gwb folder unless it has been moved. Hope this helps, Jia
  3. Hello, No, the software does not have the Frumpkin model variables implemented such that the Log K changes according to these variables The equilibrium constants for various reactions are drawn from the surface datasets and can't be altered during the run. About question 1, there are no ways to add new reactants in a middle of a simulation. If you are looking for things like setting a kinetic rate to start after a certain time has passed in the simulation, you can do that with a custom script file. If that doesn't help, could you please provide more detail about what you are trying to do? Please see chapter 5. Custom Rate laws for more information on that. In particular, table 5.1 and 5.2 contain all the variables accepted by the program. With regards to question 2, I think this is very similar to one your previous post. The important question here is how you would like your CO2 partial pressure to affect the aqueous system. You can specify the partial pressure of CO2(g) in equilibrium with your system by swapping it into a related component. Typically, that would be swapped in either for HCO3- to constrain the components' concentration or can be swapped into the system to set the pH. You have to make a choice about what constraint makes the most sense for your system, for example either swapping in CO2(g) for the component HCO3- or you can swap it for H+ to constrain the pH. The program will calculate mass distribution such that various carbonate components are in equilibrium with each other (HCO3-, CO3--, CO2(aq), etc). With regards to question 3, are you asking about setting different boundary fluids at different time intervals? You can also view a tutorial for this on the GWB Tutorials page. Please see section 2.10 Reaction intervals. You can add other reactants other than the kinetic type on the Reactants pane by going to the "add" button -> select the type of reactant you want... The pickup command is not available in the reactive transport modeling apps. You can plot the data and export the numeric data to set your Basis pane in a new run using the node-by-node feature. I think you are on the right track with this post you found. Hope this helps, Jia
  4. Hello, If the results are not agreeing between SpecE8 and GSS, then you are probably not using the same commands. You can see in your first screenshot, when you are entering commands like "decouple HS- = 3.56 mg/l as H2S(aq)" you are getting errors telling you that you can't find 3.56 to decouple. The command "decouple HS-" is valid but you need to set the concentration for the component HS- in a separate line like you have for other components. You can refer to the Command Reference or open an example that has added decoupled redox species concentrations in a text editor (e.g. Notepad) to see what is the correct syntax. An example of such is Redox.sp8 in your GWB Script folder. The simplest way to see the commands passed to SpecE8 from GSS for "calculated analytes" is to use the Launch feature to create the corresponding SpecE8 script. From GSS, go to the Analysis menu tab->Launch..., select the sample desired and the SpecE8 application. When you hit Ok or Apply, the program will create a SpecE8 input file with your sample's composition. You can open the .sp8 file in a text editor to view the commands and compare them to what you have entered. See chapter 3.5 Launching SpecE8 and React for more details. In the second screenshot, it looks like the output text file is showing results from the calculation with a different set of inputs than that of the GSS example shown. Please check that you are comparing the same set of inputs. Again, I would suggest that you use the Launch feature in GSS to generate the corresponding SpecE8 input file and open it in the text editor to see what commands are being passed. If you have any further questions, please use words to describe the issues encountered and provide the input files so we can better troubleshoot. Best regards, Jia Wang Aqueous Solutions LLC
  5. Hello Gregg, Your specific example shows a negative charge imbalance, which indicates that there is an excess of anions. Balancing on Cl- means that you are allowing the program to adjust the amount of Cl- in solution to maintain charge balance. The program uses the concentration as a starting point for iterating to a solution but it is not a true constraint on the system’s composition. The program will vary the concentration as needed to charge balance. Given that you are already in excess of anions, can't remove enough of Cl- to achieve charge balance. If I go back to use the most abundant cation for charge balance (Na+), your script converges with no issues. You can also change your balancing ion to SO4-- and that will converge with no issue. In your calculation with balance off, you can plot the results as a bar chart to see that there's a lack of cations and that there are a lot more SO4-- than that of Cl- in terms of meq/kg. Turning charge balance off asks the program to not enforce charge balance in its speciation calculation. The program will constrain the Cl- component with what you entered. Whether or not the charge imbalance error indicates an issue is difficult to say. For some, a large charge balancing error may indicate a problem with the fluid's analysis, perhaps there's a missing component that you are not accounting for. Typically, the charge balance species chosen is the species concentration with the least certainty. Cl- is traditionally given in laboratory analysis based on charge balance from other measured components and therefore a common charge balancing species in simulation. You do not have to stick with that if it doesn't make sense for your simulation. Any charged species can be set as the charge balancing species. You always perform a quick search on charge balancing to see what other users posted questions about regarding this topic or scenarios they have experienced. Hope this helps, Jia Wang Aqueous Solutions
  6. Hello Rose, I am glad the information regarding the commands helped. Thank you for the additional information on the error. I was able to reproduce this error when I copied the Multiple Analysis script from the pdf to the Command pane of SpecE8. I have reported this to our technical team. With copying and pasting from pdfs, there may be unseen characters that are not recognized in the software. The same input script is provided in the file "Script.sp8" within the Spreadsheet folder. Double-clicking on "Script.sp8" automatically ran and closed the file for me with no issues. You can open any input file from the GWB in a text editor to edit or add commands. Saving with the corresponding extension to the GWB application will automatically run all the commands in the script when opened. For example, saving a file with the extension of ".sp8" will open SpecE8. The extension ".rea" will open the input file in React. Hope this helps, Jia
  7. Hello Rose, Are you trying to provide the same porosity for every sample in your spreadsheet and then make calculations? If so, you can add trailer commands under the Analysis -> Options menu. For example, a command for setting the porosity to 0.8 would look like "porosity = 0.8". Additional commands for each GWB application can be found in the GWB Command Reference. If you are looking to assign different properties (such as porosity) for each sample before the speciation calculation, you can add to commands like above to control scripts and set the value using the data from the text file you provide. Which old Rockware thread might you be referring to? We provide an example script for Multiple Analysis along with the example files as a starting point for users, but we do not create or provide customized scripts for users. You can find out more about Multiple Analysis in the GWB Reference Manual. If you encounter technical issues with your script, you can post your input file along with any thermodynamic dataset to the Forum. I am sorry to hear that you're having issues with the TCL script. I had tested the examples from the Reference Manual and had encountered no issues by copying and pasting into React's Command pane. Could you elaborate on how you applied the scripts? Could you also provide some screenshots on your error so that we can better troubleshoot?Are you able to run the script input file for the Multiple Analysis example given in the chapter above? We provide examples for individual X1t input files in the GWB Scripts folder and detailed information on how to get started with the application is in the GWB Reactive Transport Modeling Guide. We do not have specific scripts tailored for large datasets. Many users utilize the GWB Plug-in or the ChemPlugin software object in a programming language that you can set up scripts to repeat calculations. You can find out more regarding the GWB Plug-in in the Reference Manual and the ChemPlugin User Guide. If you still have technical questions after reviewing the guides, you can post them to the Forum. Since the software is new to you, I think you would really benefit from getting started with the Essentials Guide to familiarize yourself with the fundamental concepts that the software is built upon. There are built-in features (like drag-and-drop) that can be useful to you if you are working with multiple samples. Best regards, Jia Wang Aqueous Solutions LLC
  8. Hello, Yes, you can absolutely can use the TEdit application to add reactions and create a custom dataset for your own use. Please see section 9 of the GWB Essentials Guide for more detailed information. You can also view examples on the TEdit webpage. Note that all GWB programs draw their species from the thermodynamic dataset loaded. The default dataset is thermo.tdat. There are different datasets available installed with the software, you can find a summary of the datasets installed here. Hope this helps, Jia Wang Aqueous Solutions LLC
  9. Hello Jaxon, Thank you for attaching your script. Here are some suggestions that I think will help. 1. It sounds like what you want here is the "suffix" command. With the "suffix" command you can save each run with a different string of text appended to filename so new runs do not overwrite the results. For example, "suffix _evap1" would append "_evap1" to the name of the React output text and plot file. You would want to put this before each "go" statement in your script. 2. Using the suffix command, you can save each run result separately and open the plot files to extract the result. If you save a configuration file (should end in .gtc), then you can drag and drop to apply the .gtc file with the same set of x-y variable configurations to different plot files. This can help you from reconfiguring every time in a new plot. Another option to further automate the retrieval of data is to write your own script in a programming language that calls the GWB plugin to do the calculation. The software provides wrapper classes for C++, Fortran, and Python that handle loading the DLL, binding to the needed functions, and conversion to C data types. You can retrieve specific results from the GWB plugin with the "results" function. Please see the GWB Plugin chapter from the GWB Reference Manual for more details. Also, please note that setting "pH = " simply resets the pH to no value. If you want to balance on H+, you should still add the statement "balance on H+". I was having issues running your script as it was written. I also noticed that the first save statement does not have an enclosing double quote for the file path. Additionally, I am not sure that you need two save statements, especially if you are specifying the name of the file. Please see the "save" command in the Command Reference for details. Hope this helps, Jia
  10. Hi Zhidi, Sorry about my mistake above. You are right. The inert volume should be 85% and the fluid volume would be 10%. I had a mix up with the porosity in the math. Best regards, Jia
  11. Hello, The GWB program draw all of its analyte and thermodynamic information from the dataset loaded. The default database, thermo.dat, doesn't include any Antimony species. If you have logKs for relevant species and minerals or can find them in literature, you can expand the database by adding them via the TEdit application (see chapter 9 TEdit in the GWB Essentials Guide). Alternatively, you can explore other datasets like thermo.com.v8.r6+.dat or thermo_minteq.dat, which do include Antimony. Assess both to determine if they contain the required species across the temperature range of your interest. You can still need to add reactions if they are not available in these other datasets. For a summary of the thermodynamic dataset installed with the software, you can visit our Thermo Dataset webpage. Hope this helps, Jia Wang Aqueous Solutions LLC
  12. Hi Zhidi, I am glad you found the guide helpful. I think the Porosity explanation in the Command Reference will help, it explains that... Use the “porosity” command to set (as a volume fraction) the initial porosity of the system. Porosity, the fraction of the system occupied by fluid, is the ratio of fluid volume to the sum of fluid, mineral, and inert volume. When you specify the porosity, the program will figure the difference between the volume of a system of the given porosity and fluid volume, and the volume taken up initially in the system by minerals and fluid. The program assigns this difference as inert, non-reactive volume (see the “inert” command). In this case, the program ignores any settings that may have been made with the “inert” command. When you do not specify an initial porosity with the “porosity” command, on the other hand, the program calculates it from volumes in the system of fluid, minerals, and inert space. To restore this default behavior, enter the command with an argument of “?”. For example, if you specify 5 free volume % of Quartz and a porosity of 0.1. Then the program will include 5 free volume % of inert mineral to achieve 0.1 porosity. The program draws information from the thermodynamic dataset for its calculation. Mineral density information is provided from the thermodynamic dataset. You can open the dataset loaded for your current React run by going to File -> View -> open the file that ends with .tdat. If density information is not available, then the software converts between mass and volume assuming a density of 2.65 g/cm3. This is the same density used for converting between inert mass and volume. If you are checking density from your calculation, please make sure you are looking at the individual mineral mass (under Variable type "Mineral") and not the total mineral mass volume reported under Variable type "Physical parameters". Hope this helps, Jia
  13. Hello Zhidi, The bulk volume in the Medium pane refers to the bulk volume of your entire system and not the mineral bulk volume. As you have discovered, the bulk volume in React is composed of the mineral volume, fluid volume, and any inert volume that may be prescribed at each time step. The porosity is calculated as the fluid volume divided by the bulk volume of the system. I cannot see what your input pane looks like, but generally it is recommended to use relative units for your constraints. For example, you can set your mineral composition as a volume percentage of your system and the concentration of dissolved components in units like mmolal or mmol/l. This way you can easily scale the bulk system to the desired total volume in the Medium tab. It sounds like the bulk volume of your system is 57.78 ml (mineral) + 100 ml (fluid) = 157.78ml. You can enter this on your Medium pane to scale the whole system to this volume. Note that the volume of a React node will change depending on what type of reactions you are using. If you are adding minerals or fluid, that will increase the bulk volume for your system. You can find more information about the bulk volume, or any other command, in the GWB Command Reference. Hope this helps, Jia Wang Aqueous Solutions LLC
  14. Hello Aditya, The GWB supports many sorption models but the Frumpkin model is not amongst them. The software does not accept variables for surface coverage or lateral interaction constant for surface reactions. Are these variables in the Frumpkin model constant values? If so, you can calculate K using the equation and use that value for reactions directly in your surface datasets. Hope this helps, Jia Wang Aqueous Solutions LLC
  15. Hello Sam, When you are trying to run a simulation over such a wide range of Eh values at different pHs, you are going to be outside of the water stability limits. When you are going too far beyond the water stability limits, the program is going to have a difficult time with convergence. Since you are starting from the reduced endpoint, it can help the program by swapping in reduced species into the Basis, HS- for SO4--, CH4(aq) for HCO3-, etc. I managed to start at a more reduced point (~-.3 V) with better suited basis species swapped in. Alternatively, you can try starting at the oxidized end point by setting your Eh to 1 in the Basis and keep your species as they are, slide to a more reduced end point. You can also try turning off precipitation (Config -> Options) for simplifying this run. Nonetheless, I don't think you will be able to go from and Eh value of -1V to 1v for your full pH range, as again, the end points are too far beyond the stability of water limits. You can reference an Eh-pH diagram to see what range water is stable in. FYI, you can also create one in Act2 with a few clicks. For more information on activity diagrams, please see section 5 in the GWB Essentials Guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  16. Hello Bob, I think there are a couple of things that might help here. The first being that the activity model for calculation activity and fugacity coefficients are determined in the dataset loaded. The default thermo dataset (thermo.tdat) in the GWB uses the bdot method for activity coefficients and the Tsonopolous method for fugacity coefficient. I think PhreeqC uses another form of the extended debye-huckel equation for aqueous activity coefficients and the Peng-Robinson method for fugacity coefficients. Additionally, you would also want to make sure that the programs are using comparable data for equilibrium constants of various reactions. For the best comparison to your collaborator's results, you can use the TEdit application to import the PhreeqC database he used and also use it for your calculations in the GWB. More about activity and fugacity models in sections 2.3 Thermodynamic datasets, 7.4 Activity coefficients, and 7.5 Gas partial pressure in the GWB Essentials Guide. Examples for importing datasets from PhreeqC to the GWB can be found in section 9.3 of the same guide. You can specify a measured carbonate alkalinity (+analyte -> Chemical parameters, as long as carbonate alkalinity has not been added as a calculated species) as part of your data entry in GSS. It sounds like this might be better than using an estimate for a bulk HCO3- concentration. I don't see any temperatures added to any of your samples. GSS assumes a temperature of 25C for the calculation unless you provide a temperature. Is that correct? Just a reminder that the analytes here are representing a bulk concentration (except pH). I am not sure what you mean by using a different quantity for Al+++. Was the data just entered incorrectly? Here are a couple of threads from previous users that provides the equation for how the software calculates charge imbalance error and carbonate alkalinity: https://forum.gwb.com/topic/51082-charge-imbalance/ https://www.rockware.com/forum/index.php?/topic/1676-questions-about-alkalinity-calculations/ Hope this helps, Jia Wang Aqueous Solutions LLC
  17. Hello Stanislav, It is not really possible to say for sure by just looking at your screenshot. The concentrations entered into GSS are bulk concentrations. The charge imbalance and charge imbalance error are calculated with all cation and anion species concentrations after chemical speciation. I suspect that this is the biggest difference between the software's calculation and your manual calculation. To perform a manual calculation of charge imbalance from the speciation result, I would suggest launching a SpecE8 instant for one sample in your GSS spreadsheet. Then run the calculation and calculate the charge imbalance by summing the total electrical equivalents for anions and subtracting it from the total equivalents of cations from concentrations, found under the variable type "Species concentration" in Gtplot. You can export the numerical values by going to Edit -> Copy as... -> Spreadsheet or Tab. I would suggest that you compare one sample by launching a SpecE8 instance and comparing it to your manual calculation. For more information regarding speciation, please see section 7.2 Equilibrium Models in the GWB Essentials Guide. Hope this helps, Jia
  18. Hello Gregg, I responded to your question at the top of my last post in your initial thread, but I can clarify. In GSS, you can define a user analyte for plotting but this type of analyte cannot be used to parameterize a React (or SpecE8, Phase2, X1t/X2t) calculation. The unit of pCi/l is not one of the concentration units accepted by the React application. You can find all units accepted by each GWB application in the GWB Command Reference. For units accepted by React, you would want to look at section 6.1 in the Command Reference. You would need to convert your radium concentration to one of the units accepted by React before adding the component to your simulation. I referred you to section 3.3.4 User analytes in the GWB Essentials Guide, which details how users can define a user analyte for the spreadsheet. When you have the concentration units converted outside of GSS, you can add radium to the spreadsheet as a "Basis species" and add in the values calculated. Note that the list of "Basis species" are populated from the thermodynamic dataset loaded for the current spreadsheet. Hope this helps, Jia Wang Aqueous Solutions LLC
  19. Hello, I am glad you got question #2 resolved. Unfortunately, I still don't have enough information to help diagnose problem #1. My questions were trying to assess the problem. It is not helpful to say that it does not work. Is running the plugin is the problem or just retrieving the results in release mode? Were there errors when you tried retrieving mineral saturation results and if so what are they? What have you done so far to troubleshoot and did any of it give you a better idea as to what might be the cause? There's very little that we can advise if you cannot provide more details. Regards, Jia
  20. Hello Stanislaw, You can look through all of the databases installed with the software to see if you can find an appropriate one for your reaction of interest. If not, you can add a reaction to an existing dataset using TEdit, the GWB's thermodynamic dataset editor. For more information on editing thermo datasets using TEdit, you can visit our Tedit webpage and see section 9 in the GWB Essentials User Guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  21. Hello Stanislaw, The program calculates the charge imbalance as average of anion-cation charge sum. GWB9 and later releases, at the request of users, use the calculation presented by Weight, W.D. (2008), Hydrology Field Manual, McGraw Hill, 751 p {charge balance = 100 * [((sum cations - sum anions) / (sum cations + sum anions)) / 2]} If this doesn't help, could you attach a couple of example scripts to demonstrate what you are observing? Best regards, Jia Wang Aqueous Solutions LLC
  22. Hello Hamid, After consulting with our technical team, I have sent a message to your email to help further troubleshoot this unique error. Best regards, Jia
  23. Hi Frank, You're welcome. Thanks for letting us know. Glad to hear that you are up and running again. Best, Jia
  24. I am glad that was helpful. Hope the rest of your project goes smoothly. Best regards, Jia
  25. Hello, To start troubleshooting your issues, I performed a Run -> "go initial" calculation and it failed immediately. This indicates that your initial fluid chemistry needs to be troubleshooted. I would suggest that you do this in React. Could you explain what you are using to set your initial composition? When you perform a mineral swap, like what you have done for Quartz and Montmor-Na, this specifies the mass in the system and tells the program to calculate the composition of the dissolved solutes in equilibrium with these minerals. Is this a correct assumption for your starting system? With the extremely small amount of Na+, I think it is unlikely that Montmor-Na is in equilibrium with your initial fluid. I tried swapping in another aluminosilicate mineral, Kaolinite, which triggered no convergent issue. If you aim to include Montmor-Na as a surface for sorption only, you can always add it as a kinetic mineral instead and set the reaction rate to 0. This way, your mineral will not dissolve or precipitate but the surface area will be available for sorption reactions. Also, a mineral swapped in cannot be set at 0 mass because of the nature of the numerical solver but a kinetic mineral can be. It seems like that was what you were trying to do with the node-by-node setting. More on how to set a kinetic reactant in section 4 Kinetic Reaction Paths of the GWB Reaction Modeling Guide. I would suggest taking a closer look at the chemistry of the boundary fluid that you specified in the "Fluids" tab as well. When I added the fluid composition to a React instance, it also failed to converge. I would also suggest that you double check your units to make sure they are correct. Typically, dissolved concentrations are given in units of per mass solution or solvent. If you are using per volume units instead, please check that the values are correct. I also noticed that the concentration for Mg++ is set as an absolute unit (mmol), which is typically not recommended. Absolute units do not scale with the size of the domain. For more information on setting initial conditions, please see section 2.7 in the GWB Reactive Transport Modeling User Guide. Also, in the attached X1t input file, the surface dataset is Resin.sdat and not the attached surface dataset. I am not sure if this was intentional or a mistake. Hope this helps, Jia Wang Aqueous Solutions LLC
×
×
  • Create New...