Jump to content
Geochemist's Workbench Support Forum

All Activity

This stream auto-updates

  1. Yesterday
  2. Last week
  3. 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
  4. Hi Jia, Thanks for explaining things. It is hard to know what some of the commands mean and actually do. I am using GWB10 and want to know if the GWB plugin will work with this old version of GWB. If it does, then it will be great to write a simple python scripts to extract the data more efficiently. Cheers, Jaxon
  5. Thanks for the reply Jia, Item 1. I want to use surface species after some time has passed in simulation (much better if we can do such that, if some other surface species goes below certain amount. for e.g. use species 1 initially and when the conc. goes below 5mmol use species 2.) Item 2. Apologies for not making it more clear. Basically we can fix the CO2 fugacity in reactants tab but it fixes the fugacity to atmospheric CO2 (~42pa) how can we change that. It would be very helpful if you could provide a example file for x1t using GWBplugin. I can retrieve results from react app using GWBplugin but not from x1t. Following is my python code which doesn't yield any output. # import GWBplugin class from GWBplugin import * # create the plug-in object myGWBrun = GWBplugin() # start the GWB program if myGWBrun.initialize("x1t","","-nocd"): print("Beginning run.") cmds = ['data = thermo no resin.tdat verify', "conductivity = conductivity-USGS.dat", "interval start at 0 day, fluid = fluid_1", "time end at 10 day", "length = 10 cm", "discharge start = 1 cm/hr", "scope = initial", " H2O = 1 free kg", " Na+ = .05 mmol", " balance on Cl-", " pH = 7", "scope = fluid_1", " H2O = 1 free kg", " Na+ = .05 mmol", " balance on Cl-", " pH = 7", "scope", "react .05 mmol of HCl", ] for cmd in cmds: myGWBrun.exec_cmd(cmd) print("Finished run.\n") #retrieve results pH = myGWBrun.results("pH","",3)[0] print(pH)
  6. 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
  7. Hi Jia, Any help would be appreciated, we are kind of stuck on it. Thank you so much.
  8. Earlier
  9. 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
  10. 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
  11. 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
  12. Hi Jia - I'm using react to model mineral saturation in groundwater at a contaminated site. I've entered in the chemical analytes determined from samples collected from a monitor well into the basis. I have attached the react file so you can see the inputs. When I run the simulation, it doesn't run and says residuals too large and shows the largest residuals as Cl-. I know that the simulation is balancing charge on Cl-, so I go into the basis, click on Cl- and select do not balance. When I do that, the simulation runs just fine. However, when I check the output, there is a charge balance error of -24.3%. Here are my questions: 1) Why doesn't the simulation run when I balance on Cl-? 2) When the simulation doesn't run and says, residuals too large, largest residuals as Cl-, what does that mean? 3) Why the large charge balance error? Is it because the simulation is ignoring Cl- because I told it not to balance on Cl-? 4) is the fact that I get a large charge balance error invalidate the results of the simulation in any way? W-3B React Run.rea
  13. Dear Jia, Thank you for your answer. 1. Thanks for the trailer command information, this was very useful. 2. Here is the SpecE8 script from the reference manual page 122: I specified the working directory and have Thermo dataset loaded, I copied this part and get History substitution failed as you can see below. SpecE8> script start SpecE8> # Set up the input and output. SpecE8> set in_id [open "Spreadsheet.txt" r] file8e798820 SpecE8> set out_id [open "Output.txt" w] file8e7a0440 SpecE8> fconfigure $out_id -encoding unicode SpecE8> # First line contains column headers; check for Unicode. SpecE8> gets $in_id headers SpecE8> if {![string is ascii $headers]} { close $in_id set in_id [open "Spreadsheet.txt " r] fconfigure $in_id -encoding unicode gets $in_id headers } 72 History substitution failed. 36 SpecE8> puts $out_id "$headers\tf CO2\tCalcite SI"
  14. 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
  15. 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
  16. Hello, I am new to GWB, and I have the 2023 professional version. Question 1: I have a large dataset and I am trying to calculate saturation indices of my samples at once. It worked in GSS, however, I want to change the porosity and other medium properties which is not possible in GSS. I can do this is SpecE8 but even with the multiple analysis method in the manual , I will still have to change the porosity and run one by one. I would really appreciate if you provide a script to do the calculation at once. I found the similar question asked before , and answer included a link to a script from Rockware but the link is no longer active. Question 2: I tried applying the scripts in the reference Manual(page 65 and 122) and I am getting the message "history substitution failed". what could be going wrong ? Question3: If you have few full scripts for X1t that involve large dataset, please attach them if possible to learn for them. Thank you
  17. 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
  18. Hi! Does anybody know if is it possible to add a mineral to the program database? I would like to add crandallite, CaAl3(PO4)(PO3OH)(OH)6. I am trying to generate mineral phase diagrams that include crandallite and apatite. According to the reference attached (Dill, 1991), crandallite should be formed in the presence of HPO4--, Al+++ (Gibbsite), and Ca++ in an aqueous solution (25º C and 1 atm). However, it seems crandallite is missing in the program database. Cheers 1991 Dill et al - Chemistry and origin of vein-like phosphate mineralization, Nuba Mountains (Sudan).pdf
  19. Hi! Does anybody know if is it possible to add a mineral to the program database? I would like to add crandallite, CaAl3(PO4)(PO3OH)(OH)6. I am trying to generate mineral phase diagrams that include crandallite and apatite. According to the reference attached (Dill, 1991), crandallite should be formed in the presence of HPO4--, Al+++ (Gibbsite), and Ca++ in an aqueous solution (25º C and 1 atm). However, it seems crandallite is missing in the program database. Cheers 1991 Dill et al - Chemistry and origin of vein-like phosphate mineralization, Nuba Mountains (Sudan).pdf
  20. Hi Jia, I have attached an updated script with wet-dry cycles and a re-hydration step in between weathering and evaporation. The way we have been doing this has been taking the weathering script (EW) run it, then pickup the system fluid, change the H2O back to 1, delete the pH (i.e., pH = ,so that it balances on this and save that file as the re-hydration script. (RH). Next we reopen the EW1 script run it, save the output file as the end of weathering solution (EW1), then take a simple evaporation script which picks up the system fluid, react -950 g H2O fix the fugacity of CO2(g) and H2S(g) and balance on pH. This then gives us the end of evaporation solution (EE1), which we save the output, and that is for 1 wet-dry cycle. Now we take the RH script open it up in a text file, copy the script in to the command window and run it to rehydrate the fluid that is in contact with our original 5% weathering of a rock, then save this output file as RH1. We then open a different text file for the evaporation script (the change from the first evaporation script is a full -1000 g H2O instead of -950 g H2O) and run this in the command window to get the second wet-dry cycle, save the output as EE2, then re-hydrate, save output, evaporate, save out put....till we get ten wet dry cycles. Now the script I have provided does all of this in on go, but only gives me the last cycle for the data when try to export solution chemistry(element concentrations in fluid and or select aqueous species) it from gtplot as a tab delineated spreadsheet. Now this is quite tedious and if I mess up in any of the cycles I have to start over in the process. So my questions are: 1. Can I save each output file automatically as the wet-dry script runs? I sorta have this figured out but cant get the subsequent cycles to save. 2. Is there a way to extract the data at each evaporation cycle instead of just seeing the final solution. (We are interested in the change in element concentrations at the end of each evaporation cycle). Essentially I want to make this work more efficiently and be less time consuming, but also since I have a physical disability with limited dexterity in my hands that make it hard to have to constantly copy and paste things as well as constant mouse clicks for many hours of running and saving scripts. So I am curious if there are any steps to be made to make the GWB more inclusive and open to those that are not able-bodied. Currently it is suited for able bodied individuals. Cheers, Jaxon 1_EW-EE cycles.txt
  21. 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
  22. Hi Jia, I still don't think I understand. In your example, there are vol. 5% quartz (mineral volume fraction) and 10% porosity (fluid volume fraction). Should the program automatically include vol. 85% inert mineral (non-reaction phase volume fraction) to sum the three components (fluid, mineral, and inert) up to 100%? Thanks, Zhidi
  23. Hello, The GWB programs 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
  24. 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
  25. Hey Jia, Thanks for the response. No, those variables change as the sorption increases. Is there a way I can use some python plugins to iterate over this process and approximate Frumkin Model. Few more doubts: 1. If I want to run a simulation in x1T for 5 years and after that add another reactant to it and run for 5 more years how can I do that? 2. I have set HCO3- as charge balance species and I want to fix the CO2 content in system around 4200 pa, how can I do that? 3. While using x1t how can we provide impulse inputs in reactants tab without adding reactant as kinetic species. 4. Please also let me know any alternatives of pickup command function for x1t. Thanks and Regards, Aditya
  26. I just want to check if GWB can calculate antimony sulfide scaling? We realized that antimony is not an input, or are we just missing it?
  1. Load more activity
×
×
  • Create New...