[cig-commits] [commit] add_thermodynamic_potentials: Added Re-ReO2 buffer to test_chemical_potentials example (9aa9291)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Dec 9 09:56:28 PST 2014


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

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

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

commit 9aa9291e1d1cb7446aebed2d9db8f308898ead60
Author: Bob Myhill <myhill.bob at gmail.com>
Date:   Fri Sep 5 17:58:42 2014 +0200

    Added Re-ReO2 buffer to test_chemical_potentials example


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

9aa9291e1d1cb7446aebed2d9db8f308898ead60
 burnman/test_chemicalpotentials.py | 44 ++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/burnman/test_chemicalpotentials.py b/burnman/test_chemicalpotentials.py
index e22bc76..df86cb9 100644
--- a/burnman/test_chemicalpotentials.py
+++ b/burnman/test_chemicalpotentials.py
@@ -16,9 +16,9 @@ T=1000.
 fa=minerals.HP_2011_ds62.fa()
 mt=minerals.HP_2011_ds62.mt()
 qtz=minerals.HP_2011_ds62.q()
-assemblage=[fa, mt, qtz]
+FMQ=[fa, mt, qtz]
 
-for mineral in assemblage:
+for mineral in FMQ:
     mineral.set_method('mtait')
     mineral.set_state(P, T)
 
@@ -32,7 +32,7 @@ at 0.1 GPa, 1000 K
 
 component_formulae=['FeO', 'SiO2', 'O2']
 component_formulae_dict=[dictionarize_formula(f) for f in component_formulae]
-chem_potentials=chemicalpotentials(assemblage, component_formulae_dict)
+chem_potentials=chemicalpotentials(FMQ, component_formulae_dict)
 
 for idx, component_formula in enumerate(component_formulae):
     print "mu("+component_formula+"):", chem_potentials[idx]
@@ -40,27 +40,43 @@ print ''
 
 
 '''
-Here we find the oxygen fugacity of the assemblage
-Fugacity is often defined relative to some reference pressure
+Here we find the oxygen fugacity of the FMQ assemblage
+and also the Re-ReO2 buffer
+
+Fugacity is often defined relative to a material at 
+some fixed reference pressure
 Here we use room pressure, 100 kPa
 '''
-O2=minerals.HP_2011_fluids.O2()
-O2.set_method('cork')
+O2_gas=minerals.HP_2011_fluids.O2()
+O2_gas.set_method('cork')
+
+rhenium=minerals.Metal_Metal_oxides.Re()
+rheniumIVoxide=minerals.Metal_Metal_oxides.ReO2()
+ReReO2buffer=[rhenium, rheniumIVoxide]
+
+for mineral in ReReO2buffer:
+    mineral.set_method('mtait')
+
 
 Pr=1.e5
-component=dictionarize_formula('O2')
+O2=dictionarize_formula('O2')
 
-temperatures = np.linspace(600, 1400, 100)
-log10fO2 = np.empty_like(temperatures)
+temperatures = np.linspace(200, 2400, 100)
+log10fO2_FMQ = np.empty_like(temperatures)
+log10fO2_ReReO2buffer = np.empty_like(temperatures)
 invT = np.empty_like(temperatures)
 for i, T in enumerate(temperatures):
-    O2.set_state(Pr, T+273.15)
-    for mineral in assemblage:
+    O2_gas.set_state(Pr, T+273.15)
+    for mineral in FMQ:
+        mineral.set_state(P, T+273.15)
+    for mineral in ReReO2buffer:
         mineral.set_state(P, T+273.15)
     invT[i] = 10000./(T+273.15)
-    log10fO2[i] = np.log10(fugacity(component, O2, assemblage))
+    log10fO2_FMQ[i] = np.log10(fugacity(O2, O2_gas, FMQ))
+    log10fO2_ReReO2buffer[i] = np.log10(fugacity(O2, O2_gas, ReReO2buffer))
 
-plt.plot(invT, log10fO2, 'b--', linewidth=3.)
+plt.plot(invT, log10fO2_FMQ, 'b--', linewidth=3.)
+plt.plot(invT, log10fO2_ReReO2buffer, 'r--', linewidth=3.)
 plt.xlim(4.0,20.0)
 plt.ylim(-36.,4.)
 plt.ylabel("log_10 (fO2)")



More information about the CIG-COMMITS mailing list