From: Michal MalĂ˝ Date: Fri, 26 Dec 2014 03:22:51 +0000 (+0100) Subject: Fix activity coefficient calculation in "Indifferent electrolyte" problem in solubili... X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=31b61f3a2a7a59038f040d83fb49e3c199e15e9d;p=Nine-Q.git Fix activity coefficient calculation in "Indifferent electrolyte" problem in solubility suite --- diff --git a/src/problem_generators/problem_generator-solubility_suite.adb b/src/problem_generators/problem_generator-solubility_suite.adb index 79f1f87..a99af41 100644 --- a/src/problem_generators/problem_generator-solubility_suite.adb +++ b/src/problem_generators/problem_generator-solubility_suite.adb @@ -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;