[cig-commits] [commit] inversion, master, validate_MT_params: Reproduce two of the curves from fig 3b (a0acae0)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:25:57 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 a0acae025467612677f7e4fd7e90a45ed2d34a1b
Author: ian-r-rose <ian.r.rose at gmail.com>
Date: Tue Sep 2 19:18:22 2014 -0700
Reproduce two of the curves from fig 3b
>---------------------------------------------------------------
a0acae025467612677f7e4fd7e90a45ed2d34a1b
solidsolution_benchmarks.py | 45 +++++++++++++++++++++++++++++++++------------
1 file changed, 33 insertions(+), 12 deletions(-)
diff --git a/solidsolution_benchmarks.py b/solidsolution_benchmarks.py
index 5c7b921..62538e4 100644
--- a/solidsolution_benchmarks.py
+++ b/solidsolution_benchmarks.py
@@ -73,7 +73,7 @@ class mg_tschermaks_molecule (burnman.Mineral):
'Gprime_0': 1.5 ,
'eta_s_0': 2.5 }
-class orthopyroxene(burnman.SolidSolution):
+class orthopyroxene_a(burnman.SolidSolution):
def __init__(self):
# Name
self.name='orthopyroxene'
@@ -86,25 +86,46 @@ class orthopyroxene(burnman.SolidSolution):
burnman.SolidSolution.__init__(self, base_material, \
burnman.solutionmodel.SymmetricRegularSolution(base_material, enthalpy_interaction) )
+class orthopyroxene_b(burnman.SolidSolution):
+ def __init__(self):
+ # Name
+ self.name='orthopyroxene'
+
+ # Endmembers (cpx is symmetric)
+ base_material = [[enstatite(), '[Mg][Mg]Si2O6'],[mg_tschermaks_molecule(), '[Mg][Al]AlSiO6'] ]
-opx = orthopyroxene()
-opx.set_method('slb3')
+ # Interaction parameters
+ enthalpy_interaction=[[0.0]]
+
+ burnman.SolidSolution.__init__(self, base_material, \
+ burnman.solutionmodel.SymmetricRegularSolution(base_material, enthalpy_interaction) )
+
+opx_a = orthopyroxene_a()
+opx_a.set_method('slb3')
+opx_b = orthopyroxene_b()
+opx_b.set_method('slb3')
comp = np.linspace(0, 1.0, 100)
-entropy = np.empty_like(comp)
+entropy_a = np.empty_like(comp)
+entropy_b = np.empty_like(comp)
for i,c in enumerate(comp):
- opx.set_composition( np.array([1.0-c, c]) )
- opx.set_state( 0.0, 0.0 )
- entropy[i] = opx.solution_model.configurational_entropy( [1.0-c, c] )
+ opx_a.set_composition( np.array([1.0-c, c]) )
+ opx_a.set_state( 0.0, 0.0 )
+ entropy_a[i] = opx_a.solution_model.configurational_entropy( [1.0-c, c] )
+ opx_b.set_composition( np.array([1.0-c, c]) )
+ opx_b.set_state( 0.0, 0.0 )
+ entropy_b[i] = opx_b.solution_model.configurational_entropy( [1.0-c, c] )
-#fig1 = mpimg.imread('dicats.png') # Uncomment these two lines if you want to overlay the plot on a screengrab from SLB2011
-#plt.imshow(fig1, extent=[0.0, 1.0,-2.,8.0], aspect='auto')
-plt.plot( comp, entropy/1000., 'b--', linewidth=3.)
-#plt.xlim(0.0,1.0)
-#plt.ylim(-2.,8.0)
+#fig1 = mpimg.imread('configurational_entropy.png') # Uncomment these two lines if you want to overlay the plot on a screengrab from SLB2011
+#plt.imshow(fig1, extent=[0.0, 1.0,0.,17.0], aspect='auto')
+
+plt.plot( comp, entropy_a, 'b--', linewidth=3.)
+plt.plot( comp, entropy_b, 'r--', linewidth=3.)
+plt.xlim(0.0,1.0)
+plt.ylim(0.,17.0)
plt.ylabel("Configurational enthalpy of solution")
plt.xlabel("cats fraction")
plt.show()
More information about the CIG-COMMITS
mailing list