Jump to content
Geochemist's Workbench Support Forum

Tom Meuzelaar

Members
  • Posts

    486
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tom Meuzelaar

  1. Hi Drew: Yes, this is a quirk with using the custom rate law functionality - you'll find that if you enter a value for the rate constant, any value, GWB will let you proceed, even though your equation doesn't call for it. A couple of hints that will also help: 1. Given that you have a temperature dependent rate constant, and are using activation energy in your rate law, select the Preexp / activation energy radio button, and enter a value for both fields. 2. You should incorporate the (1-Q/K) term to reflect tapering of the reaction as you approach saturation, as well as allowing for both the forward and reverse reaction. 3. You have some syntax errors in your rate law. I suggest starting with a simpler form of the rate law (maybe remove inhibiting/promoting species initially) until you get it working correctly. Then add complexity piece by piece. I hope that helps, Tom Meuzelaar RockWare, Inc.
  2. Hi Christiane: In your simulation, water mass decreases for two reasons: 1. precipitation of Gypsum 2. generation of acidity (your pH decreases from 12 to -4) There is no direct way to fix water mass in GWB- you could titrate H2O back in via the Reactants panel as it is being lost, but since H2O loss is not linear in your system, this would have to be done in two model steps, which is not very ideal. The other way to tackle this issue is to ask whether the water mass decrease predicted by GWB is actually what you observe/expect in your system. You could prevent Gypsum precipitation by removing the mineral from consideration (Config- Suppress option), and you can also hold pH constant (use the Fixed pH option in the Reactants tab). I hope that helps, Tom Meuzelaar RockWare, Inc.
  3. Hi: Gas fugacities in GWB are expressed in atmosphere units - 1 atm = 1.01325 bar (or 1013.25 millibar). The value for CO2 reflects the composition of CO2 in the atmosphere, about .035%, or .00035 atm (~.355 millibar). I hope that helps, Tom
  4. Glad to be of help. One way to constrain HCO3- is to set a CO2 fugacity (partial pressure of CO2 in your system)- if your fluid is equilibrated with the atmosphere, for instance, add HCO3- to your Basis, swap in CO2(g), and set a log fugacity value at -3.5. Best regards, Tom
  5. Hi: I think the question to ask- if all the concentrations are set, then why the big discrepancy in charge balance? I'm not sure what to suggest without knowing more about your water. Regards, Tom
  6. Hi: In this case, it looks like you have a shortage of cations, not anions, which is why React has difficulty balancing on either HCO3- or Cl-. If you set charge balance to Na+, React converges without trouble. Similarly, you can speciate the water without charge balance and there are no convergence issues. I hope that helps, Tom
  7. Hi: It depends on the question you are asking the model. If the gases in the headspace have already equilibrated with the solution, you can consider it a closed system. If, however, you are interested in knowing how the gases affect the composition of the fluid, you could model it as an open system. In other words, in the first scenario, the boundaries of your system encompass both the fluid and the headspace gases. In the second scenario, the boundaries of your system encompass the fluid only, while the headspace gases are external- gases can be transferred into or out of the system. Keep in mind, also, that GWB tracks gas fugacities, and not actual masses. I hope that helps, Tom Meuzelaar RockWare, Inc.
  8. Hello: If you attach a copy of your script, I'd be glad to take a look. Regards, Tom Meuzelaar RockWare, Inc.
  9. Hi: You have two choices: 1) Run the simulation without charge balance - in the units drop-down box, simply select the 'balance off' option. 2) If you have confidence in all of your fixed concentrations, but your overall solution has significant charge balance error, you can add the 'missing' component to your Basis without specifying a concentration. Set charge balance to this component, and SpecE8/React will add sufficient mass to achieve charge balance. I hope that helps, Tom
  10. Hi Terry: Assuming you are doing this in React, have you tried titrating the minerals in one at a time? Convergence issues can arise, for instance, when setting kinetic rate laws for reactions that proceed very fast relative to the overall simulation length. Agreed- the more complexity you add to the system, the harder the convergence issues are to work out- this increases by several orders of magnitude when you migrate from reaction path to reactive transport. You might try first creating individual React scripts where you titrate each kinetic mineral in individually, and get a sense of model stability over your simulation length. Hope that helps, Tom
  11. Hi Terry: Here's where I would use the kinetic titration approach- for each of the three components, Al, Si and O, decide which is the stable, equilibrium phase, and then add the metastable phases at kinetic minerals in the Reactants panel. You'll need rate constants and rate law data, which might be hard to come by, but this gets around the swap limitation in the Basis. Regards, Tom
  12. Hi Jono: Here's how GWB calculates charge imbalance (meq/kg) and % error: Charge imbalance: charge_imbal = (charge_cation - charge_anion)/(1.e-3 * g_soln); % error: if (charge_total > 0.0) charge_impct = 100.0 * (charge_cation - charge_anion) / (0.5 * charge_total); else charge_impct = 0.0; I hope that helps, Tom Meuzelaar RockWare, Inc.
  13. Hi Jono: As a follow-up to my first response, note two things: 1. There are cases where a zero (or even negative) value is appropriate in GWB speciation calculations- for more on this refer to Geochemical and Biogeochemical Reaction Modeling chapter 3, p. 37-38 (differentiation between species and components, and components with negative masses). In the next patch (8.0.6), we'll make the 'parameter is incorrect' a bit more descriptive 2. In versions 8 to 8.0.4, if titration alkalinity is used as input, charge balance may be off by as much as 50% due to a bug that has just been fixed in the latest patch, 8.0.5. For more information on this, please visit this thread. Let's be sure that this is not the reason for the discrepancy you are seeing... I'll follow up with one final post regarding method of calculation. Regards, Tom
  14. Hi, Just as an expansion to my previous answer- the way that you go about setting up a heterogeneous mineral distribution in your domain is as follows: Swap minerals that are in equilibrium with the fluid into your Basis, and use the field variable to describe its distribution For each mineral not in equilibrium initially, add it as a kinetic mineral in the Reactants pane. You can again set its initial mass as a field variable. I hope that helps, Tom
  15. Hi: The problem is not so much a limitation with GWB and the Basis, as it is a limitation imposed by thermodynamics and the phase rule. The large number of mineral phases you see in your system indicate a metastable or disequilibrium assemblage. While you could proceed with building this (complex) simulation using mineral dissolution/precipitation kinetics, I'd first ask two questions: 1). Does the model objective require that you include every single one of these mineral phases, or is it possible to simplify the system? 2). Have you worked out a stable chemistry in React before proceeding to the reactive transport simulation? IMO, the most useful geochemical models are often very simple in scope... I'm not sure how to answer your question about precipitation/porosity distribution, because it doesn't seem like the script runs at this point. Do you have an output set from a model that has completed? Best regards, Tom Meuzelaar RockWare, Inc.
  16. Dear GWB Users: We have found a flaw in the alkalinity command in GWB releases 8.0 through 8.0.4. GWB releases 7 and earlier are not affected. GWB 8 users should upgrade to the latest maintenance level, 8.0.5. If you used the alkalinity command to calculate carbonate concentration from titration alkalinity, or did so in a GSS datasheet, you should check your past calculations after upgrading. The patch to level 8.0.5 addresses the alkalinity issue as well as all known glitches in GWB 8: Fix various issues in Gtplot and Xtplot, especially with respect to selecting units. Correct several problems with overlaying scatter data in Gtplot and Xtplot. New predefined variable "Time elapsed" in GSS to simplify adding scatter data to plot of kinetic simulations. Landscape printing of GSS data sheets. Assure data legend fits onto printouts of scatter plots User's Guides are hyperlinked Better support for landscape and color printing from GSS Improved "connect scatter points" feature in Gtplot and Xtplot Show per-kg units in GSS when calculating charge imbalance Fix a problem in multithreaded polythermal runs using Pitzer model Improve label positioning when copying special plots to clipboard Implement control scripts Provide two header files for user DLLs missing in 8.0 install Correct minor problem with report command Fix all known problems with the GUI Resolve all known issues with 8.0 through 8.0.4 Please contact me with any questions. Regards, Tom Meuzelaar RockWare, Inc.
  17. Hi Jono: The error you see is just a result of setting your SO4 concentration to zero. If you remove this analyte, or replace it with a "n/d" or blank field, all of the options in the Data - Calculate menu will work fine. Let me see what I can find out about method of charge balance calculation..... Regards, Tom
  18. Hello: I'm attaching a script and text table that shows how this can be done, as well as a PDF file with Xtplot output showing the distribution of mineral volume across the domain. The latter allows you to evaluate how X2t assigns values over the domain from the text file, since domain indexing occurs from bottom to top. I recommend that you also take a look at the Heterogeneity appendix in the v8 GWB Reactive Transport Modeling guide, especially section A.2. It looks like the main issue is that you need to constrain your mineral volumes by swapping the mineral in for the basis species it constrains in the Initial pane, not the Reactants pane. I hope that helps, Tom Meuzelaar RockWare, Inc.
  19. Dear GWB Users: We have released GWB 8.0.4 which addresses the following issues: Fix various issues in Gtplot and Xtplot, especially with respect to selecting units. Correct several problems with overlaying scatter data in Gtplot and Xtplot. New predefined variable "Time elapsed" in GSS to simplify adding scatter data to plot of kinetic simulations. Landscape printing of GSS data sheets. Assure data legend fits onto printouts of scatter plots User's Guides are hyperlinked Better support for landscape and color printing from GSS Improved "connect scatter points" feature in Gtplot and Xtplot Show per-kg units in GSS when calculating charge imbalance Fix a problem in multithreaded polythermal runs using Pitzer model Improve label positioning when copying special plots to clipboard Implement control scripts Provide two header files for user DLLs missing in 8.0 install Correct minor problem with report command Fix all known problems with the GUI Resolve all known issues with 8.0 through 8.0.3 Please contact me with any questions. Regards, Tom Meuzelaar RockWare, Inc.
  20. Dear Thomas: I'd be happy to take a quick look at your script- but since you use a proprietary database, I cannot reproduce your problem. Can you email me your database? Send to gwb@rockware.com - I will keep it in confidentiality. Regards, Tom Meuzelaar RockWare, Inc.
  21. Hi Herdis: I just realized my response was incomplete. To correctly compute alkalinity from HCO3- and CO3-- concentrations (molal), as the code computes it, you should use the following formula: Alk = 50.0445 * 1000 * (m_HCO3 + 2 m_CO3) * (kg_solv/kg_soln) I hope that helps, Tom Meuzelaar RockWare, Inc.
  22. Hi Stefan: In your first script, after the Pickup command, while you have a system that's essentially in equilibrium, it far from charge balanced. Both of your cation components are constrained by mineral masses, leaving you initially only with dissolved anion (SO4--). React needs to add significant cation component mass (K+ and Mg++) to achieve a solution that's in equilibrium with Arcanite and Schoenite. I think you'll find that your solution converges without trouble if you add charge balance to the SO4-- component. Your second script defines a solution that's initially so far out of equilibrium with the Schoenite mineral mass in the Basis, that it causes numerical difficulty. I hope that helps. Regards, Tom Meuzelaar RockWare, Inc.
  23. Hi Herdis: Indeed- I think we're finally on the same page. In version 7, there is no argument that will return alkalinity using the report command. In version 8, we've added hardness (total hardness), hardness_carb (carbonate hardness) and hardness_ncarb (non-carbonate hardness), all with units mg/kg soln as CaCO3. What you could do is report HCO3-, CO3-- and any other contributors to solution alkalinity, sum the respective columns, title it 'Carbonate alkalinity', and use this value for plotting your scatter data in Gtplot. I hope that helps, Tom Meuzelaar RockWare, Inc.
  24. Hi Thomas: The script I sent works just fine. How about attaching the React file you are trying to do this for? I'll send you back a modified, working script. Regards, Tom
×
×
  • Create New...