Input file: ../examples/ex17 Output file: ex17.out Database file: ../database/pitzer.dat ------------------ Reading data base. ------------------ SOLUTION_MASTER_SPECIES SOLUTION_SPECIES PHASES PITZER GAS_BINARY_PARAMETERS EXCHANGE_MASTER_SPECIES EXCHANGE_SPECIES SURFACE_MASTER_SPECIES SURFACE_SPECIES MEAN_GAMMAS END ------------------------------------ Reading input data for simulation 1. ------------------------------------ TITLE Example 17.--Inverse modeling of Black Sea water evaporation SOLUTION 1 Black Sea water units mg/L density 1.014 pH 8.0 # estimated Ca 233 Mg 679 Na 5820 K 193 S(6) 1460 Cl 10340 Br 35 C 1 CO2(g) -3.5 SOLUTION 2 Composition during halite precipitation units mg/L density 1.271 pH 5.0 # estimated Ca 0.0 Mg 50500 Na 55200 K 15800 S(6) 76200 Cl 187900 Br 2670 C 1 CO2(g) -3.5 INVERSE_MODELING solutions 1 2 uncertainties .025 range balances Br K Mg phases H2O(g) pre Calcite pre CO2(g) pre Gypsum pre Halite pre Glauberite pre Polyhalite pre END ----- TITLE ----- Example 17.--Inverse modeling of Black Sea water evaporation ------------------------------------------- Beginning of initial solution calculations. ------------------------------------------- Initial solution 1. Black Sea water -----------------------------Solution composition------------------------------ Elements Molality Moles Br 4.401e-04 4.401e-04 C 7.375e-04 7.375e-04 Equilibrium with CO2(g) Ca 5.841e-03 5.841e-03 Cl 2.930e-01 2.930e-01 K 4.960e-03 4.960e-03 Mg 2.807e-02 2.807e-02 Na 2.544e-01 2.544e-01 S(6) 1.527e-02 1.527e-02 ----------------------------Description of solution---------------------------- pH = 8.000 pe = 4.000 Specific Conductance (µS/cm, 25°C) = 29778 Density (g/cm³) = 1.01091 Volume (L) = 1.00789 Viscosity (mPa s) = 0.92655 Activity of water = 0.990 Ionic strength (mol/kgw) = 3.751e-01 Mass of water (kg) = 1.000e+00 Total alkalinity (eq/kg) = 7.601e-04 Total CO2 (mol/kg) = 7.375e-04 Temperature (°C) = 25.00 Electrical balance (eq) = 2.359e-03 Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.36 Iterations = 8 Gamma iterations = 3 Osmotic coefficient = 0.89867 Density of water = 0.99704 Total H = 1.110131e+02 Total O = 5.556951e+01 ----------------------------Distribution of species---------------------------- MacInnes MacInnes MacInnes Log Log Log mole V Species Molality Activity Molality Activity Gamma cm³/mol OH- 1.669e-06 1.002e-06 -5.777 -5.999 -0.222 -3.15 H+ 1.290e-08 1.000e-08 -7.890 -8.000 -0.110 0.00 H2O 5.551e+01 9.903e-01 1.744 -0.004 0.000 18.07 Br 4.401e-04 Br- 4.401e-04 3.007e-04 -3.356 -3.522 -0.165 25.07 C(4) 7.375e-04 HCO3- 6.974e-04 4.854e-04 -3.157 -3.314 -0.157 25.88 CO3-2 1.577e-05 2.223e-06 -4.802 -5.653 -0.851 -1.45 MgCO3 1.412e-05 1.412e-05 -4.850 -4.850 0.000 -17.09 CO2 1.018e-05 1.076e-05 -4.992 -4.968 0.024 34.43 Ca 5.841e-03 Ca+2 5.841e-03 1.446e-03 -2.233 -2.840 -0.606 -16.97 Cl 2.930e-01 Cl- 2.930e-01 1.964e-01 -0.533 -0.707 -0.174 18.61 K 4.960e-03 K+ 4.960e-03 3.419e-03 -2.305 -2.466 -0.162 9.48 Mg 2.807e-02 Mg+2 2.805e-02 7.498e-03 -1.552 -2.125 -0.573 -20.69 MgCO3 1.412e-05 1.412e-05 -4.850 -4.850 0.000 -17.09 MgOH+ 1.241e-06 1.153e-06 -5.906 -5.938 -0.032 (0) Na 2.544e-01 Na+ 2.544e-01 1.837e-01 -0.595 -0.736 -0.141 -0.74 S(6) 1.527e-02 SO4-2 1.527e-02 2.084e-03 -1.816 -2.681 -0.865 17.45 HSO4- 2.961e-09 2.026e-09 -8.529 -8.693 -0.165 40.79 ------------------------------Saturation indices------------------------------- Phase SI** log IAP log K(298 K, 1 atm) Anhydrite -1.27 -5.52 -4.25 CaSO4 Aragonite -0.27 -8.49 -8.22 CaCO3 Arcanite -5.73 -7.61 -1.88 K2SO4 Artinite -3.25 16.41 19.66 Mg2CO3(OH)2:3H2O Bischofite -8.16 -3.56 4.59 MgCl2:6H2O Bloedite -6.63 -8.98 -2.35 Na2Mg(SO4)2:4H2O Brucite -3.24 -14.12 -10.88 Mg(OH)2 Burkeite -14.66 -15.43 -0.77 Na6CO3(SO4)2 Calcite -0.09 -8.49 -8.41 CaCO3 Carnallite -11.16 -6.74 4.42 KMgCl3:6H2O CO2(g) -3.50 -4.97 -1.47 CO2 Pressure 0.0 atm, phi 1.000 Dolomite 0.82 -16.27 -17.09 CaMg(CO3)2 Epsomite -2.99 -4.84 -1.85 MgSO4:7H2O Gaylussite -6.22 -15.64 -9.42 CaNa2(CO3)2:5H2O Glaserite -9.69 -13.50 -3.80 NaK3(SO4)2 Glauberite -4.32 -9.67 -5.35 Na2Ca(SO4)2 Goergeyite -5.85 -35.22 -29.37 K2Ca5(SO4)6H2O Gypsum -0.93 -5.53 -4.60 CaSO4:2H2O H2O(g) -1.51 -0.00 1.50 H2O Halite -3.02 -1.44 1.58 NaCl Hexahydrite -3.26 -4.83 -1.57 MgSO4:6H2O Huntite -0.71 9.53 10.24 CaMg3(CO3)4 Kainite -7.80 -7.99 -0.19 KMgClSO4:3H2O Kalicinite -6.18 -16.12 -9.94 KHCO3 Kieserite -4.54 -4.81 -0.27 MgSO4:H2O Labile_S -8.16 -13.83 -5.67 Na4Ca(SO4)3:2H2O Leonhardite -3.94 -4.82 -0.89 MgSO4:4H2O Leonite -8.46 -12.44 -3.98 K2Mg(SO4)2:4H2O Magnesite 0.06 -7.78 -7.83 MgCO3 MgCl2_2H2O -18.10 -3.55 14.56 MgCl2:2H2O MgCl2_4H2O -10.53 -3.56 6.98 MgCl2:4H2O Mirabilite -2.96 -4.20 -1.24 Na2SO4:10H2O Misenite -75.69 -86.50 -10.81 K8H6(SO4)7 Nahcolite -3.65 -14.39 -10.74 NaHCO3 Natron -6.34 -7.17 -0.82 Na2CO3:10H2O Nesquehonite -2.62 -7.79 -5.17 MgCO3:3H2O Pentahydrite -3.54 -4.83 -1.28 MgSO4:5H2O Pirssonite -6.39 -15.63 -9.23 Na2Ca(CO3)2:2H2O Polyhalite -9.73 -23.47 -13.74 K2MgCa2(SO4)4:2H2O Portlandite -9.65 -14.84 -5.19 Ca(OH)2 Schoenite -8.12 -12.44 -4.33 K2Mg(SO4)2:6H2O Sylvite -4.07 -3.17 0.90 KCl Syngenite -6.71 -13.14 -6.43 K2Ca(SO4)2:H2O Thenardite -3.85 -4.15 -0.30 Na2SO4 Trona -10.14 -21.52 -11.38 Na3H(CO3)2:2H2O **For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm. For ideal gases, phi = 1. Initial solution 2. Composition during halite precipitation -----------------------------Solution composition------------------------------ Elements Molality Moles Br 3.785e-02 3.785e-02 C 6.950e-06 6.950e-06 Equilibrium with CO2(g) Cl 6.004e+00 6.004e+00 K 4.578e-01 4.578e-01 Mg 2.354e+00 2.354e+00 Na 2.720e+00 2.720e+00 S(6) 8.986e-01 8.986e-01 ----------------------------Description of solution---------------------------- pH = 5.000 pe = 4.000 Specific Conductance (µS/cm, 25°C) = 150307 Density (g/cm³) = 1.27237 Volume (L) = 1.13163 Viscosity (mPa s) = 3.75254 Activity of water = 0.678 Ionic strength (mol/kgw) = 1.111e+01 Mass of water (kg) = 1.000e+00 Total alkalinity (eq/kg) = 7.463e-06 Total CO2 (mol/kg) = 6.950e-06 Temperature (°C) = 25.00 Electrical balance (eq) = 4.629e-02 Percent error, 100*(Cat-|An|)/(Cat+|An|) = 0.29 Iterations = 16 (24 overall) Gamma iterations = 7 Osmotic coefficient = 1.72913 Density of water = 0.99704 Total H = 1.110124e+02 Total O = 5.910065e+01 ----------------------------Distribution of species---------------------------- MacInnes MacInnes MacInnes Log Log Log mole V Species Molality Activity Molality Activity Gamma cm³/mol H+ 5.437e-07 1.000e-05 -6.265 -5.000 1.265 0.00 OH- 1.211e-08 6.863e-10 -7.917 -9.163 -1.246 11.12 H2O 5.551e+01 6.781e-01 1.744 -0.169 0.000 18.07 Br 3.785e-02 Br- 3.785e-02 4.933e-02 -1.422 -1.307 0.115 26.52 C(4) 6.950e-06 HCO3- 4.243e-06 3.324e-07 -5.372 -6.478 -1.106 37.30 CO2 2.631e-06 1.076e-05 -5.580 -4.968 0.612 34.43 MgCO3 7.035e-08 7.035e-08 -7.153 -7.153 0.000 -17.09 CO3-2 5.753e-09 1.522e-12 -8.240 -11.818 -3.578 14.43 Cl 6.004e+00 Cl- 6.004e+00 4.547e+00 0.778 0.658 -0.121 20.71 K 4.578e-01 K+ 4.578e-01 4.966e-01 -0.339 -0.304 0.035 14.34 Mg 2.354e+00 Mg+2 2.354e+00 5.455e+01 0.372 1.737 1.365 -15.59 MgOH+ 6.497e-06 5.742e-06 -5.187 -5.241 -0.054 (0) MgCO3 7.035e-08 7.035e-08 -7.153 -7.153 0.000 -17.09 Na 2.720e+00 Na+ 2.720e+00 8.832e+00 0.435 0.946 0.511 2.22 S(6) 8.986e-01 SO4-2 8.986e-01 2.396e-03 -0.046 -2.621 -2.574 30.53 HSO4- 2.897e-06 2.329e-06 -5.538 -5.633 -0.095 42.44 ------------------------------Saturation indices------------------------------- Phase SI** log IAP log K(298 K, 1 atm) Arcanite -1.35 -3.23 -1.88 K2SO4 Artinite -8.51 11.15 19.66 Mg2CO3(OH)2:3H2O Bischofite -2.55 2.04 4.59 MgCl2:6H2O Bloedite 0.06 -2.29 -2.35 Na2Mg(SO4)2:4H2O Brucite -5.71 -16.59 -10.88 Mg(OH)2 Burkeite -10.61 -11.38 -0.77 Na6CO3(SO4)2 Carnallite -2.03 2.39 4.42 KMgCl3:6H2O CO2(g) -3.50 -4.97 -1.47 CO2 Pressure 0.0 atm, phi 1.000 Epsomite -0.22 -2.06 -1.85 MgSO4:7H2O Glaserite -1.40 -5.21 -3.80 NaK3(SO4)2 H2O(g) -1.67 -0.17 1.50 H2O Halite 0.02 1.60 1.58 NaCl Hexahydrite -0.33 -1.90 -1.57 MgSO4:6H2O Kainite -0.84 -1.04 -0.19 KMgClSO4:3H2O Kalicinite -7.18 -17.12 -9.94 KHCO3 Kieserite -0.79 -1.05 -0.27 MgSO4:H2O Leonhardite -0.67 -1.56 -0.89 MgSO4:4H2O Leonite -0.81 -4.79 -3.98 K2Mg(SO4)2:4H2O Magnesite -2.25 -10.08 -7.83 MgCO3 MgCl2_2H2O -11.84 2.71 14.56 MgCl2:2H2O MgCl2_4H2O -4.60 2.38 6.98 MgCl2:4H2O Mirabilite -1.18 -2.42 -1.24 Na2SO4:10H2O Misenite -39.97 -50.78 -10.81 K8H6(SO4)7 Nahcolite -5.13 -15.87 -10.74 NaHCO3 Natron -10.79 -11.61 -0.82 Na2CO3:10H2O Nesquehonite -5.42 -10.59 -5.17 MgCO3:3H2O Pentahydrite -0.44 -1.73 -1.28 MgSO4:5H2O Schoenite -0.80 -5.12 -4.33 K2Mg(SO4)2:6H2O Sylvite -0.55 0.35 0.90 KCl Thenardite -0.43 -0.73 -0.30 Na2SO4 Trona -14.75 -26.13 -11.38 Na3H(CO3)2:2H2O **For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm. For ideal gases, phi = 1. --------------------------------------------- Beginning of inverse modeling 1 calculations. --------------------------------------------- Using Cl1 standard precision optimization routine. Solution 1: Black Sea water Input Delta Input+Delta pH 8.000e+00 + 0.000e+00 = 8.000e+00 Alkalinity 7.601e-04 + 0.000e+00 = 7.601e-04 Br 4.401e-04 + 0.000e+00 = 4.401e-04 C(4) 7.375e-04 + 0.000e+00 = 7.375e-04 Ca 5.841e-03 + 0.000e+00 = 5.841e-03 Cl 2.930e-01 + 8.006e-04 = 2.938e-01 K 4.960e-03 + 1.034e-04 = 5.063e-03 Mg 2.807e-02 + -7.018e-04 = 2.737e-02 Na 2.544e-01 + 0.000e+00 = 2.544e-01 S(6) 1.527e-02 + 1.290e-04 = 1.540e-02 Solution 2: Composition during halite precipitation Input Delta Input+Delta pH 5.000e+00 + 0.000e+00 = 5.000e+00 Alkalinity 7.463e-06 + -1.866e-07 = 7.277e-06 Br 3.785e-02 + 9.440e-04 = 3.880e-02 C(4) 6.950e-06 + 1.737e-07 = 7.123e-06 Ca 0.000e+00 + 0.000e+00 = 0.000e+00 Cl 6.004e+00 + 1.501e-01 = 6.154e+00 K 4.578e-01 + -1.144e-02 = 4.464e-01 Mg 2.354e+00 + 5.884e-02 = 2.413e+00 Na 2.720e+00 + -4.642e-02 = 2.674e+00 S(6) 8.986e-01 + -2.247e-02 = 8.761e-01 Solution fractions: Minimum Maximum Solution 1 8.815e+01 8.780e+01 8.815e+01 Solution 2 1.000e+00 1.000e+00 1.000e+00 Phase mole transfers: Minimum Maximum Formula (Approximate SI in solution 1, 2 at 298 K, 1 atm) H2O(g) -4.837e+03 -4.817e+03 -4.817e+03 H2O ( -1.51, -1.67) Calcite -3.350e-02 -3.434e-02 -3.253e-02 CaCO3 ( -0.09, ) CO2(g) -3.151e-02 -3.397e-02 -2.893e-02 CO2 ( -3.50, -3.50) Gypsum -4.814e-01 -4.951e-01 -4.658e-01 CaSO4:2H2O ( -0.93, ) Halite -1.975e+01 -2.033e+01 -1.902e+01 NaCl ( -3.02, 0.02) Redox mole transfers: Sum of residuals (epsilons in documentation): 2.048e+02 Sum of delta/uncertainty limit: 9.961e+00 Maximum fractional error in element concentration: 2.500e-02 Model contains minimum number of phases. =============================================================================== Summary of inverse modeling: Number of models found: 1 Number of minimal models found: 1 Number of infeasible sets of phases saved: 11 Number of calls to cl1: 29 ------------------ End of simulation. ------------------ ------------------------------------ Reading input data for simulation 2. ------------------------------------