SOLUTION 1ENDUSE solution 1GAS_PHASE 1 -fixed_pressure -pressure 1 -volume 1 -temperature 25 H2O(g) 0 H2Sg(g) 0REACTION_PRESSURE 1 2.91142REACTION_TEMPERATURE 1 23.5REACTION 1 Sg 1 10 molesEND
REACTION_TEMPERATURE 150, 5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 94REACTION_TEMPERATURE 530, 60, 90, 120, 150REACTION_TEMPERATURE 630, 60, 90, 120, 150, 180REACTION_TEMPERATURE 730, 60, 90, 120, 150, 180, 210REACTION_TEMPERATURE 830, 60, 90, 120, 150, 180, 210, 240REACTION_TEMPERATURE 1030, 60, 90, 120, 150, 180, 210, 240, 270, 300REACTION_TEMPERATURE 10130, 60, 90, 120, 150, 180, 210, 240, 270, 295SOLUTION 2pH 7 chargeUSE solution noneENDSOLUTION 1; -water 1; pH 7 charge; Sg 9e3SELECTED_OUTPUT 2; -reset false; -file H2S.pqi; -new_line falseUSER_PUNCH 210 sc$ = chr$(59) : hs$ = ' ' + chr$(35) + ' '20 data ' 1 ', ' 29.6 ', ' 49.3 ', ' 98.7 ', ' 148.0 ', ' 197.4 ', ' 246.7 ', ' 296.1 ', ' 345.4 ', ' 394.8 ', ' 444.1 ', ' 493.5 ', ' 542.8 ', ' 592.1 ', ' 641.5 ', ' 690.8 ', ' 740.2 ', ' 789.5 ', ' 888.2 ', ' 986.9 '30 dim p$(20) : for i = 1 to 20 : read p$(i) : next i40 data 15, 7, 8, 101, 10, 10, 10, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 550 dim t(20) : for i = 1 to 20 : read t(i) : next i60 gp$ = 'GAS_PHASE 1' + sc$ + ' -fixed_pr' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0' + sc$ + ' -pr '62 gp2$ = 'GAS_PHASE 1' + sc$ + ' -fixed_pr' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0' + sc$ + 'Ntg(g) 100' + sc$ + ' -pr '70 for i = 1 to 2080 punch eol$ + 'USE solution 1' + sc$ + ' USE reaction_temperature ' + str_f$(t(i), 1, 0)90 if i < 5 then punch eol$ + gp$ + p$(i) else punch eol$ + gp$ + p$(i)92 if i > 1 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' -headings x' #+ p$(i)100 punch eol$ + 'END'110 next iENDSELECTED_OUTPUT 2; -active falseSELECTED_OUTPUT 1; -reset false; -file H2S.in.pqi; -new_line falseUSER_PUNCH 1-headings dif '' number.....tc.....P_calc..m_obs..m_calc10 if get(1) = 0 then put(1, 1)20 data 0.205, 0.174, 0.147, 0.127, 0.111, 0.097, 0.086, 0.076, 0.068, 0.054, 0.043, 0.031, 0.021, 0.011, 0.008,\ 1.932, 1.4483, 1.0793, 0.8461, 0.6825, 0.5223, 0.306,\ 1.9613, 2.1741, 1.842, 1.4887, 1.2722, 1.0691, 0.819, 0.4494,\ 1.9701, 2.2091, 2.5341, 2.753, 2.7876, 2.5869, 2.3883, 2.0201, 1.4239, 0.676,\ 2.0242, 2.2403, 2.6089, 3.1645, 3.6322, 3.8084, 3.8235, 3.6576, 3.2501, 2.5257,\ 2.0638, 2.3276, 2.7037, 3.5511, 3.5511, 3.5511, 5.3284, 5.5584, 5.4757, 4.874,\ 2.1094, 2.4236, 2.7872, 3.6007, 4.6227, 5.4793, 6.3812, 7.0389, 7.2365, 7.2987,\ 2.1546, 2.4581, 2.8515, 3.6984, 4.9065, 5.8992, 7.8033,\ 2.187, 2.4922, 2.9082, 3.7183, 5.2602, 6.5191,\ 2.2314, 2.5637, 2.986, 3.7918, 5.5007, 6.9683,\ 2.3262, 2.6256, 3.2248, 4.2306, 5.7343, 7.355,\ 2.3789, 2.6693, 3.2946, 4.3223, 5.9335, 7.705,\ 2.4056, 2.7116, 3.3599, 4.4433, 6.1232, 8.0869,\ 2.5025, 2.7524, 3.4157, 4.5237, 6.3934, 8.4285,\ 2.5239, 2.7848, 3.4541, 4.5971, 6.5064,\ 2.554, 2.8484, 3.5112, 4.7119, 6.6309,\ 2.6049, 2.8835, 3.5788, 4.7674, 6.8413,\ 2.6155, 2.931, 3.6326, 4.8544, 7.0222,\ 2.7046, 3.0362, 3.7248, 5.003, 7.4328,\ 2.7956, 3.08, 3.8067, 5.1491, 7.682930 no = get(1)40 dim mo(150) : restore 20 : for i = 1 to no : read mo(i) : next i : i = no50 pc = pressure : s = tot("Sg") : dif = (s / mo(i) - 1) * 1 #: if pressure < 190 then dif = 060 punch eol$ + str_e$(dif, 20, 13), ' ', str_f$(i, 1, 0) + str_f$(tc, 5, 0) + str_f$(pc, 8, 2) + str_f$(mo(i), 8, 3) + str_f$(s, 8, 3) : put(get(2) + dif^2, 2)70 put(no + 1, 1)160 if no = 143 then punch " phi =", get(2)-end#PRINT; -reset false; -echo_input falseUSER_GRAPH 1 H2S solubility in water, data from Jiang et al., 2020 -plot_csv_file H2S.dat -axis_titles "Temperature / Celsius" "H2S / (mol/kgw)" -axis_scale x_axis 0 310 -axis_scale sy_axis 0 9 # -initial_solutions true -connect_simulations false 10 graph_x tc # tot("Na") 20 y = tot("Sg") : if pressure < 2 then y = y * 10 : graph_sy y : end 40 data 0, 0, 0, 4, 5, 6, 7, 8, 9, 0, 0, 0, 13, 0, 0, 0, 0, 18, 0, 0, 0, 22 50 if sim_no > no then no = sim_no : dim p(30) : restore 40 : for i = 1 to no : read p(i) : next i 60 if no = p(no) then graph_sy y -endINCLUDE$ H2S.pqiENDUSE solution 2REACTION_TEMPERATURE 1; 25 25 50 100 150 200.2 250 300 25 50 100 150 200.2 250 300# 25 50 100 150 200.2 250 300REACTION_PRESSURE 1; 9.86 197.24 197.34 197.24 197.24 197.14 197.14 197.24 345.17 345.17 345.17 345.17 345.07 345.17 345.07# 1e3 1e3 1e3 1e3 1e3 1e3 1e3REACTION 1; H2Sg 1; 0.232 0.247 0.249 0.251 0.252 0.254 0.266 0.26 0.246 0.249 0.25 0.252 0.253 0.267 0.259# 0.246 0.249 0.25 0.252 0.253 0.267 0.259# SELECTED_OUTPUT 1; -reset false; -file in.prn; -new_line falseUSER_PUNCH 1# -headings dif '' number.....tc.....P_calc..m_obs..m_calc10 if get(1) = 0 then put(1, 1)20 data 34.8, 34.8, 36, 39, 43, 49.2, 58.3, 76.6, 35, 35.8, 38.4, 42.5, 47.7, 55.2, 67.930 no = step_no40 dim mo(150) : restore 20 : for i = 1 to no : read mo(i) : next i : i = i - 150 pc = pressure : v = (vm("H2Sg") * mol("H2Sg") + vm("(H2Sg)2") * mol("(H2Sg)2") + vm("HSg-") * mol("HSg-")) / tot("Sg") : dif = (v / mo(i) - 1) * 152 dif = dif * 2.560 punch eol$ + str_e$(dif, 20, 13), ' ', str_f$(i, 1, 0) + str_f$(tc, 5, 0) + str_f$(pc, 8, 2) + str_f$(mo(i), 8, 3) + str_f$(v, 8, 3) : put(get(2) + dif^2, 2)70 put(no + 1, 1)160 if no = 15 then punch " phi =", get(2)USER_GRAPH 1; -active falseUSER_GRAPH 2-axis_titles "temperature / K" "Overall Vm H2S species / (cm3/mol)"-connect_simulations false10 v = (vm("H2Sg") * mol("H2Sg") + vm("(H2Sg)2") * mol("(H2Sg)2") + vm("HSg-") * mol("HSg-")) / tot("Sg")20 plot_xy tk, v, line_width = 0# 20 plot_xy tk, vm("CO2"), line_width = 030 data 34.8, 34.8, 36, 39, 43, 49.2, 58.3, 76.6, 35, 35.8, 38.4, 42.5, 47.7, 55.2, 67.940 dim v(30) : restore 30 : for i = 1 to step_no : read v(i) : next i50 plot_xy tk, v(i - 1), color = Black, line_width = 0, symbol_size = 12# 60 data 8.77, 4.31, -17.1, 0, -0.51, -1e-2# 60 data 6.4, 15, -27, 0, -0.5, 0, 0, 0# 60 data 6.4, 2.2, -27, 0, -0.5, 0, 0, 0# 60 data 1.30620, -4.59330, -30.00025, 0.00000, -0.50000, 0# 60 data -0.92986 , 3.37217, 53.99450, 0.00000, -0.50000, 0# 70 dim v1(30) : restore 60 : for i = 1 to 6 : read v1(i) : next i# 72 pb_s = 2600. + pressure * 1.01325 : TK_s = tc + 45.15# 80 v2 = 41.84 * (v1(1) * 0.1 + v1(2) * 100 / (pb_s) + v1(3) / (Tk_s) + v1(4) * 1e4 / (pb_s) / (Tk_s)) - v1(5) * 1e5 * QBrn + v1(6) * (pressure - 1)# 90 plot_xy tk+step_no, v2, color = Magenta, symbol_size = 10, line_width = 0END
tc 0.1.MPa.(m*10) 3.MPa 5.MPa 10.MPa 15.MPa 20.MPa 25.MPa 45.MPa 70.MPa 100.MPa0 2.055 1.7410 1.4715 1.2720 1.1125 0.9730 0.8635 0.7640 0.6850 0.5460 0.4370 0.3180 0.2190 0.1194 0.0830 1.93260 1.448390 1.0793120 0.8461150 0.6825180 0.5223210 0.30630 1.961360 2.174190 1.842120 1.4887150 1.2722180 1.0691210 0.819240 0.449430 1.970160 2.209190 2.5341120 2.753150 2.7876180 2.5869210 2.3883240 2.0201270 1.4239300 0.555430 2.024260 2.240390 2.6089120 3.1645150 3.6322180 3.8084210 3.8235240 3.6576270 3.2501300 2.525730 2.063860 2.327690 2.7037120 3.5511150 4.2857180 4.8725210 5.3284240 5.5584270 5.4757300 4.87430 2.109460 2.423690 2.7872120 3.6007150 4.6227180 5.4793210 6.3812240 7.0389270 7.2365300 7.298730 2.326260 2.625690 3.2248120 4.2306150 5.7343180 7.355 30 2.55460 2.848490 3.5112120 4.7119150 6.630930 2.795660 3.0890 3.8067120 5.1491150 7.6829
SOLUTION 1; pH 7 charge; Sg 1.7e3SELECTED_OUTPUT 1; -reset false; -file H2S_NaCl.pqi; -new_line falseUSER_PUNCH 110 sc$ = chr$(59) : hs$ = ' ' + chr$(35) + ' '20 data 3.38, 3.59, 8.02, 10.31, 12.45, 17.34, 20.84, 24.34, 4.24, 9.62, 13.02, 25.15, 25.99, 40.07, 5.76, 5.77, 16.15, 30.00, 44.66, 59.46, 6.07, 19.30, 19.38, 40.46, 65.71, 82.19, 95.73, 2.95, 4.75, 8.16, 9.27, 16.01, 17.39, 17.51, 23.29, 26.56, 4.96, 7.42, 15.39, 17.99, 29.47, 38.02, 3.29, 10.69, 17.86, 17.95, 28.86, 38.08, 58.55, 2.45, 10.79, 22.39, 22.41, 34.60, 44.69, 73.01, 94.85, 3.27, 10.00, 16.31, 16.97, 17.33, 19.54, 27.85, 4.52, 11.70, 12.41, 23.34, 30.44, 31.14, 35.82, 38.11, 8.42, 13.87, 32.61, 39.20, 52.99, 9.26, 17.83, 35.09, 52.76, 83.54, 5.97, 6.35, 6.20, 8.14, 10.74, 11.85, 12.38, 13.79, 17.42, 20.89, 24.93, 7.55, 9.77, 10.99, 14.45, 22.31, 25.30, 26.21, 36.74, 40.47, 5.62, 18.58, 30.56, 36.83, 41.03, 45.39, 55.43, 18.32, 21.68, 22.46, 45.02, 64.29, 65.86, 90.68, 96.56 30 no = 57 + 60 : dim p(150) : restore 20 : for i = 1 to no : read p(i) : next i40 sol$ = eol$ + 'USE solution 1' + sc$50 gp$ = ' GAS_PHASE 1' + sc$ + ' -fixed_pr' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0' + sc$ + ' -pr '60 gp0$ = ' GAS_PHASE 1' + sc$ + ' -fixed_vol' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0'70 r0$ = ' REACTION 1' + sc$ + ' H2Sg 1' + sc$ + ' -1.69 in 10' + sc$80 r4$ = ' REACTION 1' + sc$ + ' NaCl 4.007' + sc$90 r6$ = ' REACTION 1' + sc$ + ' NaCl 5.953' + sc$100 t40$ = ' REACTION_TEMPERATURE 1' + sc$ + ' 40' + sc$110 t120$ = ' REACTION_TEMPERATURE 1' + sc$ + ' 120' + sc$120 punch hs$ + ' 0 M NaCl...' + eol$ + sol$ + t40$ + r0$ + gp0$ + eol$ + 'END' + eol$130 for i = 1 to 32140 punch eol$ + hs$ + ' i = ' + str_f$(i, 1, 0)150 if i > 17 then 200 REM 120.C # ==>160 if i < 9 then punch sol$ + t40$ + r4$ + gp$ + str_f$(p(i), 1, 2) else punch sol$ + t40$ + r6$ + gp$ + str_f$(p(i + 19), 1, 2) # 8 and 9 samples170 if i = 1 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Green, symbol= None' + eol$180 if i = 9 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Blue, symbol= None' + eol$190 GOTO 260 punch eol$ + ' END' # ==> 200 REM 120.C # <==210 if i = 18 then punch hs$ + ' 0 M NaCl...' + eol$ + sol$ + t120$ + r0$ + gp0$ + eol$220 if i = 18 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Orange, symbol= None' + eol$ + 'END' + eol$230 if i < 25 then punch sol$ + t120$ + r4$ + gp$ + str_f$(p(i + 3), 1, 2) else punch sol$ + t120$ + r6$ + gp$ + str_f$(p(i + 25), 1, 2) # 7 and 8 samples240 if i = 18 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Magenta, symbol= None' + eol$250 if i = 25 then punch eol$ + 'USER_GRAPH 1' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Black , symbol= None' + eol$260 punch eol$ + ' END' # <==270 next iENDSELECTED_OUTPUT 1; -active false#PRINT; -reset false; -echo_input falseUSER_GRAPH 1 H2S solubility in NaCl, data from Xia et al., 2000 -plot_csv_file H2S_NaCl.dat -axis_titles "H2S / (mol / kgw)" "Pressure / atm" -axis_scale x_axis 0 1.4 -axis_scale y_axis 0 100 10 plot_xy tot("Sg"), pressure, symbol = None INCLUDE$ H2S_NaCl.pqiENDSOLUTION 1; pH 7 charge; Sg 2.2e3USER_GRAPH 1; -active falseSELECTED_OUTPUT 2; -reset false; -file H2S_Na2SO4.pqi; -new_line falseUSER_PUNCH 210 sc$ = chr$(59) : hs$ = ' ' + chr$(35) + ' '20 data 3.27, 10.00, 16.31, 16.97, 17.33, 19.54, 27.85, 4.52, 11.70, 12.41, 23.34, 30.44, 31.14, 35.82, 38.11, 8.42, 13.87, 32.61, 39.20, 52.99, 9.26, 17.83, 35.09, 52.76, 83.54, 5.97, 6.35, 6.20, 8.14, 10.74, 11.85, 12.38, 13.79, 17.42, 20.89, 24.93, 7.55, 9.77, 10.99, 14.45, 22.31, 25.30, 26.21, 36.74, 40.47, 5.62, 18.58, 30.56, 36.83, 41.03, 45.39, 55.43, 8.32, 21.68, 22.46, 45.02, 64.29, 65.86, 90.68, 96.56 30 no = 25 + 35 : dim p(150) : restore 20 : for i = 1 to no : read p(i) : next i40 sol$ = eol$ + 'USE solution 1' + sc$50 gp$ = ' GAS_PHASE 1' + sc$ + ' -fixed_pr' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0' + sc$ + ' -pr '60 gp0$ = ' GAS_PHASE 1' + sc$ + ' -fixed_vol' + sc$ + ' -vol 0.01' + sc$ + 'H2Sg(g) 0' + sc$ + 'H2O(g) 0'70 r0$ = ' REACTION 1' + sc$ + ' H2Sg 1' + sc$ + ' -2.19 in 10' + sc$80 r4$ = ' REACTION 1' + sc$ + ' Na2SO4 0.492' + sc$90 r6$ = ' REACTION 1' + sc$ + ' Na2SO4 0.95' + sc$92 r62$ = ' REACTION 1' + sc$ + ' Na2SO4 0.953' + sc$100 t40$ = ' REACTION_TEMPERATURE 1' + sc$ + ' 40' + sc$110 t120$ = ' REACTION_TEMPERATURE 1' + sc$ + ' 120' + sc$120 punch hs$ + ' 0 M Na2SO4...' + eol$ + sol$ + t40$ + r0$ + gp0$ + eol$ + 'END' + eol$130 for i = 1 to 31140 punch eol$ + hs$ + ' i = ' + str_f$(i, 1, 0)150 if i > 18 then 200 REM 120.C # ==>160 if i < 8 then punch sol$ + t40$ + r4$ + gp$ + str_f$(p(i), 1, 2) else punch sol$ + t40$ + r6$ + gp$ + str_f$(p(i + 18), 1, 2) # 7 and 11 samples170 if i = 1 then punch eol$ + 'USER_GRAPH 2' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Green, symbol= None' + eol$180 if i = 8 then punch eol$ + 'USER_GRAPH 2' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Blue, symbol= None' + eol$190 GOTO 260 punch eol$ + ' END' # ==> 200 REM 120.C # <==210 if i = 19 then punch hs$ + ' 0 M Na2SO4...' + eol$ + sol$ + t120$ + r0$ + gp0$ + eol$220 if i = 19 then punch eol$ + 'USER_GRAPH 2' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Orange, symbol= None' + eol$ + 'END' + eol$230 if i < 24 then punch sol$ + t120$ + r4$ + gp$ + str_f$(p(i + 2), 1, 2) else punch sol$ + t120$ + r6$ + gp$ + str_f$(p(i + 29), 1, 2) # 5 and 8 samples240 if i = 19 then punch eol$ + 'USER_GRAPH 2' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Magenta, symbol= None' + eol$250 if i = 24 then punch eol$ + 'USER_GRAPH 2' + sc$ + ' 10 plot_xy tot("Sg"), pressure, color = Black , symbol= None' + eol$260 punch eol$ + ' END' # <==270 next iENDSELECTED_OUTPUT 2; -active false#PRINT; -reset false; -echo_input falseUSER_GRAPH 2 H2S solubility in Na2SO4, data from Xia et al., 2000 -plot_csv_file H2S_Na2SO4.dat -axis_titles "H2S / (mol / kgw)" "Pressure / atm" -axis_scale x_axis 0 2 -axis_scale y_axis 0 100 10 plot_xy tot("Sg"), pressure, symbol = None INCLUDE$ H2S_Na2SO4.pqiEND
mH2S 40.C.==>0.0M ...==>4M ...==>6M 120.C.==>0.0M ...==>4M ...==>6M # M_NaCl-1 -1#-1 -1#0.129 3.380.137 3.590.329 8.020.419 10.310.509 12.450.712 17.340.857 20.840.982 24.34# 0.101 2.950.163 4.750.296 8.160.329 9.270.552 16.010.584 17.390.602 17.510.783 23.290.872 26.56# 0.076 6.070.306 19.300.31 19.380.667 40.461.056 65.711.26 82.191.391 95.73# 0.016 2.450.141 10.790.312 22.390.312 22.410.48 34.600.616 44.690.938 73.011.129 94.85
mH2S 40.C.==>0.0M ...==>0.49M ...==>0.95M 120.C.==>0.0M ...==>0.49M ...==>0.95M # M_Na2SO4-1 -1#-1 -1#0.172 3.270.529 10.000.87 16.310.903 16.970.916 17.331.042 19.541.446 27.85# 0.219 5.970.228 6.350.232 6.200.309 8.140.423 10.740.475 11.850.493 12.380.55 13.790.688 17.420.823 20.890.989 24.93# 0.174 9.260.38 17.830.809 35.091.203 52.761.822 83.54# 0.131 8.320.389 21.680.406 22.460.832 45.021.161 64.291.189 65.861.525 90.681.574 96.56
SOLUTION 1 pH 3 charge; pressure 2.91142 temp 23.5 Sg 1 H2Sg(g) 0.45988 ENDSOLUTION 1ENDUSE solution 1GAS_PHASE 1 -fixed_pressure -pressure 1 -volume 1 -temperature 25 H2O(g) 0 H2Sg(g) 0REACTION_PRESSURE 1 2.91142REACTION_TEMPERATURE 1 23.5REACTION 1 Sg 1 10 molesEND