[cig-commits] [commit] split_mt: Add MT to benchmarks (ed9a385)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Dec 31 17:22:23 PST 2014


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

On branch  : split_mt
Link       : https://github.com/geodynamics/burnman/compare/478aeeb8db67a1aa0c9c36f4db0d99ae9c40d702...ed9a385174a51e2e2ee1612a92d058e4a53ae216

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

commit ed9a385174a51e2e2ee1612a92d058e4a53ae216
Author: Bob Myhill <myhill.bob at gmail.com>
Date:   Thu Jan 1 01:21:52 2015 +0000

    Add MT to benchmarks


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

ed9a385174a51e2e2ee1612a92d058e4a53ae216
 misc/benchmarks/endmember_benchmarks.py     | 33 +++++++++++++++++++++++-
 misc/ref/endmember_benchmarks.py.out        | 39 ++++++++++++++++++-----------
 misc/ref/example_compare_all_methods.py.out |  6 +++--
 3 files changed, 60 insertions(+), 18 deletions(-)

diff --git a/misc/benchmarks/endmember_benchmarks.py b/misc/benchmarks/endmember_benchmarks.py
index 9e333be..5a38aa5 100644
--- a/misc/benchmarks/endmember_benchmarks.py
+++ b/misc/benchmarks/endmember_benchmarks.py
@@ -26,7 +26,7 @@ for database, f, mineral in filemin:
     percentage_diff=[]
     PT=[]
 
-    print database
+    print 'Benchmarks for', database, 'database with method', fo.params['equation_of_state']
     print variables
 
     for line in data:
@@ -44,3 +44,34 @@ for database, f, mineral in filemin:
     print 'Maximum error in', database, 'database:'
     print variables[j], ':', percentage_diff[i,j], '% at', PT[i][0], 'GPa and', PT[i][1], 'K'
     print ''
+
+
+
+
+
+variables=['V','beta','rho']
+    
+fo = HP_2011_ds62.fo()
+fo.set_method('isomt')
+percentage_diff=[]
+PT=[]
+
+print 'Benchmarks for', database, 'database with method', fo.params['equation_of_state']
+print variables
+
+
+perplex_output=[[1., 4.3660, 0.77818E-06, 3222.4],[50000., 4.2104,  0.67868E-06,   3341.5],[100000., 4.0778, 0.60406E-06,   3450.2]]
+T=298.15
+for P, V, beta, rho in perplex_output:
+    fo.set_state(P*1.e5,T)
+    PT.append([P/1.e4,T])
+    diff=[p(fo.V, V/1.e5), p(fo.K_T, 1.e5/beta), p(fo.density(), rho)]
+    print diff
+    percentage_diff.append(diff)
+
+percentage_diff=np.array(percentage_diff)
+i,j = np.unravel_index(percentage_diff.argmax(), percentage_diff.shape)
+
+print 'Maximum error in', database, 'database:'
+print variables[j], ':', percentage_diff[i,j], '% at', PT[i][0], 'GPa and', PT[i][1], 'K'
+print ''
diff --git a/misc/ref/endmember_benchmarks.py.out b/misc/ref/endmember_benchmarks.py.out
index 831d157..71edf5b 100644
--- a/misc/ref/endmember_benchmarks.py.out
+++ b/misc/ref/endmember_benchmarks.py.out
@@ -1,22 +1,31 @@
-SLB2011
+<stdin>:55: UserWarning: Overriding database equation of state. From HPMT to MT
+Benchmarks for SLB2011 database with method slb3
 ['H', 'S', 'V', 'C_p', 'alpha', 'beta', 'rho']
-[0.00017148509892014698, 0.00020566819796686116, -6.5598772611849949e-05, 0.00014640008752798988, 0.00027556518589896622, 0.0043827796466224282, -0.001354442932608666, -0.00014632962194189593]
-[0.00019685886459735295, 0.00025378808486677562, -0.00016322224137845398, 0.00011900061347924991, 0.00010417859325950813, 0.0030498089172951237, -0.00038244791499655981, -0.00011576706302377327]
-[0.00018125900019975481, 0.00024829209509356535, -0.00019927842745282639, 0.00011291805464341472, 7.8442338085488322e-05, 0.0021608026720387036, 0.00028118132450503827, -0.00012634012623612462]
-[0.00017578323039745076, 0.00021077306066242643, 5.3708323519780804e-05, 0.00024376720400436997, 0.00058270681518875222, 0.005853217641471559, -0.0025494124158494612, -0.00023383764966910075]
-[0.00015364752022250882, 0.00022230791748262496, -6.3221631464568335e-05, 0.00016696384364635564, 0.00029169335220898869, 0.003908922026734739, -0.001071021635125739, -0.00016088977599755828]
-[0.0001565594843764675, 0.00025720583881992036, -0.00012616752064427476, 0.0001378174636901842, 0.00014701878404223894, 0.0027492646688382586, -0.00018806494077713522, -0.00016309260255612258]
+[0.00017156026591432655, 0.0002055800239183733, -6.4391026211448567e-05, 0.00014642709264959587, 0.00027680790069709911, 0.0043841690680523288, -0.0013546021287755491, -0.00014635661915870913]
+[0.00019693968210953938, 0.00025369136406720174, -0.00016201894894431014, 0.0001190220802494665, 0.00010540613355046799, 0.0030511461550334473, -0.00038256654155292315, -0.00011578852475445767]
+[0.00018134711534062106, 0.00024818416096770632, -0.00019807786482562421, 0.00011293589721412089, 7.9661183055479529e-05, 0.0021621085649858505, 0.00028108720366990924, -0.00012635796453805005]
+[0.00017593468781098434, 0.00021061820573071993, 5.4928297990081741e-05, 0.00024382205610615717, 0.00058400565280079613, 0.0058548312506006058, -0.0025497557954945751, -0.00023389247557671644]
+[0.00015380976302275195, 0.0002221378925287367, -6.2010193533312474e-05, 0.00016700593122388846, 0.00029295413078536919, 0.0039104066166459625, -0.0010712625593173701, -0.00016093184977696517]
+[0.00015673555260983956, 0.00025701493104433155, -0.00012496096893975688, 0.00013785176802343712, 0.00014826024239487015, 0.0027506791073032121, -0.00018824986014674881, -0.0001631268965670203]
 Maximum error in SLB2011 database:
-beta : 0.00585321764147 % at 0.0001 GPa and 1500.0 K
+beta : 0.0058548312506 % at 0.0001 GPa and 1500.0 K
 
-HP2011
+Benchmarks for HP2011 database with method mtait
 ['H', 'S', 'V', 'C_p', 'alpha', 'beta', 'rho']
-[-2.9024636289072286e-05, -3.2360402252901874e-05, -4.1841762552741876e-06, 3.2779890383803238e-06, 2.8219846608272208e-05, -5.2230444697115247e-06, 1.4709612379152357e-05, 7.9179853787908403e-06]
-[-2.9829157740175873e-05, -3.6100954339697318e-05, 1.3348844898853637e-05, 5.9236067626249673e-06, -0.002190613029488839, -4.3379138746973619e-06, 3.2485250010907442e-06, 1.5934546424522513e-06]
-[-8.2312868759258885e-06, -7.9242210447737671e-06, -1.0160089211837795e-05, 3.9920863571532298e-06, -0.0040001583155114878, 8.8884137647948098e-06, 3.7521320091721124e-06, -1.0960401391963001e-05]
-[-2.1855451582412608e-05, -3.0642377062546919e-05, 1.1106190403936162e-05, 7.938855102628387e-06, 1.5336131947865544e-05, -2.1594765220940355e-05, 1.4135834709045702e-05, -1.062176812350849e-06]
-[-3.9168541354580232e-07, -3.5314947591105125e-06, 1.0408176287872769e-05, 5.2284902774537911e-07, -0.0010284661696652393, -7.83322200855043e-06, -1.5478849654163038e-06, -8.1706967115345422e-06]
-[-3.3334711859346958e-05, -4.2563926344520567e-05, -4.6391701198607592e-06, -2.1759888331371686e-06, -0.0018958747944843668, -8.1075409548413112e-06, 5.2313211540128076e-06, -1.091422910489136e-05]
+[-2.9024636289072286e-05, -3.2360402252901874e-05, -4.1841762552741876e-06, 3.2779890383803238e-06, 2.8219846608272208e-05, -5.2230444698820807e-06, 1.4709612379152357e-05, 7.9179853787908403e-06]
+[-2.9829157740175873e-05, -3.6100954339697318e-05, 1.3348844898853637e-05, 5.9236067626249673e-06, -0.002190613029488839, -4.3379138748961589e-06, 3.2485250010907442e-06, 1.5934546424522513e-06]
+[-8.2312868759258885e-06, -7.9242210447737671e-06, -1.0160089211837795e-05, 3.9920863571532298e-06, -0.0040001583155114878, 8.8884137646818055e-06, 3.7521320091721124e-06, -1.0960401391963001e-05]
+[-2.1855451582412608e-05, -3.0642377062546919e-05, 1.1106190403936162e-05, 7.938855102628387e-06, 1.5336131947865544e-05, -2.1594765221095294e-05, 1.4135834709045702e-05, -1.062176812350849e-06]
+[-3.9168541354580232e-07, -3.5314947591105125e-06, 1.0408176287872769e-05, 5.2284902774537911e-07, -0.0010284661696652393, -7.8332220087337872e-06, -1.5478849654163038e-06, -8.1706967115345422e-06]
+[-3.3334711859346958e-05, -4.2563926344520567e-05, -4.6391701198607592e-06, -2.1759888331371686e-06, -0.0018958747944843668, -8.1075409550519785e-06, 5.2313211540128076e-06, -1.091422910489136e-05]
 Maximum error in HP2011 database:
 alpha : 2.82198466083e-05 % at 0.0001 GPa and 1000.0 K
 
+Benchmarks for HP2011 database with method isomt
+['V', 'beta', 'rho']
+[7.7820925661860693e-07, 3.5713065344384812e-05, -2.292568834341453e-05]
+[4.0270311222739116e-06, 3.7028365245184261e-08, -2.2393157908795917e-05]
+[-1.0165946411932932e-05, -5.100934150587664e-06, 4.1642729542407776e-06]
+Maximum error in HP2011 database:
+beta : 3.57130653444e-05 % at 0.0001 GPa and 298.15 K
+
diff --git a/misc/ref/example_compare_all_methods.py.out b/misc/ref/example_compare_all_methods.py.out
index 607b256..1480ecf 100644
--- a/misc/ref/example_compare_all_methods.py.out
+++ b/misc/ref/example_compare_all_methods.py.out
@@ -1,10 +1,12 @@
 BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From SLB2 to MGD3
   phase.set_method(method)
+BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From MGD3 to SLB2
+  phase.set_method(method)
 BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From SLB2 to SLB3
   phase.set_method(method)
-BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From SLB2 to BM2
+BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From SLB3 to BM2
   phase.set_method(method)
-BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From SLB2 to BM3
+BURNMAN/burnman/composite.py: UserWarning: Overriding database equation of state. From BM2 to BM3
   phase.set_method(method)
 Calculations are done for:
 Composite:



More information about the CIG-COMMITS mailing list