Jump to content
Geochemist's Workbench Support Forum

All Activity

This stream auto-updates     

  1. Earlier
  2. Hi Abdulaziz, Typically you would determine a dispersivity value by adding a non-reactive tracer and fitting your model to a breakthrough curve. A dispersivity of 3 cm in a 5 cm long column seems awfully big. I think it’s possible that the montmorillonite is dissolving, too. If your objective is to create a model that fits your pH and Ca++ measurements at the outlet, you might need to include montmorillonite in addition to the calcite in your model. Please note it may be difficult to fit such a model with only pH and Ca++ concentrations. Regards, Brian
  3. Hi Brian, thanks again for your feedback. I have fixed the specific surface area to be 50 cm2/g in the coming scripts. Also, I have changed the flow filed to potential drop miming the acidizing pressure drop instead of the specific discharge and set them into different intervals. in regard to the diffusion constant, you are right I changed the value of the diffusion constant ( related to porous medium ) from 9e-11 to 9e-6 and there is no much of a difference was noted. however, I have adjusted the mechanical dispersion and changed the dispersivity to 3 cm and I noted the ca++ curve was elongated a bit. please see Aziz Model_8 script. It matched CA++ concentration but not pH measurement. pH went from a value 7 to 3 and I count not control that. it's true during carbonate acidizing, the produced CO2 (bubbles ) will remain in solution. so I added CO2 fugacity in the initial pane and set a fixed fugacity path since the exchange is rapid in the Aziz Model_9 script. I am not sure if I need to add CO2 fugacity to the fluid pan as well. the result of Aziz Model_9 script is pretty much similar to Aziz Model_8 script. I have also set a kinetic gas transfer model in Aziz Model_12 script and the same result was observed as in Aziz Model_9 script. the limestone Carbonate is mainly composed of calcite (98.2%) and Montmorillonite (1.8 %). in summary, with and without adding CO2 fugacity effect, the below scripts are either matching Ca++ ion concentration ( Aziz Model_8 & Aziz Model_9 ) mainly when rate constant is around 5e-12 or pH measurement (Aziz Model_10 & 13) when the rate constant is around 5e-6 (where the lab pH measurement went from 7 to 6.4 ). I couldn’t match both Ca++ ion concentration and pH measurement in one script. Can you please advise how to !!! Thank you for your help and support. Best Regards, Abdulaziz Aziz Model_8.x1t Aziz Model_9.x1t Aziz Model_10.x1t Aziz Model_12.x1t Aziz Model_13.x1t
  4. Hi Abdulaziz, Of the kinetic parameters, I’d focus on adjusting the rate constant. I’m not sure you have any reason to change the specific surface area so much from your original value. There’s no point in adjusting the diffusion constant in your model. Perhaps you need to control the CO2 fugacity more tightly. If it’s possible that CO2 is in contact with the fluid in the column, you might need to set a fixed fugacity path, if exchange is rapid, or a kinetic gas transfer model if the exchange is slower. Or maybe there are other minerals that are present in small amounts yet are highly reactive? Regards, Brian
  5. Hello Jeonghwan, Here are a couple of suggestions to get you started. You might want to consider checking the equilibrium constants (Log Ks) in the existing database for the minerals of interest against the values used in the Garrels 1984 publication. To do so, use the TEdit app to open the database, in your case it would thermo.com.V8.R6+.tdat, and check the Log K values corresponding to each mineral. You can simply edit the thermo dataset in TEdit to match the values used in literature or make a duplicate to preserve the original values. After you have checked the equilibrium constants in the database, you might also want to try suppressing all minerals except for the ones in the targeted activity diagram so that less stable phases are considered. Hope this helps. Best, Jia Wang
  6. Hi, this is Jeonghwan Hwang. I want to make a phase diagram of illite/smectite/kaolinite stability diagrams that was adapted from Garrels, 1984 I made almost similar figure with it, but i could not make illite and montmorillonite in it... (Galles.ac2) I used other thermo data, V8R6+ (Galles-1.ac2), but it could not solve, neither. Are there any technical method to make it? Thank you Sincerely, Jeonghwan Hwang. Galles.ac2 Galles-1.ac2
  7. Hi Rachael, I have reset your license in our system. You can try activating with your activation code again. Hope this helps. Best, Jia Wang
  8. Hi, I got a student copy of geochemist workbench and then a week later, the IT department came and updated my computer from windows 7 to windows 10 and in the process i lost geochem workbench. The activation code no longer works to redownload it as it has already been used. How can i get hold if it again? Thanks, Rachael
  9. Hi Brian, thanks for your feedback. Sorry for the misundersatanding, the core daimater is 2.5 cm (Cylindrical Carbonate rock (97% Calcite (CaCo3), daimeter 2.5 cm ,length 5 cm, rock weight ( 58 g), Porosity ( 16% ) , Permeability (9 md) , Bulk volume ( 25 cm3)). So, I adjusted the porosity multiplier A to be 0.3 in order to see changes in permeability ( not constant )throughout the core flooding test. As you mentioned earlier, permeability is not much effected since I am using a specific discharge. I am still trying to match Ca++ lab result (120 mg/l) and pH measurements, where I find it very difficult to match. please see attached Aziz Model_2 script. Thank you for your help and support. Best Regards, Abdulaziz Aziz Model_2.x1t
  10. Hi Abdulaziz, You might want to check the cross-sectional area of your column. You said it has a radius of 2.5 cm, right? So, the area of the inlet face should be 2.5 * 2.5 * 3.14 = 19.625 cm2. If that’s the case, I’d put the delta y and delta z values at sqrt 19.625, or 4.43 cm. After that, you might recheck your flowrate and the number of pore volumes displaced to see if they make sense. You’ve set the log permeability to be constant by setting A (the porosity multiplier) to 0. Please note, however, that the permeability isn’t even used when you set specific discharge directly. It’s only used when you set a head drop or potential drop across the domain. There’s no guarantee that your mineral has the same specific surface area as the limestone in the study, but it’s probably a good estimate in the absence of your own measurements. As I mentioned previously, your fluid is traveling extremely quickly, so the effects of diffusion are negligible. Since you wish to find a value for the rate constant that fits your data, try adjusting that value so you can match your Ca++ and pH measurements. Regards, Brian
  11. 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
  12. Christophe Simbo

    Co-precipitation

    Thank you!
  13. 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
  14. 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.
  15. 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
  16. Frank Bok

    Influence of element's order in Basis?

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

    Script in Chemplugin

    Thanks Dan, this is very helpful. I appreciate your quick feedback.
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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!
  23. 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
  24. 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
  25. 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
  26. 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
  1. Load more activity
×