[cig-commits] [commit] add_thermodynamic_potentials: Added temporary test for previously buggy gibbs excesses (897f9c5)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Dec 9 09:57:22 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : add_thermodynamic_potentials
Link : https://github.com/geodynamics/burnman/compare/2e5646d93cedbbf8eae54cc37cffc14e0aa85180...d5ddad03ff9f30f5a4efaddb4e3ec585ea1a7c51
>---------------------------------------------------------------
commit 897f9c5493763136a1c449175a2f09f0adecdb49
Author: Bob Myhill <myhill.bob at gmail.com>
Date: Sun Oct 5 23:13:57 2014 +0200
Added temporary test for previously buggy gibbs excesses
>---------------------------------------------------------------
897f9c5493763136a1c449175a2f09f0adecdb49
solidsolution_benchmarks.py | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/solidsolution_benchmarks.py b/solidsolution_benchmarks.py
index 67eef9c..92fef5d 100644
--- a/solidsolution_benchmarks.py
+++ b/solidsolution_benchmarks.py
@@ -148,7 +148,7 @@ class orthopyroxene_long_dashed(burnman.SolidSolution):
base_material = [[enstatite(), 'Mg[Mg]Si2O6'],[mg_tschermaks_molecule(), '[Mg1/2Al1/2]2AlSiO6'] ]
# Interaction parameters
- enthalpy_interaction=[[0.0]]
+ enthalpy_interaction=[[10.0e3]]
burnman.SolidSolution.__init__(self, base_material, \
burnman.solutionmodel.SymmetricRegularSolution(base_material, enthalpy_interaction) )
@@ -280,4 +280,23 @@ plt.ylabel("Excess enthalpy of solution (kJ/mol)")
plt.xlabel("cats fraction")
plt.show()
-# Excess volume of solution
+# Check endmember excess Gibbs goes to zero...
+
+opx = orthopyroxene_long_dashed()
+opx.set_method('slb3')
+
+comp = np.linspace(0, 1.0, 100)
+gibbs = np.empty_like(comp)
+
+for i,c in enumerate(comp):
+ opx.set_composition( np.array([1.0-c, c]) )
+ opx.set_state( 0.0, 2000.0 )
+ gibbs[i] = opx.excess_gibbs
+
+
+plt.plot( comp, gibbs/1000., 'b--', linewidth=3.)
+plt.xlim(0.0,1.0)
+plt.ylim(-2.,8.0)
+plt.ylabel("Excess enthalpy of solution (kJ/mol)")
+plt.xlabel("mgts fraction")
+plt.show()
More information about the CIG-COMMITS
mailing list