Jump to content
Geochemist's Workbench Support Forum

All Activity

This stream auto-updates     

  1. Yesterday
  2. Hi Brian , Thanks for your quick fruitful reply. I have checked and updated Aziz Model_1(file). My main goal is to estimate Damköhler and Péclet numbers for each acidic core flooding experiment, where the diffusion coefficient and reaction rate constant are needed to be estimated. Yes, the carbonate rock sample was saturated with fresh water for a day at maximum, then flooded with freshwater to measure the brine permeability using Darcy’s law, then flooded with diluted HCl ( pH =2). After the acidic flooding of HCl ( pH =2), pH value dropped from 7 to 6.4 through the whole experiment. Now, I hope my initial rock-fluid conditions are right. I have checked the specific discharge as advised in your previous comment ( flow rate (cm3/min) divided by cross-sectional area (cm2) , which is in my case : 7 (cm3/min ) / 5.22 (cm2) = 1.33 cm/min ~ 0.022 cm/s). also, I have adjusted the permeability to be 9 md , but it seems the permeability is constant along the whole interval time. In the reactants pane, calcite specific surface area is not provided in the database. I have looked in the literature (https://www.onepetro.org/conference-paper/SPE-21044-MS ) and found 0.49 m2/g is the specific surface for Indiana limestone using BET method. Shall I use this value for the calcite specific surface area or specific surface area should be estimated else way? I am trying to mimic the ICP Lab results of the produced Ca++ ions effluent (that (Ca++ ) concentration reaches a value of 120 mg/l in the first 5 minutes then stabilizes at 120 mg/l afterwards ) using Ca++ vs time xtplot. But it appears that the dissolution of Ca++ ions is quite immediate from the first 2 minutes reaches and stabilizes at a concentration of 300 mg/l. how can I delay or elongate the production of Ca++ ions linearly and what are the parameters that would allow me to adjust the curve of the produced Ca++ ion ( e.g. specific surface area , diffusion coefficient and reaction rate constant though both factors are competing in the dissolution process) . please see attached Aziz Model_1 script. Thank you for your help and support. Best Regards, Abdulaziz Aziz Model_1.x1t
  3. Last week
  4. Christophe Simbo

    Co-precipitation

    Thank you!
  5. Jia Wang

    Co-precipitation

    Dear Christophe, The green and the blue lines are from two separate X1t simulations. The blue lines in the plot of your screenshot is the result of Pulse.x1t from the mass transport section, where Pb++ is a non-reacting solute because the change in concentration is not associated with any chemical reactions. To attain the numerical data for this simulation, you can simply run the Pulse.x1t example without sorption. You can view the mass transport section (linked above) for more details. Then plot Pb++ (mmol/kg) on the y-axis and distant along the x-axis. Simply click Edit --> Copy as --> Spreadsheet and the paste the data in an excel spreadsheet. In the case of the green line, the simulation is accounting for sorption of Pb++. In this case, I think you’re referring to the sorbed particulate as the amount of Pb++ that is sorbed based on the distribution coefficient Kd from the database. Therefore, the particulate in solution would be the Pb++ remaining in the dissolved phase. Hope this helps. Best, Jia Wang
  6. Christophe Simbo

    Co-precipitation

    Thank you so much for your reply. In the same line, I would like to know the contrast between the non-reacting solute and the sorbed particulate and the particulate in solution(the latter two are understandable) .As in the below figures(Sorbing Solutes section), It is said that the non-reacting curve is in blue. I was trying to retrieve data from the non-reacting component of the solutes but I couldn't find any.
  7. Hi Abdulaziz, In a reactive transport model, it's best not to constrain the amount of a mineral using absolute units, like g or cm3, because changing your discretization will change the system. Relative units are much better. Since calcite is the only mineral, and you know the porosity (.16), set the mineral abundance to .84 vol. fract. You'll definitely need a lot more than three nodes to get an accurate solution. Start with 20 or 50, perhaps, to get a basic understanding of your system without costing too much in terms of computational effort, then increase the resolution to 100 or several hundred, perhaps. For a discussion, please see the Numerical Dispersion lesson in the GWB Online Academy. It doesn't sounds like the limestone was in contact with the initial dilute fluid for very long, so I'm not sure it's appropriate to assume the initial pore fluid is in equilibrium with calcite. In other words, I wouldn't swap calcite into the basis on the Initial pane. Your Aziz model.x1t is ok in this regard, but I'd put smaller values than .1 mg/kg for the various solutes, unless those values are actually known. I would add Calcite as a reactant, specifying it's abundance as described above. I think that takes care of your questions. You should not set a value for "reactants times". Looking at your inlet fluid, I would set smaller, but nonzero, values for the Ca++ and HCO3- in solution. As for the Cl- component, I think it's correct to set it as the charge balancing ion, but the value you set doesn't actually matter because the program adjusts the Cl- component to balance out the other ions in solution. The "as HCl" setting is unnecessary here. Finally, I think you'll want to double-check your width and height settings to ensure you have the same cross-section area as your cylindrical column. You also might want to double-check your flow rate. Regards, Brian
  8. Frank Bok

    Influence of element's order in Basis?

    Hi Brian, thank you very much for your comment! 😀 Best regards, Frank
  9. JohanFourie

    Script in Chemplugin

    Thanks Dan, this is very helpful. I appreciate your quick feedback.
  10. Jia Wang

    Co-precipitation

    Dear Christophe, The maximum sorbed capacity for each metal is calculated outside of React. From Gtplot or the text output file of the simulation, you can see that there are 0.89 mmoles of Fe(OH)3ppd precipitated. Then in the surface dataset (FeOH+.sdat) you can find the sorbing density, which is 0.005 mol of strong sites and 0.2 mol of weak sites per mole of Fe(OH)3ppd. Then you look at each metal and see if they sorb onto weak, strong, or weak and strong sites. To calculate the maximum capacity for each metal, assume that there is only one metal sorbing to the mineral surface at a time. Just multiply the mineral mass by the site density of each appropriate site and convert to mg/kg. For As(OH)4-, it's 0.00089 mol/kg * .2 mol sites/mol * 142.951 g/mol * 1000 g/kg = 25.4 mg/kg. For metals that include strong sites, include those as well. The ‘in solution’ component concentrations are reported directly by React under ‘Components in fluid’. You can select to plot ‘Components in fluid’ vs. pH in the XY Plot Configuration dialog in Gtplot and export the numerical data using the method described in my previous response. Alternatively, you can also open the text output file and look for the concentrations of the desired components at each time step listed under ‘Original basis’ text block in the column ‘in fluid’. Hope this helps. Best, Jia Wang
  11. Christophe Simbo

    Co-precipitation

    Thank you for your reply Dear Wang. If I have asked that question it's because I did as you described up here based on the graph pH versus sorbed fraction.May be it's not the appropriate XY plot. If so, could you enlighten me what XY plot that can yield the maximum sorbed and in solution components of the solutes . Thank you
  12. Hi Brain , Thanks for your feedback. I have thoroughly read GWB documentations (Essentials, React and x1t ) and forum questions, but I must be missing something. I am trying to reproduce acidic core flooding experiment of fresh water saturated carbonate rock using x1t to match the produced Ca++ ions (ICP ) and estimate diffusion coefficient and reaction rate constant. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O Here are the summary info of the fluid -rock system and the core flooding experiments : Cylindrical Carbonate rock (97% Calcite (CaCo3), radius 2.5 cm ,length 5 cm, rock weight ( 58 g), Porosity ( 16% ) , Permeability (9 md) , Bulk volume ( 25 cm3) Carbonate rock was saturated and flooded with Fresh Water Then saturated carbonate rock was flooded with HCl as intel fluid ( pH=2) at injection rate ( 7 cm3/min) till wormhole channel was formed and pressure drop fall to near zero value. I have tried to mimic the fluid-rock properties into the model, but I am not sure. My concerns are the following : How can I add the rock mineral ( carbonate calcite (CaCo3) ) and at what units (97 vol% or 58g , 58g/kg ) to the fluid system?I tried 2 methods. Method 1 (Aziz Model file) : I added calcite in the kinetic reactant pane (meaning calcite is not in equilibrium with the fresh water ) , but I couldn’t add calcite in 58 g unit as its weighted (97% of core sample weight ) which will be reflected in calcite specific surface area . Method 2 (Calcite swapped with Ca++ file) : I swapped calcite with Ca++ ( stating equilibrium condition with fluid) in the initial fluid pane plus adding the calcite in the kinetic reactant pane, but calcite concertation appeared to start producing from 350 mg/l instead from 0 mg/l . Do I need to equilibrate the fluid and the rock in the initial pane ? I did try Calcite mineral swapped with Ca++ in the fluid pane with React script ( Ca++_3 file). Sometimes I get this Error: -- Error: Porosity of node 0 is too small: -0.269011 . I can’t change much in the domain pane that semi-represents cylindrical core sample ( dimensions ) . Any help with setting this up would be much appreciated. Please see attached files. Regards Abdulaziz Ca++_3.rea Aziz Model.x1t Calcite swapped with Ca++.x1t
  13. Earlier
  14. Jia Wang

    Co-precipitation

    Dear Christophe, In the React app, the results file output a dataset in tabular form. You can scroll down and see the concentrations of various basis species sorbed and in fluid and more information(e.g. mineral saturation state, reactants, gasses, etc..) at each reaction step. However, another way to retrieve numerical data is to use Gtplot and copy and paste the data onto an excel spreadsheet. You can select ‘Plot Results’ in the Results pane and Gtplot will open up. Double-click in the plot to open the XY Plot Configuration dialog. Select the desired X and Y axis parameters and click apply to modify the plot. For example, you can plot one or many components in fluid as the Y-Axis parameter and Rxn progress on the X-Axis. To obtain numerical data for this data, you can click Edit --> Copy as --> Spreadsheet and the paste the data in an excel spreadsheet. For more detailed instructions, you can refer to the ‘How do I retrieve numerical data from my plots?’ on the GWB Tutorials webpage and section 6.7 in the GWB Reaction Modeling Guide. The number of moles regarding strongly and weakly binding surfaces refers to the sorption site density available on the sorbing mineral. In this case, for every mole of ferric hydroxide precipitated, there is 0.005 moles of strongly binding surface sites and 0.2 moles of weakly binding surface sites available. Hope this helps. Best, Jia Wang
  15. OK, I have tried the other route that I put all files in the installation file of GWB and re-do everything. It now works. Thanks, Dan!
  16. Hi Dan, Thanks. You are right that I was generating 32 bit DLL since I was using "Developer Command Prompt" However, I have just tried to re-compile the DLL using X64 Native Tools Command Prompt for VS 2019. After generating DLL, I also used command 'dumpbin' to verify it is is 64 bit DLL. As I load FeRB.x1t into x1t, the x1t program crashed (window disappeared) without giving any error information. Need help on this. FYI, my Windows OS is x64. Tao
  17. dan saalfeld

    Script in Chemplugin

    Hi Johan, 1) The surface data one happens to work because \P \C \G and \F are not special escape sequences in Python. However in the thermo database path you have a \t which is a special escape sequence that represents a "tab" character. Here is one list of special escape sequences https://docs.python.org/2.0/ref/strings.html . However it is usually easiest if you are using backslashes to just always escape them if you want a literal backslash character in the string - that way you don't need to remember which letters are special. Also some versions of Python will throw an error if you use an invalid escape sequence. You may also use forward slashes when specifying thermo and surface data paths (linux style paths) for ChemPlugin e.g. 'data = "C:/Program Files/Gwb/Gtdata/thermo_wateq4f.tdat" verify' 2) There are a couple different issues I see in the script, but still mostly Python string related. For your rate law instead of having 'rate = (expression) RETURN rate' you can instead just have it return the expression directly without setting that temporary variable. e.g. 'RETURN (expression)'. Alternatively you could also add newline "\n" before the RETURN rate part since that should be on a separate line. a) return value directly: "kinetic Calcite .1 volume% rate_law = script 'RETURN (1.49e-02*EXP(-29000/(8.3144598*TK))*activity(\'H+\')^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity(\'H2CO3\')^0.75 + 2.20e-07*EXP(-52200/(8.3144598*TK))*activity(\'H2O\')^0.75) * surface * (1 - QoverK) RETURN rate' pre-exp = ??? act_eng = ??? surface = 200", b) properly separate the lines of script with newline \n: "kinetic Calcite .1 volume% rate_law = script 'rate = (1.49e-02*EXP(-29000/(8.3144598*TK))*activity(\'H+\')^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity(\'H2CO3\')^0.75 + 2.20e-07*EXP(-52200/(8.3144598*TK))*activity(\'H2O\')^0.75) * surface * (1 - QoverK) \nRETURN rate' pre-exp = ??? act_eng = ??? surface = 200", To get a better feel for Python strings I would recommend opening an interactive Python session and just try things out interactively with the print command. Here are the dataset examples: >>> print('surface_data = "C:\Program Files\ChemPlugin\Gtdata\FeOH.sdat"') surface_data = "C:\Program Files\ChemPlugin\Gtdata\FeOH.sdat" >>> print('data = "C:\Program Files\Gwb\Gtdata\thermo_wateq4f.tdat" verify') data = "C:\Program Files\Gwb\Gtdata hermo_wateq4f.tdat" verify >>> print('data = "C:\\Program Files\\Gwb\\Gtdata\\thermo_wateq4f.tdat" verify') data = "C:\Program Files\Gwb\Gtdata\thermo_wateq4f.tdat" verify One last thing that may also help with Python strings that contain nested single and double quotes is that instead of using one single or double quote to mark string start/end Python also allows you to use three single or double quotes to start and end a string which allows you to then use the same type of quote inside the string without escaping it. >>> print("""can now freely use unescaped double quotes like these " " inside the string""") can now freely use unescaped double quotes like these " " inside the string >>> print('''can now freely use unescaped single quotes like these ' ' inside the string''') can now freely use unescaped single quotes like these ' ' inside the string Hope this helps, Dan
  18. Hi Tao, It looks like the DLL was built correctly, but it is a 32-bit DLL. As such it will only work with the 32-bit version of GWB. I am guessing you are running the 64-bit version of GWB and that is why it is unable to load it. To get it to work please either install the 32-bit version of GWB or build the DLL as a 64-bit DLL. If you are using a recent version of Microsoft Visual Studio to build the DLL you should be able to just change the platform dropdown from "x86" to "x64" to change the DLL to a 64-bit build. Instead of : You want : Hope this helps, Dan
  19. JohanFourie

    Script in Chemplugin

    Hi Brian I have not come right with this yet and would appreciate if you can help. To make the problem more tangible I have edited the chemplugin example: Flowthrough1.py and attached it here. 1) The thermo database does not seem to need the escape character. In the attached python script I can run the 'surface data' without any escape character: 'surface_data = "C:\Program Files\ChemPlugin\Gtdata\FeOH.sdat"', However, if you deactivate it with # and activate the wateqdatabase (for instance), with or without the escape character it does not work: 'data = "C:\Program Files\Gwb\Gtdata\thermo_wateq4f.tdat" verify', or 'data = "C:\\Program Files\\Gwb\\Gtdata\\thermo_wateq4f.tdat" verify', I have tested it by changing a mineral name in the database i.e. calcite --> calcite2, however chemplugin couldn't read the database. 2) Then I also cant get the script to run. I have tried different ways but cant get it to run. I dont know where is the problem. It is not maybe at the "….RETURN rate" part? # "kinetic Calcite .1 volume% rate_law = script 'rate = (1.49e-02*EXP(-29000/(8.3144598*TK))*activity(\'H+\')^0.75 + 1.00e-02*EXP(-34800/(8.3144598*TK))*activity(\'H2CO3\')^0.75 + 2.20e-07*EXP(-52200/(8.3144598*TK))*activity(\'H2O\')^0.75) * surface * (1 - QoverK) RETURN rate' pre-exp = ??? act_eng = ??? surface = 200", My problem is that my real model have temperatures up to 220 C and I need to include to higher kinetic rate in some way or other. I have come right with the sliding temperature question I had in the other post and now my model can run at different temperature scenarios. I think chemplugin works great as it surely gives you a lot of flexibility to work with. Regards Johan FlowThrough_JF2.py
  20. Christophe Simbo

    Formation Damage

    So sorry I just find out that it was a problem of units in X axis.
  21. Jia Wang

    Initial System_SpecE8 versus React

    Hi Christophe, You can most certainly change the species for charge balancing. To change to a different species, add the species into the basis pane and in the drop arrow next to the units and select ‘Balance species’. Typically, the balance species chosen has high abundance and low uncertainty. For example, React is setup to use Cl- as the default charge balancing ion since most Cl- is usually abundant and can be calculated from charge balance base on other species concentrations measured in chemical analyses. Hope this helps, Jia Wang
  22. Christophe Simbo

    Formation Damage

    So sorry to ask one more question on the "waste injection well" topic..I went through all steps but on graph Volume=f(dolomite reacted), the dolomite function cannot be plotted. Can some one guide me on this issue(see attached image)?
  23. Hi, I am new to GWB. Our lab has GWB version 9.09 profession. I am simply trying to reproduce results from Bethke et al. (2018) "Origin of microbiological zoning in groundwater flows". All codes were provided by Bethke et al in their SI file: https://www.geosociety.org/datarepository/2008/2008185.pdf I could successfully ran and reproduced results using SRB.x1t. As to FeRB.x1t, I could compile FeRB.cpp and link it with x1t.lib to generate FeRB.dll. However, I kept getting error information " -- Error: Can't open rate-law library: FeRB.dll" when I hit 'go' to run FeRB.x1t. I have running GWB 9.09 on windows 10. I am the administrator account of my computer. What might be the reason? Thanks. P.S., All related files for FeRB.x1t are attached. Tao FeRB.x1t AquiferBaseModel.x1t FeRB.cpp FeRB.dll thermo-aquifer.dat x1t.lib
  24. Christophe Simbo

    Co-precipitation

    In acide drainage and buffering in Task3 "Co-precipitation", I cannot understand where some figures were found and to make my question more clearer, I attach the part that difficult to understand on there. Where can I find the sorbed and in solution quantities of species? I tried to click on "view results" I did not find them nor are they found in graphs. Does 0.005 moles of the strongly binding surface/mole of precipitate refer to As(OH-)4 as 0.2/ 25.4 = 0.007 and that of 0.2(weakly binding surface) refer to Na+ and Ca2+? Thank you
  25. In GWB Reaction Modeling (page 19), Could you explain how to choose or select one ion to set a charge balancing. An example to this case has been applied on the topic "Acid drainage and buffering", and Ca2+ as been chosen for "Balance species". Can other ions be chosen instead of Ca2+? Thank you
  26. Jia Wang

    Something wrong with my GSS

    Dear Koitoliver, In the screenshot you provided, the analyte HCO3- is already added to the spreadsheet and therefore you cannot add it again when you select “+ analyte”. The hardness of the fluid sample is a result of calculation; it cannot be used as a constraint. Only the HCO3- concentration (typically the HCO3- component, but you can alternatively constrain the free HCO3- ion) or the carbonate alkalinity can be used as constraints. I quickly did a charge balance calculation with a few of your samples and I am seeing slightly different results from your calculations. The charge imbalance error from my quick calculation did not match the value in your row 1 sample calculation. However, my calculations for the row 19 and row 20 samples did match with your charge imbalance error result. This leads me to believe something is missing (such as a HCO3- constraint) and you haven’t recalculated your analytes for the first group of samples after changing the spreadsheet. To recalculate right click on the charge imbalance column header and select ‘Recalculate Analyte’. Again, is it possible you had HCO3- values entered previously on your old spreadsheet? Maybe the values were accidentally deleted? Did you switch from a different thermo dataset from when you reopened the spreadsheet? The thermo_phreeqc.tdat dataset uses carbonate (CO3--) as a basis species instead of bicarbonate (HCO3-). If you did not allow the substitution of CO3-- for HCO3- when you switched thermo datasets then it will delete the HCO3- component’s column. That could also explain why you can’t find HCO3- in the list of basis entries. With regards to pH, the new GSS spreadsheet defaults to include pH as one of the analytes when a new spreadsheet is created. If it’s already in your spreadsheet, you won’t be able to add it again. Perhaps you hid the analyte? Under the Data menu, you have the option to hide and show analytes or samples. Please try check your spreadsheet according to the suggestions above. If you need further assistance, please attach your script. Best, Jia Wang Aqueous Solutions LLC
  27. Brian Farrell

    ChemPlugin Time Marching Loop

    Hi Erik, If you were writing a simple model that considered only advective transport of a non-reacting solute, you might figure the limiting time step from only the Courant condition. And if the velocity didn’t change with time, you could hard-code that value into your time marching loop. When you construct a reactive transport model that accounts for a variety of other processes, though, such as diffusion, heat transfer, and kinetic reactions, you need to account for the stability of the solution to each of their governing equations. ChemPlugin’s ReportTimeStep() member function in fact does this. The X1t and X2t programs use similar logic, which is described in section 2.20 Time marching in the GWB Reactive Transport Modeling Guide. In your program, it might be ok to set your own time step without querying ChemPlugin, as long as it’s smaller than the largest possible time step that ChemPlugin would allow. But really, you should always have ChemPlugin instances report the stable time step. You can compare with your own desired time step, if you’d like, then use the lowest of the values. Based on a previous conversation, it sounds like you might be worried that kinetic reactions are making the simulation take too long. Simply ignoring the reported stability limits would be a bad idea. Instead, you should consider whether you really need so many kinetic reactions, especially really, really fast kinetic reactions. Use kinetics for the more slowly reacting minerals, and equilibrium for the others. Regards, Brian Farrell Aqueous Solutions
  28. I have a question about time stepping in ChemPlugin. The example scripts provided on the Chemplugin website use the "c.reportTimeStep" command but my script contains time-dependent conditional statements within a WHILE loop. In order to have better control over the time step, "deltat" is set to a fixed integer. As I understand it, the c.reportTimeStep command will use time step criteria established for an instance (i.e. "delxi," "step increase," etc..) to determine an appropriate step. However, based on the explanation of the courant number in the user guide: "The Courant condition requires that a time step not exceed the time required to displace all the fluid from a ChemPlugin instance" Following this rule as a guide, is it appropriate to define a time step as a fixed integer (i.e. 4000 seconds)? while True: deltat = 4000 if current_time >= acid_start and current_time < close_time gw_link.FlowRate(0, "m3/s") gw_link.Transmissivity(0, "m3/s") acid_link.FlowRate(discharge, "m3/s") acid_link.Transmissivity(trans, "m3/s") for c in cp: deltat = (deltat) for c in cp: if c.AdvanceTimeStep(deltat):end_run(0) for c in cp: if c.AdvanceTransport():end_run(-1) for c in cp: if c.AdvanceChemical():end_run(-1) Regards, Erik
  1. Load more activity
×