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 Qingping, The limitation here is not with the software. To create a diagram like this, or really to make any type of geochemical calculation, the software draws its thermodynamic information from the dataset loaded. The default dataset, thermo.tdat, has a prescribed range of 0-300C. Also, note that not every reaction within the dataset need to have equilibrium constant data across the full range. The software can create diagrams at any temperature range provided that reactions have information at that temperature range. Does the author of the paper provide the thermodynamic dataset they used? That would be a good starting point. You can open and view GWB datasets using the TEdit application. To open the thermodynamic dataset loaded in a current GWB app, go to the File menu -> View -> open the dataset. The GWB apps will also allow you to extrapolate reaction equilibrium constants beyond the prescribed range for the dataset. This option is disabled by default. You can enable it under Config -> Options... In general, I would advise caution when extrapolating log K's for temperature beyond the range of validity prescribed. The further you extrapolate outside the range, the less accurate the values may become. For more information regarding thermodynamic datasets installed with the software, please see section 2.3 of the GWB Essentials Guide. Information regarding dataset structure, see the GWB Reference Manual. Access the guides from the "Help" menu from any GWB app or the Docs pane on the GWB Dashboard. Hope this helps, Jia Wang Aqueous Solutions LLC
  2. Hello Qingping, Thank you for providing the example and input file. A couple of suggestions to help you get started with troubleshooting. You should check if the dataset you are using to generate the diagram is the same as the one used to generate the published figure. For example, I see that the diagram includes the species HAlO2(aq). The default thermodynamic dataset, thermo.tdat, does not include this species. You may want to check in the paper for more information regarding the thermodynamic data used to generate the diagram. You should also check that the equilibrium constants for the reactions in the dataset you are using are also the same as the ones used in Figure 1. The GWB program installs a set of default thermo datasets that you can find in your Gtdata folder or download again from our webpage. Also note that the GWB programs consider all reactions in the dataset. The mineral fields that appear shows the most stable minerals. If minerals that appear are not considered in your system, you set the program to exclude those minerals in the Suppress dialog (Config menu -> Suppress…). Hope this helps, Jia Wang Aqueous Solutions LLC
  3. Hello again, With regards to the thermodynamic dataset, I do not have any additional information regarding the smectite-reykjanes clay but perhaps someone else can help. If you are working with thermo.tdat, you can find the data sources, as cited by LLNL, at the bottom of the file. If you are opening the dataset using TEdit, GWB's thermodynamic dataset editor, you can view the sources listed in the "Header" pane under the Bibliography section. Hope this helps, Jia
  4. Hello Beth, I think there are a couple of factors here that can explain your observation. The first being that the speciation calculation in React (and other GWB apps) accounts for complexes. Assuming that you have a very simple system, containing only water, calcium, and sulfate, the program will calculate the distribution of mass in solution. Complexes that form will reduce the amount of free ions in solution. When I tried with the three component system above and titrated in gypsum, Ca++ and SO4-- complexes strongly and formed a relatively large quantity of CaSO4 in solution. This falls in line with your observation that more gypsum need to be added to the system before it becomes in equilibrium, since there are not as much free ions in solution as you think. If you suppress CaSO4 in the run, you will see that gypsum begins to accumulate in your system earlier, after about 2.25 g have been titrated into 1 liter of solution. You can find the Suppress... dialog under the "Config" menu in React. Perhaps the more important consideration here is that the mass action law accounts for the activity of species, not concentration. Assuming that you are using the default thermo dataset, thermo.tdat, React will use the bdot method, a variation of the Debye-huckel equation, to calculate the activity coefficient of various species. You can plot variable type "Species activity" to see values for Ca++ and SO4--. If you multiple them at the point at which gypsum starts to accumulate (i.e. gypsum becomes in equilibrium with your fluid), you will find that it is equal to the equilibrium constant. If you had assumed that the concentration is equal to activity and the solution deviates away from ideality, you will see very different results than expected. If you would like more details regarding activity models compatible with the GWB, please see section 7.4 in the GWB Essentials Guide. You might also find the Equilibrium models lesson on the GWB Academy helpful. Hope this helps, Jia Wang Aqueous Solutions LLC
  5. Hello Anith, I apologize for the delayed response. I have looked at the file in detail and I believe there are a couple of contributing factors. As you have observed, the program converges with no issue if you turn off charge balance. When you do that and run the calculation, a small but positive charge imbalance was reported. In this case, you would ideally choose an anion component for charge balance. Another complication here is that the carbonate component can dissociate into many things and form complexes with many of the cations in your fluid. This adds further difficulty when chosen as the charge balancing ion. I also noticed that at the given pH, a majority of the carbonate component will exist in fluid as CO2(aq) and a very small amount remains as HCO3-. When you have such a drastic difference in species concentration, it will help the program by swapping the more abundant species, CO2(aq) for HCO3-, into the Basis. However, your fluid contains only one negative component and swapping in CO2(aq) means that I won't be able to charge balance on this species. In general, the charge balancing ion is best to no affect how other species behave. I tried adding F- as charge balancing and SpecE8 was able to converge. Hope this helps, Jia
  6. Hello, I do not have access to the paper linked so I am not able to see more information on selectivity coefficients or equilibrium constants for these exchange reactions. Unlike a reaction in the thermodynamic or a two-layer surface complexation reaction database, the ion-exchange type dataset ask users to provide a selectivity coefficient that is a linear value. The selectivity coefficient should not be a negative value. The selectivity coefficient serves as an equilibrium constant for the mass action equation corresponding to the ion exchange reaction. Perhaps the authors published values for Log K instead of linear values? Perhaps double check the paper for more details. Additionally, I should also note that the GWB carries mass action equations for ion exchange reactions in terms of activities rather than molalities of the aqueous species. When taking coefficients from literature, you should double check units and convert from total molality to free activity as needed. Please see section 2.6.4 in the GWB Essentials User Guide for more information on how The GWB models ion-exchange. If you still are encountering issues with this, please provide more context to the studies and details with regards to what you are trying to model. Hope this helps, Jia Wang Aqueous Solutions LLC
  7. Hello Anith, Thank you for your patience. We are still currently looking into the issue with your example files. Best regards, Jia Wang
  8. Hello Reza, A few suggestions to help you start troubleshooting: Kinetic models are best for modeling reactions that are slow but observable in the time span of your simulation. In X1t, you can perform a "Go initial" run to calculate the initial equilibrium state before any time steps take place. If you do so and plot the Dissolution rates under Reactant Properties for all minerals, you will see that Wollastonite has a very high initial dissolution rate compared to other minerals. Having a much faster rate is going to force the program to take smaller time steps for one but also may make it much more difficult to converge. If you have reactions that are occurring really fast, you might consider just constraining it as an equilibrium reaction instead of using kinetics. Once I removed Wollastonite, X1t failed later in the simulation. I tried decreasing the step size, delxi, in the Stepping dialog to 0.001. Since there are only three nodes in your model, a smaller time step in general seems to have helped. If you want to use the nucleus density for precipitation calculations where there is no mass for kinetic minerals present initially, you would want to include the nucleus density in your rate law scripts. If you don't, the nucleus density won't be considered for calculating a surface area for nucleation. Since you are using a script, you can add a simple IF statement that looks something like: 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 general, I would suggest you start by simplifying your simulation. You might want to remove the minerals and start with one reaction interval to see how far you get. You should also double check the values in the rate law to make sure they are correct. Hope this helps, Jia Wang Aqueous Solutions LLC
  9. Dear Anoop, The Academy disabled precipitation to keep the system entirely in the fluid phase for simplifying the example and allowing direct comparison of titration to alkalinity. In reality, precipitation can absolutely affect alkalinity as species from solution are removed. As for the second part, I think it makes more sense to think about them in reverse. A quick explanation regarding how the software calculates the initial equilibrium state. Before any reaction takes place, the GWB software will calculate the equilibrium state of the fluid with the given composition. If precipitation is enabled in React, the program will first calculate the equilibrium state and output a results block to the text output file. If there are minerals that are oversaturated, the program will iterate to solve for the true equilibrium state and precipitate minerals until there are no longer any minerals saturated with respect to the fluid. Running your attached example and opening the output text results file, I can see that several minerals are precipitated at true equilibrium. Two of which are carbonate minerals, dolomite and strontianite, which will affect the total amount of carbonates in fluid and reduces the carbonate alkalinity in solution. This falls in line with your observation of the initial carbonate alkalinity reported when precipitation is checked vs not. I am not entirely sure what you mean by this: "I find that irrespective of titrant (HCl or H2SO4), the prediction of carbonate alkalinity is the same for a given option (either Allow Precipitation or No Precipitation).". When I look at your slides, I see that carbonate alkalinity ultimately depletes to near zero at the same amount of acid added but the curve on the plots are not the same. Just focusing on the HCl titration experiments, you can see that in the case where no precipitation is allowed, the alkalinity starts at 1800 mg/kg and drops linearly as HCl is titrated in. In the plot where precipitation was enabled, the carbonate alkalinity is held relatively stable until approximately 25 mmol of HCl was added. This effect is due to the carbonate minerals that precipitated in the initial equilibrium calculation that is now dissolving back into the fluid. If you plot Minerals (under Variable type), you will see they are completely dissolved when 25 mmol of HCl was added. Hope this helps, Jia Wang Aqueous Solutions LLC
  10. Hello, If you would like to determine alkalinity, one way to go about it is to set up a titration path system in React, with your initial fluid composition set in the basis. You can titrate an acid like HCl until the pH reaches the designated endpoint and determine the alkalinity based on the equivalents of acid added. For an example of this, please see the acidity and alkalinity unit on the GWB Academy. Note that the GWB programs (SpecE8, React, Phase2, X1t, X2t) will calculate carbonate alkalinity based on the speciation of carbonate species when they are present in your system. You can find carbonate alkalinity in the output text file or under variable type Chemical parameters in Gtplot. Hope this helps, Jia Wang Aqueous Solutions
  11. You're welcome Karen. I hope the rest of your project goes smoothly.
  12. Hello, A few suggestions to help you start troubleshooting. The software can only consider reactions that are present within the thermodynamic database loaded into the calculation. The script attached uses thermo.tdat, the default database used in the GWB and is a good quality dataset published by Lawrence Livermore National Lab but it doesn't contain the solid Fe(s) reaction. You can add in the desired reaction from literature or take a look in other databases that might contain Fe(s). If appropriate, you can copy over the reaction to thermo.tdat and save the new dataset under a new name or switch over to another dataset entirely. You should also check the Log Ks for reactions in the database and see if they are appropriate to model conditions of the experiment that you are conducting. Reference information regarding each dataset installed with the GWB can be found when you open the dataset in TEdit and go to the Header pane. For more information on TEdit, the GWB thermodynamic and surface dataset editor, please see chapter 9 of the GWB Essentials User Guide. GWB programs consider all reactions available in the thermodynamic dataset with the given composition of your system. In some cases, when performing a calculation, you will need to suppress more stable minerals so that meta-stable phases that are observed are allowed to appear. The suppress option is under Config -> Suppress. You might want to experiment with trial and error to see what reduced Fe species that are appearing that might be more stable but not necessarily expected in your calculations and suppress them. Also note that the program by default denotes the water stability limits using dashed lines and truncates the diagram to show the region in which the water is stable. Water is not stable outside of these boundaries. You can turn off the truncation to extend the diagram over the full plot by going to Format -> Quick toggle and uncheck water stability limit. Hope this helps, Jia Wang Aqueous Solutions LLC
  13. Hello, I believe the hardness is determined based on the magnesium and calcium concentrations in the fluid. The program follows the method described in the Standard Methods for the Examination of Water and Wastewater for the its specific calculation. Hope this helps, Jia
  14. Hello Huan, Glad to hear that your model is up and running. I hope the rest of your project goes smoothly. Best regards, Jia
  15. Hello Karen, The Goethite seems to be set up correctly. You can perform a Go -> Initial run and then verify the percentage of Goethite along the domain quickly by plotting Mineral (Goethite) volume% vs X position. Best regards, Jia
  16. Glad to hear that was helpful. Hope the rest of your project goes smoothly. Best, Jia
  17. Hello Huan, Thank you for providing more information about your conceptual model. Here are some answers I hope are helpful. The "normal" boundary conditions in the Flow pane are what is described as the default "inlet/free outlet" conditions in the user guides. This means that when fluid is entering the domain, that bound set as an "inlet", where mass is allowed to advect, diffuse and disperse across the boundary. On the other hand, where flow is exiting the domain, the bound is set as a "free outlet", where mass can only cross the boundary by advection. When a boundary is set for "normal" conditions, it can vary from being an "inlet" to a "free outlet" throughout the course of the simulation depending on the flow direction. In your case, I think you are correct in that you should set boundaries with the "outlet" condition since you do wish to diffuse or disperse across and to set the discharge to zero. In X2t, the open flow boundary uses the potential drop across your domain to calculate the flow field and discharge. It sounds like you should be able to set both boundaries to closed and select "outlets" for your left and right bounds. Setting the boundary as "closed" should set the discharge automatically to 0. On the other hand, you can set both left and right boundaries to open and set the potential drop to be 0, keeping the "outlet" condition for both sides and see if that helps? Hope this helps, Jia
  18. Hello, Additionally, I also noticed that you had set your O2(aq) as a total concentration instead of a free quantity, which is commonly is. A free quantity means that the amount inputted by the user represents the quantity of that species alone, which O2(aq) almost always is when measured. If you do so, you should be able to run the calculation without swapping basis as mentioned above and still converge with your calculations. Hope this helps, Jia
  19. Hello, The custom thermo dataset was not attached, but I manage to open your GSS file with thermo.tdat. To investigate the issue with convergence, I launched a SpecE8 instance using the sample composition from the attached GSS file. I noticed that your system is relatively oxidized (with an O2 concentration of 4 mg/kg) and at this pH, the dominant species for your arsenic component is going to be the more oxidized form. It would help the program to solve the equilibrium state when a more dominant form is swapped in. In this case, I tried swapping in AsO4--- for As(OH)4-, making sure to convert the concentration in GSS (I did equivalents of As in mmol/l) and use that value, and SpecE8 converged without issues. If you have only a few samples, it might make sense to launch SpecE8 and perform the swap and run your calculation. If you wish to carry out the calculation in GSS for a large number of samples, you can edit your dataset and use the exchange feature to swap the position of AsO4--- and As(OH)4- and AsO4-- will be a basis species. This way, you can add the total concentration of As in the spreadsheet by adding AsO4--- to the GSS spreadsheet and maintain equilibrium calculation between arsenic redox species. Alternatively, you may consider adding the total concentration of As in under the analyte AsO4--- without editing your dataset. This case, you would be decoupling the redox couple AsO4---/As(OH)4-. I am not sure what would be more appropriate for your consideration. Hope this helps, Jia
  20. Hello, When GSS is asked to calculate an analyte value, it actually calls SpecE8 to do the calculation. When SpecE8 cannot solve the equilibrium system with the given conditions (composition of your sample, temperature, etc) in your GSS sample, the calculation will fail. There can be a variety of issues that cause SpecE8 to fail an equilibrium state calculation and it's not clear based on the screenshot. If you scroll down in the Calculation Error Report pane, you should be able to learn more details regarding the error. I suggest launching a SpecE8 instance with your sample so that you can investigate more closely. For more information on launching GSS samples in SpecE8, please see section 3.5 in the GWB Essentials User Guide. If you require additional assistance with troubleshooting, please attach the input and thermo file so we can take a closer look. Hope this helps, Jia Wang Aqueous Solutions LLC
  21. Hello Scott, Glad to hear that was helpful. Hope the rest of your project went smoothly. Best, Jia
  22. Hello, I believe radial plots only display the bulk component composition of the fluid. A bulk concentration represents the total amount of a component distributed through the system. Analytes that you add under “Basis species” are all considered bulk quantities. A workaround to make your PFAS species appear on the radial plot is to change the “Category” type for your analyte to “Component in Fluid”. But please note, doing so will change where your species will appear if you plot XY type plots, the species will appear under “Components in fluid”. For more information regarding different plot types, please see section 8 in the GWB Essentials User Guide. Hope this helps, Jia Wang Aqueous Solutions LLC
  23. Thank you for the additional clarifications. Yes, you are correct that the plot will only display scatter data based on the current axes variables. There's no way to designate the predominant species to plot. The workaround you mentioned above is certainly one strategy to address this at present. I will add your suggestion to the list of user-requested features. Best regards, Jia
  24. Hello again, I just want to follow up to provide some clarification. While you cannot simultaneously display two species on one axis, the equilibrium lines drawn in the diagram do use the predominant species as your x variable changes. If you construct the Al solubility diagram as described above, the predominant Al species at low pH is Al+++ and as pH increases on the x-axis, the predominant form eventually becomes Al(OH)4-. You can click on the line boundary to see the equilibrium reaction on the diagram and balance the reaction in Rxn to see the equilibrium equation plotted. Alternatively, you can open the text output file ("View Results" button on the bottom of the Plot pane) to see equilibrium equations possible for all reactions among the aqueous species and minerals in the system. In the bottom section of this file, you will find the ones used for the main diagram. Hope this helps, Jia
×
×
  • Create New...