Jump to content
Geochemist's Workbench Support Forum

WeiX

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by WeiX

  1. Hello. I recently upgraded my GWB from 10.0 to the latest version. One thing in the new version that bothers me a lot is the Minerals sequence in the output variables. In previous 10.0 version, the output Minerals list sequence started from primary minerals in the input, followed by whatever secondary precipitations that appear first in time or reaction progress. It was quite simple to check what new minerals are forming and in what stage, because new minerals are always in the last rows. However, in the new version, the output Minerals are sorted in alphabetic sequence. I have to compare very carefully with my primary mineral list to check what secondary minerals are there, because they are now in between each other. This bothers me a lot when I have many primary minerals. And I cannnot easily tell which mineral appear first by looking at the drop-down list, unless I plot all the minerals out and compare. I wonder if there is a way to bring the previous mineral list sequence back. Or can you include that in the next update? Thank you very much.
  2. Hello, what is the dolomite-ord and dolomite-dis in the database? Dolomite-ord often show together with dolomite. Are they the same? If I suppress dolomite-ord, the excessive Mg, Ca and CO3-- would form other minerals. I am always confused by the three different dolomite. Should I just just choose one dolomite to precipitate? Thanks.
  3. Thanks. That is a good idea to check the minerals. For the temperature, if I set it at 25C for injection fluid, the calculation will have convergence issue pretty early (about initial few steps Xi =0.002...). Setting the temperature the same is also reasonable and I tried that it worked. Although I still did not figure out why temperature has such an impact on convergence. Wei
  4. I appreciate your explanation. Thank you very much!
  5. Hi Jia, Thanks for your helpful suggestions. I added all the kinetics of minerals involved and also changed the temperature to the same for injection and reservoir. It works now for fewer nodes (11x11). Once I increased the nodes number, it would become non-convergent in later steps depending on the node size. I wonder if I should change any Config parameters/setup in order to increase the nodes. Attached latest script. 11x11 works okay for me. But it would be nice to increase it to 15x15 to get better resolution. Regarding the thermo dataset, I downloaded SIT database, but cannot open it with GWB 10.0. It says it's in a wrong format. I wonder if there is an older version. I also have hmw database. But it does not include some species like Fe2+ and Ba2+ in the base. I wonder if it is okay to combine the hmw database with the default database. Would it cause trouble? If not, how do I combine the two database to make it suitable for high salinity water? Thank you very much! Wei 230330 carbonated water injection.x2t
  6. Hi Jia, I tried to "pick up" the result from React to get a balanced initial status. However, it can only pick up the fluid chemistry without minerals although it asked me if I want to include minerals and I clicked yes. I wonder how to pick up the exact results file as the input. Can you help with that? Thanks, Wei
  7. Hi Jia, It's been a while and I just want to follow up with you to see if you have any suggestions to this residual problem. Thank you very much for your hep! Wei
  8. I tried to make well injection rate in the domain as zero (no injection), but it still did work, saying residuals too large, 681-th iteration. If I change the charge balance to Na+, then a lot more species will have largest residuals instead of Cl-. I checked the initial reservoir fluid and the injection fluid in React. There are some precipitates and the water chemistry changed a little, which is what I expected. I want the injected concentrated water to mix with the reservoir water and see what will happen as a function of time and location. However, it did not work in the X2t model from the very first step. It would be much appreciated if you can help check it again. Also what does "free" mean when I set the H2O and mineral volumes%? carbonated water injection - 230317.x2t React-injection fluid.rea React-reservoir fluid.rea
  9. Hello, I am trying to run a X2t model for carbonated brine injection into a reservoir water. It says "residuals too large" when I started to run it. I tried the initial mineral/fluid in Spec8 and there is almost no charge imbalance. I cannot figure out why Cl- residual is too large. Can you help check it? Thanks! carbonated water injection.x2t
  10. Thanks, Jia. I will check this out. I have a question about the error window. Sometimes when the script is too long, the error window would be too long to fully show up on my computer screen. There is no minimize or maximize button on that error window, only close "x". I move the window around but it won't let me see the bottom part. I cannot copy and paste the error information to a text file either. Did you have this issue with the error window?
  11. Hello Jia, Thanks for the advice. I tried pickup command. It works well with constant inputs. However, when I tried to change the initial reactants in a for loop in the script, a window would pop out saying no results were pick up. Can you help check it? I noted the problem below. # React script, batch run example data = "C:\Program Files\Gwb\Gtdata\thermo.tdat" verify clear all temperature = 25 C H2O = .006 kg Na+ = 1450 mg/l Ca++ = 20.7 mg/l Mg++ = 9.07 mg/l K+ = 4.84 mg/l Cl- = 454 mg/l SO4-- = 2120 mg/l Br- = 2.17 mg/l HCO3- = 387 mg/l SiO2(aq) = 1e-7 mg/l Al+++ = 1e-7 mg/l Fe++ = 1e-7 mg/l script start set out_id [open "Pickup_output.txt" w] fconfigure $out_id -encoding unicode puts $out_id "CO2(aq)(mol/kg)\tCalcite(g)\tpH\tNa+(mol/kg)" # Q: if I change the calcite to just React 1 g Calcite, this script run well and gives the results. But it would not work with for loop. for {set j_a 0} {$j_a<2} {incr j_a 1} { React $j_a g Calcite React 1 g Albite React 1 g Anorthite React 1 g Annite React 1 g Phlogopite React 1 g Ripidolit-14A React 80 g of Quartz React 10 g of Kaolinite balance on H+ go pickup swap CO2(aq) for HCO3- for {set i 0} {$i<11} {incr i 1} { set input_CO2 [expr {0.6/10*$i+0.005}] eval {"CO2(aq)=" $input_CO2 mol/kg} fix activity of CO2(aq) balance on H+ go report set_digits 4 report set_units ? set go_final_pH [eval report pH] set go_final_Na [eval report concentration aqueous Na+] puts "CO2 = $input_CO2 mol/kg" puts "calcite = $j_a g" puts "pH = $go_final_pH" puts "Ca++ = $go_final_Ca mol/kg" foreach a [lrange $out_id 0 end] { puts -nonewline $out_id "$input_CO2\t" puts -nonewline $out_id "$j_a\t" puts -nonewline $out_id "$go_final_pH\t" puts $out_id "$go_final_Na" } } } close $out_id Thanks, Wei
  12. Hello, I want to know if there is a command or anyway to set the end step status (including minerals present, pH, aqueous concentrations, etc...) of a React run as the initial condition for another React run with additional reactants. I could manually check the last step in txt file and put in those. But I want to know if there is any easier way so that I can do it in batch. Thanks, Wei
  13. The output file works now. For the non-integer increment, I did not succeed with expr command. It just could not recognize it somehow. But I change the unit of reacted calcite to mg. Then change the increment to 500. 500 mg is 0.5 g anyway. Problem solved anyway. Thanks a lot, Jia!
  14. Hi Jia, This very helpful. I successfully reported results in the command panel. The final results of each run is what we need for now. I added one more variable (changing calcite to react) in the script and I have two more questions regarding the updated script (noted below). Question 1: How do I react non-integral amount of calcite? I tried to put expr{$j+0.5} directly in the react command but it would not work. I also tried to set a new variable input_cal as $j+0.5 and put $input_cal in React, did not work. eval Calcite= $input_cal did not work either with React. The only way works with increasing calcite amount is to put $j directly after React. Question 2: In the txt result report file, It only listed the result from the last run. I tried a few different foreach commands but they did not work. How do I put the result line by line in the txt file? # React script, batch run example data = "C:\Program Files\Gwb\Gtdata\thermo.tdat" verify temperature = 25 C H2O = .005 kg Na+ = 1000 mg/l Ca++ = 20 mg/l Cl- = 500 mg/l SO4-- = 2000 mg/l swap CO2(aq) for HCO3- SiO2(aq) = 1e-7 mg/l Al+++ = 1e-7 mg/l script start clear all # vary CO2(aq) input for {set i 0} {$i<4} {incr i 1} { set input_CO2 [expr {1.2/3*$i+0.005}] eval {"CO2(aq)=" $input_CO2 mol/kg} fix activity of CO2(aq) # vary calcite input for {set j 0} {$j<4} {incr j 1} { # Question 1 react minerals non-integer amount react $j g Calcite react 80 g of Quartz react 10 g of Kaolinite react 2.5 g of Albite balance on H+ go report set_digits 4 report set_units ? set go_final_pH [eval report pH] set go_final_Ca [eval report concentration aqueous Ca++] # report in command puts "CO2(aq) = $input_CO2 mol/kg" puts "calcite = $j g" puts "pH = $go_final_pH" puts "Ca++ = $go_final_Ca mol/kg" # Question 2 report in txt set out_id [open "Batch_output.txt" w] fconfigure $out_id -encoding unicode puts $out_id "CO2(aq)(mol/kg)\tCalcite(g)\tpH\tCa++" foreach a [lrange $out_id 0 end] { puts -nonewline $out_id "$input_CO2\t" puts -nonewline $out_id "$j\t" puts -nonewline $out_id "$go_final_pH\t" puts $out_id "$go_final_Ca" } } } close $out_id Thanks, Wei
  15. Thanks. The Notepad was exactly what I was asking. I tried to add a few loops to change the CO2(aq) input. It seems it did run for 11 iterations in the Result panel (with 11 successful reaction paths and 116 steps in each path. However, when I click the view results, it only gave me the most recent reaction path results. How do I report result after each iteration? Currently, I don't even know if the CO2(aq) is changing in each iteration... the result panel only shows the general status of each iteration. For example, if I want to report pH at step #0 of each CO2(aq) input, my script is below. But it won't report what I want, I only see the normal result txt file with the CO2(aq)=1.2 mol/kg iteration. # React script, batch run example data = "C:\Program Files\Gwb\Gtdata\thermo.tdat" verify temperature = 25 C H2O = .005 kg Na+ = 1000 mg/l Ca++ = 20 mg/l Cl- = 500 mg/l SO4-- = 2000 mg/l swap CO2(aq) for HCO3- SiO2(aq) = 1e-7 mg/l Al+++ = 1e-7 mg/l script start for {set i 0} {$i<11} {incr i 1} { eval {"CO2(aq)=" [expr {1.2/10*$i}] mol/kg} balance on H+ react 80 g of Quartz react 10 g of Kaolinite react 2.5 g of Albite react 5 g of Calcite fix activity of CO2(aq) go puts "The control script $i iteration" report pH 0 }
  16. Hi, I am doing a reaction path modeling in React. React 5 minerals with a ground water and see the equilibrium status with different fixed CO2(aq) concentrations. I am trying to change the CO2(aq) input from 0 to 1.2 mol/kg (and other parameters in the future). I did this manually for 10 input concentrations and realized it's labor-intensive. The results we want are the Step #0 and the last Step. I have to open the txt result file and manually find these two steps. I learnt that I can write script in GWB command window to add in some loops to run and report in batches. I got stuck in the first step. In the command window of React, it would not allow me to type and edit script once I hit "enter". Is there a different window or a command I need to put in to write React script without running each line? Like a Python shell window? Thanks. (I may have other questions regarding the script in the future and I will put in here in the same topic)
×
×
  • Create New...