[cig-commits] [commit] inversion, master, validate_MT_params: Split configurational entropy from ideal gibbs (26bdb24)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:25:50 PST 2014
Repository : https://github.com/geodynamics/burnman
On branches: inversion,master,validate_MT_params
Link : https://github.com/geodynamics/burnman/compare/80c2a295c42dfdb38f83f6c1334bf7d8f97a8463...409647ff05dfad6a686198cac1481bd46b5e2e62
>---------------------------------------------------------------
commit 26bdb247c10ffec264a6c070eb80a0ac79d77d00
Author: Bob Myhill <myhill.bob at gmail.com>
Date: Wed Sep 3 02:18:57 2014 +0200
Split configurational entropy from ideal gibbs
>---------------------------------------------------------------
26bdb247c10ffec264a6c070eb80a0ac79d77d00
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