[cig-commits] [commit] update_examples: Updated chemical potential benchmarks (c7f47cd)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Dec 31 13:34:31 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : update_examples
Link : https://github.com/geodynamics/burnman/compare/a0c99715b027e54853c088533e5f9519ab8beb85...c7f47cd1cc4dc701d316527d9171bd0fae46e399
>---------------------------------------------------------------
commit c7f47cd1cc4dc701d316527d9171bd0fae46e399
Author: Bob Myhill <myhill.bob at gmail.com>
Date: Wed Dec 31 21:34:11 2014 +0000
Updated chemical potential benchmarks
>---------------------------------------------------------------
c7f47cd1cc4dc701d316527d9171bd0fae46e399
misc/benchmarks/chemical_potential_benchmarks.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/misc/benchmarks/chemical_potential_benchmarks.py b/misc/benchmarks/chemical_potential_benchmarks.py
index e5b7d67..a2b9009 100644
--- a/misc/benchmarks/chemical_potential_benchmarks.py
+++ b/misc/benchmarks/chemical_potential_benchmarks.py
@@ -63,15 +63,13 @@ mt=burnman.minerals.HP_2011_ds62.mt()
qtz=burnman.minerals.HP_2011_ds62.q()
FMQ=[fa, mt, qtz]
-O2_gas=burnman.minerals.HP_2011_fluids.O2()
-O2_gas.set_method('cork')
+oxygen=burnman.minerals.HP_2011_fluids.O2()
rhenium=Re()
rheniumIVoxide=ReO2()
ReReO2buffer=[rhenium, rheniumIVoxide]
Pr=1.e5
-O2=dictionarize_formula('O2')
temperatures = np.linspace(900., 1420., 100)
log10fO2_FMQ_ONeill1987 = np.empty_like(temperatures)
@@ -80,7 +78,7 @@ invT = np.empty_like(temperatures)
P=1.e5
for i, T in enumerate(temperatures):
- O2_gas.set_state(Pr, T)
+ oxygen.set_state(Pr, T)
for mineral in FMQ:
mineral.set_state(P, T)
for mineral in ReReO2buffer:
@@ -90,7 +88,7 @@ for i, T in enumerate(temperatures):
log10fO2_FMQ_ONeill1987[i] = np.log10(np.exp((muO2_FMQ_ONeill1987)/(constants.gas_constant*T)))
invT[i] = 10000./(T)
- log10fO2_FMQ[i] = np.log10(fugacity(O2, O2_gas, FMQ))
+ log10fO2_FMQ[i] = np.log10(fugacity(oxygen, FMQ))
plt.plot(temperatures, log10fO2_FMQ_ONeill1987, 'k', linewidth=3., label='FMQ (O\'Neill (1987)')
plt.plot(temperatures, log10fO2_FMQ, 'b--', linewidth=3., label='FMQ (HP 2011 ds62)')
@@ -102,7 +100,7 @@ log10fO2_ReReO2buffer = np.empty_like(temperatures)
for i, T in enumerate(temperatures):
- O2_gas.set_state(Pr, T)
+ oxygen.set_state(Pr, T)
for mineral in FMQ:
mineral.set_state(P, T)
for mineral in ReReO2buffer:
@@ -112,7 +110,7 @@ for i, T in enumerate(temperatures):
log10fO2_Re_PO1994[i] = np.log10(np.exp((muO2_Re_PO1994)/(constants.gas_constant*T)))
invT[i] = 10000./(T)
- log10fO2_ReReO2buffer[i] = np.log10(fugacity(O2, O2_gas, ReReO2buffer))
+ log10fO2_ReReO2buffer[i] = np.log10(fugacity(oxygen, ReReO2buffer))
plt.plot(temperatures, log10fO2_Re_PO1994, 'k', linewidth=3., label='Re-ReO2 (Pownceby and O\'Neill (1994)')
plt.plot(temperatures, log10fO2_ReReO2buffer, 'r--', linewidth=3., label='Re-ReO2 (HP 2011 ds62)')
More information about the CIG-COMMITS
mailing list