Jump to content
Geochemist's Workbench Support Forum

Jia Wang

Admin
  • Posts

    729
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by Jia Wang

  1. Hello Denis, Glad to hear that you were able to pinpoint the issue. I hope the rest of your modeling work goes well. Best, Jia
  2. Hi Tomas, By default, GSS has a carbonate alkalinity parameter that you can add as an analyte. To do so, you would go to "+analyte" --> "Chemical parameters" and then select carbonate alkalinity. For total alkalinity, you will need to define a user defined variable. To do so, select "+analyte" and then select "User analytes". For more information on how to define a user analyte, please see section 3.3.4 in the GWB Essentials User guide. Hope this helps, Jia Wang
  3. Hi Denis, I took a quick look at your scripts and noticed that you have set a really large rate constant for the mineral WAK (alk). As a result of your rate law, the high dissolution rate is extremely high at the start of your simulation. The program cannot converge because of that really high dissolution rate. To see this, you can do a "go initial" (Run --> Go initial) run on your WAK IX.2.rea file and navigate to plot the dissolution rate to plot on the y-axis. The dissolution rate for WAK Glass (alk) is ~69,000 mmol/kg/s. Considering that you only have 10 mmol of glass in your simulation, the glass dissolved almost instantaneously. I would suggest simplifying your model setup to use an equilibrium approach if your glass is dissolving that fast. Best regards, Jia Wang
  4. Hi Sarah, I am glad you find it helpful. I hope you enjoy using The GWB. Best, Jia
  5. Hi Dino, I am glad you were able to solve this problem. It is hard to say what the exact cause of the issue is without seeing the input file and the .gtp file that resulted from that. It might be cause by a run that was incomplete and didn't write properly to the .gtp file? What version of GWB are you running? If this occurs again in the future, please save the input and the .gtp/.gtc file and send it to us so that we can take a closer look at the cause of the issue. I hope you continue to enjoy The GWB. Best regards, Jia Wang
  6. Hi Dino, Thank you for the basic script file. It is difficult to say why you're encountering the stability issue without your input file and your thermo dataset. I can see that your basic script includes the variable X2 but it is not defined in the script and it's not GWB parameter, so by default, it is evaluated as a 0 value. In this case, your X1 variable is just equal to your time. You can add Time to the list of variables you are printing out and check to see if it is the same as X1. To check whether or not time was changing throughout the simulation to calculate your rate, I used your rate law script for a simulation of a simple kinetic dissolution of quartz (Ch26_quartz.rea), an example file that came with the GWB installation in the GBRM subfolder, where GWB is installed. When I added the Time parameter to the variables for printing out, I saw that it was varying throughout the simulation. If you would like someone to look further into the stability issue, please attach your input file and your thermo dataset. And also, what release version of the software are you using? Best regards, Jia Wang
  7. Hi Sarah, Unfortunately, there's is no way to select the two different components for the same axis in Gtplot. You can however, create a user equation that sums the components you want (e.g. Ca++ and Mg++) and add it to your GSS spreadsheet and plot that new analyte as an axis variable. To do so, click on "+analyte" on the GSS spreadsheet and then select "user equations" and click "edit". In the dialog that pops up enter the appropriate information and save. For the example of adding the Ca and Mg components together, I used the name [Ca] + [Mg], and selected the Category as "Components in fluid" and set the default units to mmolal. In the equation editor, I entered the equation ${Ca++, mmolal} + ${Mg++, mmolal}. Once you click "Apply", the new analyte should be added to your spreadsheet. If you launch an XY plot again, you should be able to find the component you just created under the "Components in fluid" Variable type in Gtplot. For more information, please refer to section 3.3.5 User equations in the GWB Essentials User Guide. Hope this helps, Jia Wang
  8. Hi Dino, The GWB by default uses a built-in rate law in the form of surface area* rate_constant * (1-Q/K). It sounds like for your purpose, you would need to prescribe a customized rate law, where the rate is dependent on the time since the simulation began. If the rate law you are trying to prescribe is relatively simple, you might want to consider setting the rate law directly as a set of character strings. To do so, go to your kinetic mineral in the Reactant pane, select the 'equation' option for the rate law from the dropdown menu. You can find a list of parameters used by the GWB in Table 5.1 and the syntax for writing the equation in section 5 Custom Rate Laws in the GWB Rxn Modeling User Guide. Note that the parameter for time is "Time" and the default unit is in seconds. If your custom rate law is more complex, you might want to use a rate law script written in the BASIC language. For more information, please refer to section 5.2 Rate law scripts in the Reaction Modeling Guide. If you would like to troubleshoot further, please attach your input file, thermo dataset, and/or the rate law script so someone can take a closer look. Hope this helps, Jia Wang
  9. Hello Huan, You're welcome. I am glad that was helpful. Best, Jia Wang
  10. Hello Liu, You're welcome. I hope you enjoy using The GWB. Best, Jia Wang
  11. Hello Huan, Thank you for the additional files and information. I noticed that there is a minus sign in front of the surface area term in the screenshot of the equation but it is missing in your rate law scripts. Perhaps that Is intentional? I didn't check if all the other values are correct though. I also believe that when you use a custom rate law, the nucleus density input is not used in your simulation unless you specify it in the script itself. Note that the nucleus density option prescribes a minimum value for a supersaturated mineral’s surface area over the calculation. The program calculates the actual surface area from the mineral’s current mass and specific surface area and uses this whenever it exceeds the nucleus density. I edited your quartz script by adding a few lines to allow the rate to be calculated from the nucleus density when the surface area is less than the nucleus density times the solution volume. Can you try this to see if it helps? IF surface < nucleus * soln_volume THEN 20 ELSE 40 20: rate = -nucleus * [rest of your equation here] GOTO 60 40: rate = -surface*[rest of your equation here] 60: RETURN rate In GWB, mineral reactions are written as dissociation reactions, which means that mineral is on the left hand side of the reaction and the aqueous species are on the right. In React, a rate law is commonly set describing the forward proceeding reaction. So in this case, a positive rate, indicates a mineral is dissolving and a negative rate indicates the mineral is precipitation. You alternatively, can also specify for GWB to evaluate the rate law to give you a positive result for the reverse reaction instead, which is the precipitation of the mineral. In this case, a positive rate would indicate mineral precipitation and a negative rate would indicate mineral dissolution. By default, the GWB evaluates the You can find a detailed example for this in section 4.3 Forward and reverse reactions of the GWB Reaction Modeling Guide. I noticed on the Reactants pane, that you have chosen the precipitation as the positive rate for kinetic quartz reaction but the the dissolution rate as the positive rate for kinetic albite, which is why I suggest double checking to make sure that they are consistent. Hope this helps, Jia Wang
  12. Hello Huan, I wasn’t able to run your simulation with your custom dataset but I can offer some suggestions base on running your input file with thermo.tdat. When I used the rate law script files provided for quartz and albite, the resulting precipitation rate for quartz precipitation is zero, you can see this if you plot "Dissolution Rate, Quartz" under Reactant properties vs. "Time" in Gtplot. Similarly, the dissolution rate for Albite also drops to near zero at the start of your simulation as well. Since your reaction rates are so slow, nothing is really happening after your system initially equilibrated. This would explain why you do not see quartz accumulating in your simulation. I also noticed that you have selected to write your rate law for quartz as a precipitation reaction instead of a dissolution reaction, please check that your basic scripts are written correctly for both minerals. Can you explain a little bit about what you are trying to do with this simulation? I am a little confused by your model setup. I see that one of the variables in your custom rate law is the activity of H+ but in the basis pane, you set H+ as the charge balancing ion. If you would like someone to take a closer look, please attach your customized dataset so we can run your input file directly. Best regards, Jia Wang
  13. Hello Hou-Chun, The reactant times command allows you to scale the amount of reactant you are adding to the system from your Reactants pane. Here are a couple of suggestions regarding your model setup.. The flow rate on the Flow pane is the specific discharge which is a volumetric flux rather than the average linear velocity of flow. To obtain the average linear velocity of your fluid flow, you would need to divide the specific discharge by the porosity of your domain. If your measured flow rate is the average linear velocity, then you would need to multiply by the porosity to calculate the specific discharge. Please refer to section 3.2 Setting the flow rate in the Reactive Transport Modeling User Guide for more details. You can choose to set the discharge rate for each individual reaction interval or all intervals. Please note that in the example Weather.x1t, the saturated fraction is entered as the "porosity" rather than true porosity of the soil. Further explanation of how to setup unsaturated media can be found in section 2.12 Porosity evolution in the Reactive Transport Modeling User Guide. If your simulation is taking a while to run, you can always try shortening the simulation to see if you are seeing the correct rate constants, flow rate, mineral volume, and etc before continuing on to run the length of time. Hope this helps, Jia Wang
  14. Hello, While there is not direct way to keep track of your users' activity, you might be able to parse the debug log to see if it contains any user activity information. The debug log is generally used for troubleshooting a floating license installation. To obtain a copy, please refer to step 10 in section "1. Setting up a license server" of the installation guide. Hope this helps, Jia Wang
  15. Hello Minming, It sounds like you have sample concentration measurements and using these measurements, you would like to make a speciation calculation for each sample. Is this correct? If you are working with a really large dataset, a convenient way to manipulate it in GWB applications is to create a GSS spreadsheet with your data. If you use a GSS spreadsheet to store your sample analyses, you can launch SpecE8 to make speciation calculations for your samples all at once and store the results for each speciation calculation in a different file. For example, you would enter the concentrations for your 5 samples into GSS and then launch the SpecE8 dialog to perform the speciation. There is an option to select all samples in the dialog. When you click ok, SpecE8 will calculate the speciation of your samples one at a time and automatically save the result for each sample to a folder you designate. Please refer to my previous post above for more information on the steps and user guides. SpecE8 only accepts one set of basis constraints at a time so it's not possible to put constraints for all 5 samples in one SpecE8 instance. Hope this helps, Jia Wang
  16. Hello, If your dataset is in a GSS spreadsheet, then you can launch SpecE8 to speciate of each of your samples and save the resulting output text files. You can find more information on how to create a GSS spreadsheet in section 4.3 Your first data sheet in the GWB Essentials User Guide. Once you have your GSS spreadsheet set up with all your samples, go to the "Analysis" tab and select "Launch...". Specify the folder where you would like to save your speciation result (click on "Browse...") and then select the samples you wish to speciate. Hit "Ok" and SpecE8 should begin its calculation for each sample one at a time. There should be an output txt file and a Gtplot file for each sample speciation calculation in the folder you have designated. For more information and example, please refer to section 3.5 Launching SpecE8 and React from the GWB Essentials User Guide. If this doesn't help, can you please provide more details about what you're trying to do? Please don’t post multiple topics about the same issue in the future. We appreciate your patience and hope you enjoy using the GWB. Hope this helps, Jia Wang
  17. Hello Alex, I took a quick look at your script and noticed that you have set a really high rate constant for kinetic calcite relative to all the other minerals in your system. To investigate error, I shortened the run time on your simulation to 1 day and looked at mineral dissolution rates during the simulation. Because of the high rate constant for calcite, you have high reaction rates adjacent to zero rates, in a moving front as the model progresses. To see this, plot the x-position on the x-axis and dissolution rate of calcite on the y-axis. Since the rate constant for calcite is many orders of magnitude higher than other minerals, it might be better to consider calcite using the equilibrium approach. If you want to continue using a kinetic rate law for calcite precipitation/dissolution, you should reconsider the rate constant that you are using. I also noticed that you have set a nucleus density for tridymite, kaolinite, and illite. This is only necessary if the mineral you are setting up a kinetic rate law for does not exist in the system. In your case, you do not need them. Hope this helps, Jia Wang
  18. Hello Helge, If you had decoupled NpO2+ and set it as a basis species entry with no other oxidation states for your model, then you can use the command "report concentration original fluid" to get the total concentration of that component in the fluid. If you are running a redox equilibrium model, where NpO2+ species concentration is calculated, then you would need to retrieve the concentrations of aqueous species with the desired oxidation state (e.g. Np(V)) and sum them in python. Hope this helps, Jia Wang
  19. Hi Polly, I took a quick look at the PhreeqC approach to modeling surface complexation and it seems like the debye lengths input is used in the Donnan approach to calculate the composition of the diffuse layer. GWB does not use the Donnan approach. The program automatically assigns composition to the diffused layer. The surface complexation model ensures that reactions in the surface datasets are honored in the calculation. For any given calculation, you can fix the surface potential in a two layer model in a calculation. If you do that with a surface potential value retrieved from the PhreeqC model, then you might get similar results from both models. Though, I would not recommend doing that as other inputs required between the two models may vary. I would recommend running a full two layer model without setting a constant potential. Best regards, Jia Wang
  20. Hi Spencer, The bar chart expresses the bulk composition of the fluid in electrical equivalents and does not account for speciation. You can use SpecE8 to calculate the distribution of mass for each component and plot these results in an XY plot as electrical equivalents. The calculated results can be exported and be plotted externally. Please also note that the axis on the bar chart does not represent ionic strength of the fluid. If you want to check if mass balance is honored, you should use molality as the unit. If you add up the concentration of individual species, you will arrive at the bulk composition of that component. Best regards, Jia Wang
  21. Hello Alex, The GWB does not currently include a model for solid solutions. Olivine is a solid solution series with two endmembers, forsterite and fayalite, which are both included in thermo.tdat. You can however add intermediate members with discrete composition to the database if you like. You would need to include the equilibrium constants associated with the mineral reaction. Please don’t post multiple topics about the same question. We hope you enjoy using the GWB. Best regards, Jia Wang
  22. Hello Jen, You can run GWB on a Mac by using a Windows emulator such as Parallels. Another option is to set up dual boot configuration using a program such as Boot Camp. You can find more information here. Best regards, Jia Wang
  23. Hello Jason, I took a quick look at your input files and here are a few suggestions. For alkalinity concentration, you should use meq_acid/l for the unit and not meq/l for HCO3-. This will change your calculation by quite a bit. I also noticed in the basis pane that 1 free kg of H2O is designated but your problem describes a 100 ml sample with a density of 1.01 g/cm3. I would suggest setting the amount of free solvent at 0.1 kg so your calculation is performed at or very close to your sample volume. Another suggestion is to change the value of "reactant times" in the Reactants pane to something like 0.0001. It looks like you created a 10 kg solution of your 36% HCl acid. You won't need to titrate all of it if you are only expecting to see the change you want with a small amount added. Reactants times factors the total amount of your reactant that you are adding to your fluid. You can also turn off precipitation in your React simulation by going to Config --> Option and uncheck precipitation. Unless you are expecting minerals to precipitate during your titration, it might be worth considering turning it off so that mineral precipitation is not a factor in your calculation. I think with these changes, you will get much closer to the field measured volume and mass of HCl added. You can view your result in Gtplot by choosing your x-axis variable as "mass reacted total" under the variable type "Reactant properties" and your y-axis variable as the pH under the variable type "Chemical parameters". For more information on plot configuration, please see section 6.2 XY Plot configuration in the Reaction Modeling User guide. Hope this helps, Jia Wang
  24. Hello Spencer, Like I said above, the concentration you enter for Fe++ in the GSS spreadsheet is considered as Fe++ when you are plotting from GSS. So that's why I suggested you adding Fe++ and Fe+++ separately. I don't think the graph is showing twice the ionic strength. If you add the individual species of that component, then you should arrive at the same concentration as shown in the plot. For example, if you summed all the sulfate species concentration and covert to meq/kg, then you should get the same value as seen plotted from the GSS spreadsheet. There should be a section below in your SpecE8 output file that shows you the total component concentration for that species (e.g. SO4--). The bar graph type plot does not plot individual species concentration, only component concentration. You can however retrieve each aqueous species concentration in units of eq/kg and make the plot separately in excel or python. To retrieve those values, you can plot your SpecE8 calculation results in Gtplot (in your SpecE8 window go to Results and click on plot results). An XY plot should pop up, if not, you can go to Plot on the menu bar up to and select XY plot. Double click on the center of the plot to bring up the plot configuration. You can configure one of the axis to show the variable type "species concentrations" and change the units to meq/kg (or eq/kg). Click ok or apply. Then go to the Edit --> copy as --> spreadsheet and paste your result into excel to view. You can manipulate this numerical result externally to plot as you wish. Hope this helps, Jia
  25. Hello Spencer, Glad to hear that you are getting closer. The concentration you enter for the basis species represents the total component composition (e.g. Fe++, Fe+++, FeSO4+, FeCl+). In a bar graph, the concentration displayed assumes the concentration reflects the oxidation state of the analyte you have chosen, in this case Fe++. I think you might want to add in Fe+++ and represent the concentration for that analyte separately and select "free" unit for Fe++ and Fe+++. You can show all ions in the bar plot by unchecking "Common ions" in the parameters for Bar Chart dialog. Please see section 8.1 Plots type for an example. Hope this helps, Jia
×
×
  • Create New...