[cig-commits] [commit] add_thermodynamic_potentials: Added parsers for Holland et al., 2013 data table (ee44b8c)

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


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

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

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

commit ee44b8ca7204bb721faec4a40a9605e83426ed7e
Author: Bob Myhill <myhill.bob at gmail.com>
Date:   Sun Sep 7 17:24:14 2014 +0100

    Added parsers for Holland et al., 2013 data table


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

ee44b8ca7204bb721faec4a40a9605e83426ed7e
 ...ta_to_burnman.py => HHPH2013data_to_burnman.py} | 43 +++++++++++----------
 .../raw_endmember_datasets/HHPH2013_endmembers.dat | 44 ++++++++++++++++++++++
 burnman/minerals/{HPHH_2013.py => HHPH_2013.py}    |  0
 burnman/minerals/__init__.py                       |  2 +-
 4 files changed, 66 insertions(+), 23 deletions(-)

diff --git a/burnman/SLBdata_to_burnman.py b/burnman/HHPH2013data_to_burnman.py
similarity index 64%
copy from burnman/SLBdata_to_burnman.py
copy to burnman/HHPH2013data_to_burnman.py
index 51425e8..15ee214 100644
--- a/burnman/SLBdata_to_burnman.py
+++ b/burnman/HHPH2013data_to_burnman.py
@@ -15,7 +15,7 @@ def read_dataset(datafile):
         ds.append(line.decode('utf-8').split())
     return ds
 
-ds=read_dataset('data/raw_endmember_datasets/slb_2011.txt')
+ds=read_dataset('HHPH2013_endmembers.dat')
 
 print 'from burnman.mineral import Mineral'
 print 'from burnman.processchemistry import read_masses, dictionarize_formula, formula_mass'
@@ -23,19 +23,15 @@ print ''
 print 'atomic_masses=read_masses()'
 print ''
 
-param_scales = [ -1., -1., #not nubmers, so we won't scale
-                  1.e3, 1.e3, #KJ -> J
-                  1.e-6, 1.e-6, #cm^3/mol -> m^3/mol
-                  1.e9, 1.e9, #GPa -> Pa
-                  1.0, 1.0, # no scale for K'
-                  1.0, 1.0, # no scale for Debye
-                  1.0, 1.0, # no scale for gruneisen
-                  1.0, 1.0, # no scale for q
-                  1.e9, 1.e9, #GPa -> Pa
-                  1.0, 1.0, # no scale for G'
-                  1.0, 1.0] # no scale for eta_s 
-                         
-           
+param_scales = [  -1., -1., #not nubmers, so we won't scale
+                  1.e3, 1.e3, #kJ -> J
+                  1.0, # J/K/mol
+                  1.e-5, # kJ/kbar/mol -> m^3/mol
+                  1.e3, 1.e-2, 1.e3, 1.e3, # kJ -> J and table conversion for b
+                  1.e-5, # table conversion
+                  1.e8, # kbar -> Pa
+                  1.0, # no scale for K'0
+                  1.e-8] #GPa -> Pa # no scale for eta_s 
            
 
 formula='0'
@@ -50,18 +46,21 @@ for idx, m in enumerate(ds):
         print '       self.params = {'
         print ''.join(['            \'name\': \'', m[0], '\','])
         print '            \'formula\': formula,'
-        print '            \'equation_of_state\': \'slb3\','
+        print '            \'equation_of_state\': \'mtait\','
+        for pid, param in enumerate(m):
+            if pid > 1 and pid != 3 and pid<6:
+                print '            \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
+
+        print '            \'Cp:\'', [round(float(m[i])*param_scales[i],10) for i in [6, 7, 8, 9]], ','
         for pid, param in enumerate(m):
-            if pid > 1 and pid%2 == 0:
+            if pid > 9:
                 print '            \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
+
+
+
         print '            \'n\': sum(formula.values()),'
         print '            \'molar_mass\': formula_mass(formula, atomic_masses)}'
         print ''
         print '       self.uncertainties = {'
-        for pid, param in enumerate(m):
-            if pid > 1 and pid%2 == 1 and pid<21:
-                print '            \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
-        pid=21
-        param=m[pid]
-        print '            \''+param_names[pid]+'\':', float(param)*param_scales[pid], '}'
+        print '            \''+param_names[3]+'\':', float(m[3])*param_scales[3], '}'
         print ''
diff --git a/burnman/data/raw_endmember_datasets/HHPH2013_endmembers.dat b/burnman/data/raw_endmember_datasets/HHPH2013_endmembers.dat
new file mode 100644
index 0000000..00d609a
--- /dev/null
+++ b/burnman/data/raw_endmember_datasets/HHPH2013_endmembers.dat
@@ -0,0 +1,44 @@
+name  formula             H_0  err_H_0     S_0    V_0   Cp_a   Cp_b   Cp_c  Cp_d a_0 K_0 Kprime_0 Kdprime_0
+fo    Mg2SiO4        	 -2172.45 0.53   95.10  4.366 0.2333  0.1494  -603.8 -1.8697 2.85 1285.0 3.84 -0.0030
+fa    Fe2SiO4        	 -1477.74 0.64  151.00  4.631 0.2011  1.7330 -1960.6 -0.9009 2.82 1256.0 4.68 -0.0037
+mwd   Mg2SiO4   	 -2138.08 0.62   93.90  4.051 0.2087  0.3942 -1709.5 -1.3028 2.37 1726.0 3.84 -0.0022
+fwd   Fe2SiO4   	 -1467.92 0.90  146.00  4.321 0.2011  1.7330 -1960.6 -0.9009 2.73 1690.0 4.35 -0.0026
+mrw   Mg2SiO4   	 -2126.84 0.63   90.00  3.949 0.2133  0.2690 -1410.4 -1.4959 2.01 1781.0 4.35 -0.0024
+frw   Fe2SiO4   	 -1471.76 0.71  140.00  4.203 0.1668  4.2610 -1705.4 -0.5414 2.22 1977.0 4.92 -0.0025
+mpv   MgSiO3    	 -1442.31 0.47   62.60  2.445 0.1493  0.2918 -2983.0 -0.7991 1.87 2510.0 4.14 -0.0016
+fpv   FeSiO3    	 -1082.91 0.76   95.00  2.534 0.1332  1.0830 -3661.4 -0.3147 1.87 2810.0 4.14 -0.0016
+apv   AlAlO3    	 -1619.99 0.77   51.80  2.540 0.1395  0.5890 -2460.6 -0.5892 1.80 2030.0 4.00 -0.0020
+npv   Na0.5Al0.5SiO3   	 -1365.00 10.24  63.00  2.334 0.1350  0.8460 -1850.3 -0.6008 1.80 2030.0 4.00 -0.0020
+cpv   CaSiO3    	 -1533.59 1.09   74.50  2.745 0.1593  0.0000  -967.3 -1.0754 2.00 2360.0 3.90 -0.0016
+mak   MgSiO3    	 -1489.61 0.42   59.30  2.635 0.1478  0.2015 -2395.0 -0.8018 2.12 2110.0 4.55 -0.0022
+fak   FeSiO3    	 -1142.13 9.63   91.50  2.760 0.1003  1.3328 -4364.9  0.4198 2.12 2180.0 4.55 -0.0022
+maj   Mg4Si4O12 	 -6041.55 2.26  260.20 11.457 0.7136 -0.0997 -1158.2 -6.6223 1.83 1600.0 4.56 -0.0028
+nagt Mg2NaAlSiSi3O12 	 -5985.00 5.12  260.60 11.090 0.6208  1.1200 -3755.9 -4.4213 2.10 1700.0 4.00 -0.0023
+py   Mg3Al2Si3O12    	 -6281.77 0.99  269.50 11.313 0.6335  0.0000 -5196.1 -4.3152 2.37 1743.0 4.05 -0.0023
+alm  Fe3Al2Si3O12    	 -5260.75 1.20  342.00 11.525 0.6773  0.0000 -3772.7 -5.0440 2.12 1900.0 2.98 -0.0016
+gr   Ca3Al2Si3O12    	 -6643.05 1.37  255.00 12.535 0.6260  0.0000 -5779.2 -4.0029 2.20 1720.0 5.53 -0.0032
+en   Mg2Si2O6        	 -3090.10 0.62  132.50  6.262 0.3562 -0.2990  -596.9 -3.1853 2.27 1059.0 8.65 -0.0082
+cen  Mg2Si2O6        	 -3090.99 0.62  132.00  6.264 0.3060 -0.3793 -3041.7 -1.8521 2.11 1059.0 8.65 -0.0082
+hen  Mg2Si2O6        	 -3082.61 0.62  131.70  6.099 0.3562 -0.2990  -596.9 -3.1853 2.26 1500.0 5.50 -0.0036
+hfs  Fe2Si2O6        	 -2380.81 0.79  189.00  6.405 0.3987 -0.6579  1290.1 -4.0580 2.37 1500.0 5.50 -0.0036
+fs   Fe2Si2O6        	 -2388.76 0.75  189.90  6.592 0.3987 -0.6579  1290.1 -4.0580 3.26 1010.0 4.08 -0.0040
+mgts MgAl2SiO6       	 -3196.60 0.69  131.00  6.050 0.3714 -0.4082  -398.4 -3.5471 2.17 1028.0 8.55 -0.0083
+di   CaMgSi2O6       	 -3201.82 0.58  142.90  6.619 0.3145  0.0041 -2745.9 -2.0201 2.73 1192.0 5.19 -0.0044
+hed  CaFeSi2O6       	 -2842.12 0.88  175.00  6.795 0.3402  0.0812 -1047.8 -2.6467 2.38 1192.0 3.97 -0.0033
+jd   NaAlSiO6        	 -3025.29 1.52  133.50  6.040 0.3194  0.3616 -1173.9 -2.4695 2.10 1281.0 3.81 -0.0030
+cats CaAl2SiO6       	 -3310.11 0.75  135.00  6.356 0.3476 -0.6974 -1781.6 -2.7575 2.08 1192.0 5.19 -0.0044
+stv  SiO2            	  -876.82 0.42   24.00  1.401 0.0681  0.6010 -1978.2 -0.0821 1.58 3090.0 4.60 -0.0015
+macf MgAl2O4        	 -2246.42 1.08   80.00  3.614 0.2000  0.6252 -2996.4 -0.8884 1.93 2120.0 4.00 -0.0017
+mscf Mg2SiO4        	 -2061.13 1.34   87.50  3.649 0.2133  0.2690 -1410.4 -1.4959 2.01 1850.0 4.00 -0.0017
+fscf Fe2SiO4        	 -1405.50 10.24 143.40  3.914 0.1811  1.8526 -2767.2 -0.5271 2.01 1850.0 4.00 -0.0017
+nacf NaAlSiO6       	 -1965.55 3.44  110.00  3.631 0.2727 -1.2398       0 -2.7631 2.10 1850.0 4.60 -0.0025
+cacf CaAl2O4        	 -2325.60 10.24  87.60  3.976 0.1919  0.9563 -3211.3 -0.6402 1.93 1900.0 4.00 -0.0021
+manal Mg3Al6O12     	 -6796.63 5.12  250.00 11.166 0.6000  1.8756 -8989.2 -2.6652 1.93 1840.0 4.00 -0.0022
+nanal NaMg2SiAl5O12 	 -6610.27 5.12  280.00 11.322 0.6727  0.0106 -5992.8 -4.5399 2.01 1840.0 4.00 -0.0022
+msnal MgMg2Si3Mg3O12 	 -6172.38 5.12  272.50 11.061 0.6399  0.8070 -4231.2 -4.4877 2.10 1850.0 4.00 -0.0022
+fsnal FeFe2Si3Fe3O12 	 -4146.00 10.24 440.20 11.856 0.5433  5.5578 -8301.6 -1.5813 2.10 1850.0 4.00 -0.0022
+canal CaMg2Al6O12    	 -6840.00 5.12  257.60 11.159 0.5919  2.2067 -9204.1 -2.4170 1.93 1770.0 4.00 -0.0022
+per   MgO            	  -601.57 0.26   26.50  1.125 0.0605  0.0362  -535.8 -0.2992 3.11 1616.0 3.95 -0.0024
+fper  FeO            	  -262.24 0.68   58.60  1.206 0.0444  0.8280 -1214.2  0.1852 3.22 1520.0 4.90 -0.0032
+cor   Al2O3          	 -1675.25 0.70   50.90  2.558 0.1395  0.5890 -2460.6 -0.5892 1.80 2540.0 4.34 -0.0017
+mcor  MgSiO3         	 -1468.00 0.88   59.30  2.635 0.1478  0.2015 -2395.0 -0.8018 2.12 2110.0 4.55 -0.0022
diff --git a/burnman/minerals/HPHH_2013.py b/burnman/minerals/HHPH_2013.py
similarity index 100%
rename from burnman/minerals/HPHH_2013.py
rename to burnman/minerals/HHPH_2013.py
diff --git a/burnman/minerals/__init__.py b/burnman/minerals/__init__.py
index 5e5dc21..6f53c4d 100644
--- a/burnman/minerals/__init__.py
+++ b/burnman/minerals/__init__.py
@@ -22,7 +22,7 @@ import SLB_2005
 import HP_2011
 import HP_2011_fluids
 import HP_2011_ds62
-import HPHH_2013
+import HHPH_2013
 import Murakami_2013
 import Metal_Metal_oxides
 import other



More information about the CIG-COMMITS mailing list