// IP SrSO4 private double _IP_SrSO4(WaterComponent strontium, WaterComponent sulfates, double IS, double CF = 1) { double lgKsp = 1 / (-0.0079 * ((Math.Log10(IS) + 2.8154 * 2.8154) - 0.152)); //DuPont 1992 double Ksp = Math.Pow(10, lgKsp); // Gettins these to to mol/L; 0.5 is the same convertion factor to mol from eq double IP = (CF * mol * sulfates.ValueMEq * sulfates.GetIonCharge()) * (CF * mol * strontium.ValueMEq * strontium.GetIonCharge()); //supersat is calculated as ratio of actual sol product to Ksp at this ionic strength with correction on temp double supersat = (IP / (Ksp)); return(Math.Round(supersat, 2)); }
// LSI index private double _LSI(double tds, WaterComponent temp, WaterComponent calcium, WaterComponent alk, WaterComponent pH, double CF = 1) { double tF = 9 * temp.Value / 5 + 32; double pCa = -Math.Log10((calcium.ValueMEq * calcium.GetIonCharge() * mol * CF)); double pAlk = -Math.Log10((alk.ValueMEq * mol * CF)); //DuPont 1992, t here in F double C = 3.26 * Math.Exp(-0.005 * tF) - 0.0116 * Math.Log10(Math.Pow(tds, 3)) + 0.0905 * Math.Log10(Math.Pow(tds, 2)) - 0.133 * Math.Log10(tds) - 0.02; double LSI = pH.Value - (pCa + pAlk + C); return(Math.Round(LSI, 2)); }
// S&DSI index private double _StDI(double IS, WaterComponent temp, WaterComponent calcium, WaterComponent alk, WaterComponent pH, double CF = 1) { double K = 0; if (IS <= 1.2) { double power = Math.Pow((Math.Log(IS) + 7.644), 2) / 102.6; K = 2.022 * Math.Exp(power) - 0.0002 * Math.Pow(temp.Value, 2) + 0.00097 * temp.Value + 0.262; } else if (IS > 1.2) { K = -0.1 * IS - 0.0002 * Math.Pow(temp.Value, 2) + 0.00097 * temp.Value + 3.887; } double pCa = -Math.Log10((calcium.ValueMEq * calcium.GetIonCharge() * mol * CF)); double pAlk = -Math.Log10((alk.ValueMEq * mol * CF)); double StDI = pH.Value - (pCa + pAlk + K); return(Math.Round(StDI, 2)); }
// IP CaSO4 private double _IP_CaSO4(WaterComponent calcium, WaterComponent sulfates, double IS, WaterComponent temp, double CF = 1) { // Ratio of solubility of monohydrate im mg/L @ given temp in deg C to solubility @ 25 deg C (611...) at which Ksp eq is calculated double sol_corr_t = (-0.0602986 * (temp.Value * temp.Value) + 5.65504 * temp.Value + 507.332) / 611.021375; if (sol_corr_t > 1) { sol_corr_t = 1; } // double Ksp = 8.365e-5 + 2.101e-3 * IS - 7.09e-4 * IS * IS + 3.019e-4 * Math.pow(IS,3) - 6.969e-5 * Math.pow(IS,4); double lgKsp = 1 / (-0.022 * ((Math.Log10(IS) + 2.2954 * 2.2954)) - 0.2478); //DuPont 1992 double Ksp = Math.Pow(10, lgKsp); // Gettins these to to mol/L; 0.5 is the same convertion factor to mol from eq double IP = (CF * mol * sulfates.ValueMEq * sulfates.GetIonCharge()) * (CF * mol * calcium.ValueMEq * calcium.GetIonCharge()); //supersat is calculated as ratio of actual sol product to Ksp at this ionic strength with correction on temp double supersat = (sol_corr_t * IP / (Ksp)); return(Math.Round(supersat, 2)); }