]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Fix activity coefficient calculation in "Indifferent electrolyte" problem in solubili...
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 26 Dec 2014 03:22:51 +0000 (04:22 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 26 Dec 2014 03:22:51 +0000 (04:22 +0100)
src/problem_generators/problem_generator-solubility_suite.adb

index 79f1f8741645bf7fcd75ce510358268dc6db69e7..a99af415639e50d36a14dba7f7cadc487a5e11d3 100644 (file)
@@ -410,8 +410,8 @@ package body Solubility_Suite is
     Ions_Other(1) := (Concentration => Prob_Data.C_EC, Charge => 1.0);
     Ions_Other(2) := (Concentration => Prob_Data.C_EC, Charge => 1.0);
     I := Calculate_Ionic_Strength(Ions_Other);
-    GM := Calculate_Activity_Coefficient(1.0, I);
-    GN := Calculate_Activity_Coefficient(1.0, I);
+    GM := Calculate_Activity_Coefficient(Prob_Data.N, I);
+    GN := Calculate_Activity_Coefficient(Prob_Data.M, I);
     C := Calculate_Sat_Concentration(Prob_Data.M, Prob_Data.N, Prob_Data.C_Ks, GM, GN);
 
     if Ionic_Strength then
@@ -428,8 +428,8 @@ package body Solubility_Suite is
        Ions_All(4) := (Concentration => C * Prob_Data.N, Charge => Prob_Data.M);
        I_All := Calculate_Ionic_Strength(Ions_All);
 
-       GM := Calculate_Activity_Coefficient(Prob_Data.M, I_All);
-       GN := Calculate_Activity_Coefficient(Prob_Data.N, I_All);
+       GM := Calculate_Activity_Coefficient(Prob_Data.N, I_All);
+       GN := Calculate_Activity_Coefficient(Prob_Data.M, I_All);
 
        C := Calculate_Sat_Concentration(Prob_Data.M, Prob_Data.N, Prob_Data.C_Ks, GM, GN);
       end;