Jump to content
Geochemist's Workbench Support Forum

All Activity

This stream auto-updates     

  1. Yesterday
  2. elg0086

    ChemPlugin Setting Units

    Brain, Thank you for the response. I am currently using the first approach you mention, but your second suggestion is also intriguing and will prove useful in the future. Thank you! Regards, Erik
  3. Brian Farrell

    ChemPlugin Setting Units

    Hi Erik, Ok, thanks for the additional information. A very simple strategy for that intermediate instance would be to fix pH and charge balance on SO4--. Assuming reaction within the domain increases pH, so that you’re always adding sulfuric acid to the effluent, the program will add enough H+ to achieve the desired pH, along with SO4-- to balance it out. If reaction along the domain were to decrease pH, however, the program would remove H+ and SO4-- from the intermediate instance to maintain the pH. In that case, the configuration is not realistic. I’m assuming here that you’re monitoring pH in the real world as a proxy for sulfuric acid concentration, since that’s an effectively instantaneous measurement, but that may not be the case. If that’s not quite right, a more complex solution might be to do something like the second task in the Time Marching Loops lesson in the ChemPlugin Modeling with Python Academy. In that example, the client titrates NaOH into a fluid and queries ChemPlugin for the pH after each small addition. It stops the titration when the desired pH is achieved. Perhaps you could titrate sulfuric acid into the fluid and query ChemPlugin for whatever you need, then once you reach that target, send that fluid to the inlet of your domain. Hope this helps, Brian
  4. elg0086

    ChemPlugin Setting Units

    Brian, Thank you for the response and I apologize for any ambiguity. The solution leaving the last node of the domain is transformed prior to looping back to the first instance. Within this loop sulfuric acid is added to achieve a target concentration of 10 g/l (sulfuric acid). However, the mass required to achieve this concentration is an unknown and controlled by reactions within the domain. Currently, I have a separate instance linked between the last node and first node to allow for this transformation. However, I have not quite figured out the best method to determine the difference between the final node and target chemistry (H+ and SO4--), and then configure the "transformation" instance to reflect this difference. Regards, Erik
  5. Last week
  6. Brian Farrell

    ChemPlugin Setting Units

    Hi Erik, Can you clarify whether you want the fluid that flows out of the last node to loop directly into the first node, or whether it should be transformed in some way? If it’s being transformed, can you please elaborate on how this is done? What’s the process? Thanks, Brian
  7. elg0086

    ChemPlugin Setting Units

    Brian, I have a question which builds on the topic found here: https://forum.gwb.com/index.php?/topic/2483-chemplugin-pore-volume-pv-and-extendrun/&tab=comments#comment-6328 Part of my model uses the output solution from the last instance and "loops" it back to the first instance. I was hoping to adjust the pH and sulfate entering the first node based on the output concentrations from the last node. However, calling the cp.Config command within a time marching loop is not possible (I expected this would not be possible). I would like to confirm that the "cp.Config" command will not run within a time marching loop. Another option I explored was running my model in "stages" using the "extend run" command. According to the aforementioned forum topic, kinetic minerals present within an instance will reset after calling the "extend run" command. Currently I have one kinetic mineral but will possibly be adding up to eight additional minerals. Furthermore, sorption and precipitation will be enabled, presenting a daunting task to reset each instance with concentrations and mass from the previous day. Currently, I have a work-around model involving an instance with a sliding pH that might achieve 90% of what I am attempting to simulate. In summary, to what extent can the chemistry of a system be dynamically altered in a time marching loop? In other words, is it possible to actively read and write input/output chemistry during a simulation? Thank you for your time! Regards, Erik
  8. Hi Melika, Thanks for your reply. when I submitted my case in the forum, an error message appeared and I ended up submitting the question 4 times without knowing it was posted at the first attempt. sorry about that. I used X1t app to simulate the acidized core flooding experiments and match the laboratory ICP result. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O my concerns are the followings : How precisely can I put the constraints on the initial system for the rock sample and the injected acid solution? I am a little bit confused about the input units ( mg/kg, free kg, mmol/kg, ..etc). I am only aware of the limestone rock sample weight ( 50 g) , porosity (22%) and the concentration of the injected acid (pH, wt% ). how would I put the value of the followings with their units: H2O .... free kg H+ ..... 4 (pH) .. for example ! Cl- ... Ca++ ( mineral or ... ) ... HCO3- .... do I need to equilibrate the fluid and the rock in the initial pane in constraints on the initial system, and if so, how would I equilibrate them? injection rate was 10 cm3/min. how would I mimic the laboratory injection rate within the X1t the discharge ( injection rate) unit (cm/s, cm3/cm2/s, ..etc)? The laboratory domain was a cylindrical core sample (2.5 cm in diameter ⨉ 5 cm long) , how would I simulate that domain in the model, I used a spherical domain with r1: 1.25 cm, r2: 1.26 cm and nodes (Nx) = 5, please advise the appropriate way. I have attached 2 different files. please advise which one of them i should be simulating my lab work with. Carbonate acdizing.x1t Aziz HCl.x1t
  9. Earlier
  10. Hi Abdulaziz, The main purpose of The Geochemist’s Workbench® software package is geochemical reaction modeling and reactive transport modeling using parameters like rate constants and diffusion constants. You may estimate their optimum values by trial and error, though. For example, the Microbial Populations lesson on the GWB Online Academy describes how to adjust the rate constant to visually match experimental data. You can set most basis entries as bulk or free constraints. For a bulk constraint, the value you set refers to the entire thermodynamic component, whereas for a free constraint, it refers to the particular species only. The Ca++ component, for example, might include the Ca++ species, as well as Ca(OH)2(aq), CaHCO3(aq), etc. If you set 10 “mg/kg” Ca++, the concentration is for the sum of those species. If you set 10 “free mg/kg” Ca++, though, the concentration refers only to the individual Ca++ species. If you are looking at the reaction between the fluid, and the rock, as the fluid traverse through it, you don't probably need to equilibrate the fluid and rock. For more information, please read section 3.10 in the GWB Reaction Modeling Guide. In a spherical domain, the length of the domain is r2-r1. Please read section 3.1 in the GWB Reactive Transport Modeling Guide. In future, please don't post your question in different topics. If you need further help, please attach your script. Thanks, Melika Sharifi Aqueous Solutions LLC
  11. elg0086

    Results command ChemPlugin

    Melika, Looking at the output text now, it makes sense to spell out the element since it is printed as such. Most of the literature provides examples of aqueous solutions (H+, Fe++) and I was just using Cu and Fe as the element name. Thank you for clarifying the syntax. -Erik
  12. Melika Sharifi

    Results command ChemPlugin

    Hi Erik, You'll have to type: my_result = (cp[nx - 1].Report("concentration elements fluid Cupper", "moles")). Bests, Melika Sharifi Aqueous Solutions LLC
  13. Hi, I am attempting to retrieve results in ChemPlugin using the command my_result = (cp[nx - 1].Report1("concentration elements fluid", "moles")) Is there a way to point to a specific element (scaler value) using a variation of this command line? i.e. my_result = (cp[nx - 1].Report1("concentration elements fluid Cu", "moles")) Thanks. Regards, Erik
  14. Melika Sharifi

    can't retrieve H+ molal in python script

    Hi Helge, I'm not sure which dataset you are using, so I am not able to give you an exact response. It looks like in your script, you have not decoupled Tc(VII) from Tc(IV). If you use "aqueous" in your command, it will give you the free concentration of that specific species in solution. Consider thermo.tdat dataset when Fe(II) is not decoupled from Fe(III), myGWB.results('concentration aqueous Fe++', 'molal')[0], will give you the concentration of Fe++ aqueous species, and myGWB.results('concentration aqueous Fe+++', 'molal')[0] will give you the concentration of Fe+++ aqueous species. While myGWB.results('concentration Fe++', 'molal')[0], will give you the total concentration of component Fe(II), and myGWB.results('concentration Fe+++', 'molal')[0] will give you the total concentration of component Fe(III) (i.e. all species with Fe(III) such as Fe(OH)3, Fe+++, Fe2O3, etc). Hope this helps. Bests, Melika Sharifi Aqueous Solutions LLC
  15. Taken the case I look at the transition of Tc(+VII) to Tc(+IV) by inreasing pH: is there any means to retrieve the proportion of the two different oxidation states of Tc in solution? Helge
  16. Melika Sharifi

    can't retrieve H+ molal in python script

    Hi Helge, It will give you the total concentration of Tc in your system (all oxidation states), unless you have decoupled Tc(IV) from other states. Bests, Melika
  17. Means: if I want to retrieve the total molality of Tc(+IV) in solution, and TcO(OH)2 is the secondary master for the formation of all Tc(+IV)-species, I use myGWB.results('concentration TcO(OH)2', 'molal')[0] ? Helge
  18. Melika Sharifi

    can't retrieve H+ molal in python script

    Hi Helge, Concentration H+, molal will give you the concentration of component H+ which refers to the sum of all species with H+, such as HSO4-, OH-, Mg(OH)3, etc. If you want to get the concentration of a particular species, such as H+ which is called free H+, you will need to add "aqueous" to your command (i.e. ('concentration aqueous H+', 'molal'). Hope this helps. Bests, Melika Sharifi Aqueous Solutions LLC
  19. Hello everybody, I can't retrieve the molal H+ concentration. With ####### species = myGWB.results("species") conc = myGWB.results("concentration aqueous", "molal") print "\nThere are" , len(species) , "aqueous species.\n" for i in range(len(species)): print "%-4s = %10.4g mol/kg" % (species, conc) print "concentration H+ = ", myGWB.results('concentration H+', 'molal')[0] ####### I get Y:\Rechnungen\gwb>0001_test.py There are 9 aqueous species. H+ = 3.027e-07 mol/kg HSO4- = 3.231e-06 mol/kg K+ = 0.7233 mol/kg KMg(SO4)+ = 6.463e-05 mol/kg Mg(OH)+ = 3.447e-06 mol/kg Mg++ = 3.114 mol/kg Mg3(OH)4++ = 8.826e-15 mol/kg OH- = 8.746e-08 mol/kg SO4-- = 3.475 mol/kg concentration H+ = -3.47366172108e-10 It seems that with myGWB.results('concentration H+', 'molal')[0] I retrieve something else (charge balance?) but not the H+ molality. Of course I could work around the problem and get the H+ molality from the aqueous species list, but this wouldn't be elegant. Helge
  20. Greetings all, I conducted HCl ( acid ) core flooding experiments at room temperature on cylindrical limestone rock samples (2.5 cm in diameter ⨉ 5 cm long) which are mainly composed of ( ~ 97 % calcite from XRD analysis ) and the produced water (effluent) was chemically analyzed for cations using Inductively Coupled Plasma (ICP) spectroscopy to assess the dissolution reaction phenomena. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O My aim is to get the dissolution reaction rate constant and the diffusion coefficient for the conducted experiment by matching laboratory ICP result (Ca++) with the model (X1t). I have read transport reactive and other documentation but I am missing something. I used X1t app to simulate the acidized core flooding experiments and match the laboratory ICP result. my concerns are the followings : How precisely can I put the constraints on the initial system for the rock sample and the injected acid solution? I am a little bit confused about the input units ( mg/kg, free kg, mmol/kg, ..etc). I am only aware of the limestone rock sample weight ( 50 g) , porosity (22%) and the concentration of the injected acid (pH, wt% ). how would I put the value of the followings with their units: H2O .... free kg H+ ..... 4 (pH) .. for example ! Cl- ... Ca++ ( mineral ) ... HCO3- .... do I need to equilibrate the fluid and the rock in the initial pane in constraints on the initial system, and if so, how would I equilibrate them? injection rate was 10 cm3/min. how would I mimic the laboratory injection rate within the X1t the discharge ( injection rate) unit (cm/s, cm3/cm2/s, ..etc)? The laboratory domain was a cylindrical core sample (2.5 cm in diameter ⨉ 5 cm long) , how would I simulate that domain in the model, I used a spherical domain with r1: 1.25 cm, r2: 1.26 cm and nodes (Nx) = 5, please advise the appropriate way. Your support in this matter is highly appreciated. regards Abdulaziz
  21. Greetings all, I conducted HCl ( acid ) core flooding experiments at room temperature on cylindrical limestone rock samples (2.5 cm in diameter ⨉ 5 cm long) which are mainly composed of ( ~ 97 % calcite from XRD analysis ) and the produced water (effluent) was chemically analyzed for cations using Inductively Coupled Plasma (ICP) spectroscopy to assess the dissolution reaction phenomena. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O My aim is to get the dissolution reaction rate constant and the diffusion coefficient for the conducted experiment by matching laboratory ICP result (Ca++) with the model (X1t). I have read transport reactive and other documentation but I am missing something. I used X1t app to simulate the acidized core flooding experiments and match the laboratory ICP result. my concerns are the followings : How precisely can I put the constraints on the initial system for the rock sample and the injected acid solution? I am a little bit confused about the input units ( mg/kg, free kg, mmol/kg, ..etc). I am only aware of the limestone rock sample weight ( 50 g) , porosity (22%) and the concentration of the injected acid (pH, wt% ). how would I put the value of the followings with their units: H2O .... free kg H+ ..... 4 (pH) .. for example ! Cl- ... Ca++ ( mineral ) ... HCO3- .... do I need to equilibrate the fluid and the rock in the initial pane in constraints on the initial system, and if so, how would I equilibrate them? injection rate was 10 cm3/min. how would I mimic the laboratory injection rate within the X1t the discharge ( injection rate) unit (cm/s, cm3/cm2/s, ..etc)? The laboratory domain was a cylindrical core sample (2.5 cm in diameter ⨉ 5 cm long) , how would I simulate that domain in the model, I used a spherical domain with r1: 1.25 cm, r2: 1.26 cm and nodes (Nx) = 5, please advise the appropriate way. Your support in this matter is highly appreciated. regards Abdulaziz Carbonate acdizing.x1t
  22. Greetings all, I conducted HCl ( acid ) core flooding experiments at room temperature on cylindrical limestone rock samples (2.5 cm in diameter ⨉ 5 cm long) which are mainly composed of ( ~ 97 % calcite from XRD analysis ) and the produced water (effluent) was chemically analyzed for cations using Inductively Coupled Plasma (ICP) spectroscopy to assess the dissolution reaction phenomena. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O My aim is to get the dissolution reaction rate constant and the diffusion coefficient for the conducted experiment by matching laboratory ICP result (Ca++) with the model (X1t). I have read transport reactive and other documentation but I am missing something. I used X1t app to simulate the acidized core flooding experiments and match the laboratory ICP result. my concerns are the followings : How precisely can I put the constraints on the initial system for the rock sample and the injected acid solution? I am a little bit confused about the input units ( mg/kg, free kg, mmol/kg, ..etc). I am only aware of the limestone rock sample weight ( 50 g) , porosity (22%) and the concentration of the injected acid (pH, wt% ). how would I put the value of the followings with their units: H2O .... free kg H+ ..... 4 (pH) .. for example ! Cl- ... Ca++ ( mineral ) ... HCO3- .... do I need to equilibrate the fluid and the rock in the initial pane in constraints on the initial system, and if so, how would I equilibrate them? injection rate was 10 cm3/min. how would I mimic the laboratory injection rate within the X1t the discharge ( injection rate) unit (cm/s, cm3/cm2/s, ..etc)? The laboratory domain was a cylindrical core sample (2.5 cm in diameter ⨉ 5 cm long) , how would I simulate that domain in the model, I used a spherical domain with r1: 1.25 cm, r2: 1.26 cm and nodes (Nx) = 5, please advise the appropriate way. Your support in this matter is highly appreciated. regards Abdulaziz
  23. Greetings all, I conducted HCl ( acid ) core flooding experiments at room temperature on cylindrical limestone rock samples (2.5 cm in diameter ⨉ 5 cm long) which are mainly composed of ( ~ 97 % calcite from XRD analysis ) and the produced water (effluent) was chemically analyzed for cations using Inductively Coupled Plasma (ICP) spectroscopy to assess the dissolution reaction phenomena. the chemical equation is as follows : CaCO3 + 2HCl ---> CaCl2 + CO2 + H2O My aim is to get the dissolution reaction rate constant and the diffusion coefficient for the conducted experiment by matching laboratory ICP result (Ca++) with the model (X1t). I have read transport reactive and other documentation but I am missing something. I used X1t app to simulate the acidized core flooding experiments and match the laboratory ICP result. my concerns are the followings : How precisely can I put the constraints on the initial system for the rock sample and the injected acid solution? I am a little bit confused about the input units ( mg/kg, free kg, mmol/kg, ..etc). I am only aware of the limestone rock sample weight ( 50 g) , porosity (22%) and the concentration of the injected acid (pH, wt% ). how would I put the value of the followings with their units: H2O .... free kg H+ ..... 4 (pH) .. for example ! Cl- ... Ca++ ( mineral ) ... HCO3- .... do I need to equilibrate the fluid and the rock in the initial pane in constraints on the initial system, and if so, how would I equilibrate them? injection rate was 10 cm3/min. how would I mimic the laboratory injection rate within the X1t the discharge ( injection rate) unit (cm/s, cm3/cm2/s, ..etc)? The laboratory domain was a cylindrical core sample (2.5 cm in diameter ⨉ 5 cm long) , how would I simulate that domain in the model, I used a spherical domain with r1: 1.25 cm, r2: 1.26 cm and nodes (Nx) = 5, please advise the appropriate way. Your support in this matter is highly appreciated. regards Abdulaziz Carbonate acdizing.x1t
  24. Helge

    Problem with Python Plugin

    Perfect! Thank you very much 🙂 Helge
  25. Melika Sharifi

    Info on log Q/K for Mineral saturation Spec8?

    Hello, Log K values are derived from the thermo dataset used in the calculation. To see which dataset is currently loaded for your calculation in each app, go to File – File Properties – Thermo data. The Q values for a reaction, however, depend on the activities of species involved in that reaction which are dependent on the thermodynamic data for all other dissolved species in the solution matrix. To overall, Q is a quantity that changes as the reaction approaches equilibrium (K). Hope this helps. Bests, Melika Sharifi Aqueous Solutions LLC
  26. dan saalfeld

    Problem with Python Plugin

    Hi Helge, It looks like you need to add the GWB install folder to your PATH environment variable so that Python can find the GWB libraries. If working from the Windows command pane you can set the PATH as follows: set PATH=C:\Program Files\GWB;%PATH% If you have GWB installed somewhere else you will need to adjust the command to match. Please note that that will only set the PATH for that command pane window. To permanently set PATH you can hit the Windows key + s to bring up Windows search or just click the Windows button and start typing in "environment". You should then get an option for changing account environment variables. You can then add or update the PATH variable for your user account. Hope this helps, Dan
  27. Hello everybody, I have a problem getting started with the GWB Python plugin. On running the example script I get: ############################### Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB>GWBplugin_Python_example2.py Starting program SpecE8 Traceback (most recent call last): File "Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB\GWBplugin_Python_example2.py", line 20, in <module> -s \"c:/program files/gwb/gtdata/feoh.dat\""): File "Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB\GWBplugin.py", line 11, in initialize return cdll.gwbplugin.c_initialize(byref(self.plugin), c_char_p(app_name), c_char_p(file_name), c_char_p(cmds)) File "C:\Python27-x64\lib\ctypes\__init__.py", line 436, in __getattr__ dll = self._dlltype(name) File "C:\Python27-x64\lib\ctypes\__init__.py", line 366, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] Das angegebene Modul wurde nicht gefunden ############################### I get the same result with Python 3.7.x and also when calling module react (in a different script). To me it appears that GWB is having trouble with my Python installation. The requested file C:\Python27-x64\lib\ctypes\__init__.py exists. I use GWB 12 Professional. Thanks for help. Helge
  28. Hello everybody, I have a problem getting started with the GWB Python plugin. On running the example script I get:
  1. Load more activity
×