[cig-commits] [commit] add_thermodynamic_potentials: Split configurational entropy from ideal gibbs (9efbcdc)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Dec 9 09:55:27 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : add_thermodynamic_potentials
Link       : https://github.com/geodynamics/burnman/compare/2e5646d93cedbbf8eae54cc37cffc14e0aa85180...d5ddad03ff9f30f5a4efaddb4e3ec585ea1a7c51

>---------------------------------------------------------------

commit 9efbcdc65abde2fa82863c7b8979e0c513a03894
Author: Bob Myhill <myhill.bob at gmail.com>
Date:   Wed Sep 3 02:18:57 2014 +0200

    Split configurational entropy from ideal gibbs


>---------------------------------------------------------------

9efbcdc65abde2fa82863c7b8979e0c513a03894
 burnman/solutionmodel.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/burnman/solutionmodel.py b/burnman/solutionmodel.py
index 3762107..ad4557f 100644
--- a/burnman/solutionmodel.py
+++ b/burnman/solutionmodel.py
@@ -90,18 +90,18 @@ class IdealSolution ( SolutionModel ):
     def excess_gibbs_free_energy( self, pressure, temperature, molar_fractions ):
         return self.ideal_gibbs_excess( temperature, molar_fractions )
 
-    def ideal_gibbs_excess ( self, temperature, molar_fractions ): 
-
+    def configurational_entropy (self, molar_fractions):
         activities = self.ideal_activities( molar_fractions )
         gibbs_excess_ideal = 0.0
 
         tol = 1.e-10
         for i in range(self.n_endmembers):
             if molar_fractions[i] > tol:
-                gibbs_excess_ideal = gibbs_excess_ideal +  \
-                                     molar_fractions[i] * R * temperature * np.log(activities[i])
+                configurational_entropy = configurational_entropy -  \
+                                     molar_fractions[i] * R * np.log(activities[i])
 
-        return gibbs_excess_ideal
+    def  ideal_gibbs_excess( self, temperature, molar_fractions ): 
+        return temperature*configurational_entropy(molar_fractions)
 
     def ideal_activities ( self, molar_fractions ):
 
@@ -122,8 +122,7 @@ class IdealSolution ( SolutionModel ):
  
 class AsymmetricRegularSolution ( IdealSolution ):
     """
-    Solution model implementing the Asymmetric Van Laar formulation
-    (best reference?).
+    Solution model implementing the asymmetric regular solution model formulation (Holland and Powell, 2003)
     """
 
     def __init__( self, endmembers, alphas, enthalpy_interaction, volume_interaction = None, entropy_interaction = None ): 
@@ -156,6 +155,9 @@ class AsymmetricRegularSolution ( IdealSolution ):
         #initialize ideal solution model
         IdealSolution.__init__(self, endmembers )
         
+    def configurational_entropy( self, molar_fractions ):
+        return IdealSolution.configurational_entropy( self, molar_fractions )
+
     def excess_gibbs_free_energy( self, pressure, temperature, molar_fractions ):
 
         ideal_gibbs = IdealSolution.ideal_gibbs_excess( self, temperature, molar_fractions )
@@ -185,7 +187,7 @@ class AsymmetricRegularSolution ( IdealSolution ):
 
 class SymmetricRegularSolution ( AsymmetricRegularSolution ):
     """
-    Solution model implementing the Symmetric Van Laar solution
+    Solution model implementing the symmetric regular solution model
     """
     def __init__( self, endmembers, enthalpy_interaction, volume_interaction = None, entropy_ineraction = None ):
         #symmetric case if all the alphas are equal?



More information about the CIG-COMMITS mailing list