[cig-commits] [commit] inversion, master, validate_MT_params: Add benchmark, and make bugfix associated with doing benchmark (1529078)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:26:56 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 15290788977a86ce87af7cf43bfa4f4e5ee36b83
Author: ian-r-rose <ian.r.rose at gmail.com>
Date: Tue Dec 9 11:43:30 2014 -0800
Add benchmark, and make bugfix associated with doing benchmark
>---------------------------------------------------------------
15290788977a86ce87af7cf43bfa4f4e5ee36b83
burnman/data/input_minphys/slb_fig7.txt | 48 ++++++++++++++++-----------------
burnman/slb.py | 2 +-
tests/benchmark.py | 5 ++++
3 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/burnman/data/input_minphys/slb_fig7.txt b/burnman/data/input_minphys/slb_fig7.txt
index 2be3f5a..a48dedb 100644
--- a/burnman/data/input_minphys/slb_fig7.txt
+++ b/burnman/data/input_minphys/slb_fig7.txt
@@ -1,25 +1,25 @@
# Data from Stixrude & Lithgow-Bertelloni 2005, figure 7, personal communications
-Pi depth Ti rho KT KS G VB VS VP vol alpha cP gr
-0.00 -0.00 0.00 3.23638 130.45227 130.45227 83.05679 6.34887 5.06592 8.63285 43.47301 0.00000 0.00000 0.98683
-0.00 -0.00 100.00 3.23603 130.34079 130.39293 83.00425 6.34776 5.06459 8.63100 43.47765 0.40527 0.16544 0.98705
-0.00 -0.00 200.00 3.23288 129.46305 129.85168 82.52586 6.33767 5.05243 8.61406 43.52008 1.51753 0.61628 0.98906
-0.00 -0.00 300.00 3.22673 127.95500 128.79984 81.60000 6.31795 5.02880 8.58108 43.60300 2.21640 0.89095 0.99300
-0.00 -0.00 400.00 3.21891 126.15846 127.46787 80.43482 6.29283 4.99882 8.53916 43.70888 2.59982 1.03152 0.99806
-0.00 -0.00 500.00 3.21015 124.21212 125.98137 79.14409 6.26456 4.96532 8.49219 43.82823 2.83795 1.10952 1.00381
-0.00 -0.00 600.00 3.20076 122.17165 124.39864 77.78102 6.23420 4.92958 8.44194 43.95670 3.00788 1.15741 1.01004
-0.00 -0.00 700.00 3.19093 120.06194 122.74825 76.37206 6.20225 4.89225 8.38928 44.09220 3.14397 1.18960 1.01666
-0.00 -0.00 800.00 3.18072 117.89507 121.04515 74.93143 6.16895 4.85366 8.33466 44.23371 3.26282 1.21303 1.02363
-0.00 -0.00 900.00 3.17018 115.67688 119.29741 73.46718 6.13442 4.81398 8.27831 44.38075 3.37326 1.23130 1.03094
-0.00 -0.00 1000.00 3.15934 113.40991 117.50933 71.98406 6.09871 4.77332 8.22032 44.53310 3.48041 1.24642 1.03858
-0.00 -0.00 1100.00 3.14819 111.09479 115.68307 70.48493 6.06184 4.73170 8.16076 44.69075 3.58753 1.25961 1.04657
-0.00 -0.00 1200.00 3.13675 108.73079 113.81930 68.97144 6.02377 4.68916 8.09959 44.85381 3.69693 1.27164 1.05491
-0.00 -0.00 1300.00 3.12499 106.31628 111.91773 67.44447 5.98446 4.64567 8.03680 45.02247 3.81038 1.28300 1.06363
-0.00 -0.00 1400.00 3.11293 103.84879 109.97730 65.90432 5.94384 4.60121 7.97229 45.19702 3.92941 1.29409 1.07275
-0.00 -0.00 1500.00 3.10053 101.32518 107.99632 64.35090 5.90183 4.55575 7.90599 45.37780 4.05548 1.30517 1.08230
-0.00 -0.00 1600.00 3.08777 98.74156 105.97248 62.78374 5.85833 4.50922 7.83778 45.56523 4.19005 1.31648 1.09233
-0.00 -0.00 1700.00 3.07464 96.09329 103.90290 61.20209 5.81322 4.46155 7.76750 45.75982 4.33474 1.32823 1.10287
-0.00 -0.00 1800.00 3.06111 93.37486 101.78406 59.60485 5.76635 4.41267 7.69500 45.96216 4.49136 1.34062 1.11397
-0.00 -0.00 1900.00 3.04713 90.57978 99.61174 57.99065 5.71755 4.36248 7.62006 46.17294 4.66202 1.35385 1.12570
-0.00 -0.00 2000.00 3.03268 87.70035 97.38088 56.35774 5.66661 4.31086 7.54245 46.39297 4.84929 1.36816 1.13812
-0.00 -0.00 2100.00 3.01770 84.72741 95.08540 54.70397 5.61331 4.25766 7.46187 46.62323 5.05632 1.38380 1.15132
-0.00 -0.00 2200.00 3.00214 81.64995 92.71801 53.02669 5.55733 4.20273 7.37798 46.86488 5.28707 1.40111 1.16541
+Pi depth Ti rho KT KS G VB VS VP vol alpha cP gr Gibbs
+0.00 -0.00 0.00 3.23638 130.45227 130.45227 83.05679 6.34887 5.06592 8.63285 43.47301 0.00000 0.00000 0.98683 -0.10477
+0.00 -0.00 100.00 3.23603 130.34079 130.39293 83.00425 6.34776 5.06459 8.63100 43.47765 0.40527 0.16544 0.98705 -0.10497
+0.00 -0.00 200.00 3.23288 129.46305 129.85168 82.52586 6.33767 5.05243 8.61406 43.52008 1.51753 0.61628 0.98906 -0.10744
+0.00 -0.00 300.00 3.22673 127.95500 128.79984 81.60000 6.31795 5.02880 8.58108 43.60300 2.21640 0.89095 0.99300 -0.11406
+0.00 -0.00 400.00 3.21891 126.15846 127.46787 80.43482 6.29283 4.99882 8.53916 43.70888 2.59982 1.03152 0.99806 -0.12483
+0.00 -0.00 500.00 3.21015 124.21212 125.98137 79.14409 6.26456 4.96532 8.49219 43.82823 2.83795 1.10952 1.00381 -0.13924
+0.00 -0.00 600.00 3.20076 122.17165 124.39864 77.78102 6.23420 4.92958 8.44194 43.95670 3.00788 1.15741 1.01004 -0.15677
+0.00 -0.00 700.00 3.19093 120.06194 122.74825 76.37206 6.20225 4.89225 8.38928 44.09220 3.14397 1.18960 1.01666 -0.17703
+0.00 -0.00 800.00 3.18072 117.89507 121.04515 74.93143 6.16895 4.85366 8.33466 44.23371 3.26282 1.21303 1.02363 -0.19968
+0.00 -0.00 900.00 3.17018 115.67688 119.29741 73.46718 6.13442 4.81398 8.27831 44.38075 3.37326 1.23130 1.03094 -0.22447
+0.00 -0.00 1000.00 3.15934 113.40991 117.50933 71.98406 6.09871 4.77332 8.22032 44.53310 3.48041 1.24642 1.03858 -0.25119
+0.00 -0.00 1100.00 3.14819 111.09479 115.68307 70.48493 6.06184 4.73170 8.16076 44.69075 3.58753 1.25961 1.04657 -0.27967
+0.00 -0.00 1200.00 3.13675 108.73079 113.81930 68.97144 6.02377 4.68916 8.09959 44.85381 3.69693 1.27164 1.05491 -0.30975
+0.00 -0.00 1300.00 3.12499 106.31628 111.91773 67.44447 5.98446 4.64567 8.03680 45.02247 3.81038 1.28300 1.06363 -0.34133
+0.00 -0.00 1400.00 3.11293 103.84879 109.97730 65.90432 5.94384 4.60121 7.97229 45.19702 3.92941 1.29409 1.07275 -0.37430
+0.00 -0.00 1500.00 3.10053 101.32518 107.99632 64.35090 5.90183 4.55575 7.90599 45.37780 4.05548 1.30517 1.08230 -0.40857
+0.00 -0.00 1600.00 3.08777 98.74156 105.97248 62.78374 5.85833 4.50922 7.83778 45.56523 4.19005 1.31648 1.09233 -0.44407
+0.00 -0.00 1700.00 3.07464 96.09329 103.90290 61.20209 5.81322 4.46155 7.76750 45.75982 4.33474 1.32823 1.10287 -0.48072
+0.00 -0.00 1800.00 3.06111 93.37486 101.78406 59.60485 5.76635 4.41267 7.69500 45.96216 4.49136 1.34062 1.11397 -0.51848
+0.00 -0.00 1900.00 3.04713 90.57978 99.61174 57.99065 5.71755 4.36248 7.62006 46.17294 4.66202 1.35385 1.12570 -0.55728
+0.00 -0.00 2000.00 3.03268 87.70035 97.38088 56.35774 5.66661 4.31086 7.54245 46.39297 4.84929 1.36816 1.13812 -0.59709
+0.00 -0.00 2100.00 3.01770 84.72741 95.08540 54.70397 5.61331 4.25766 7.46187 46.62323 5.05632 1.38380 1.15132 -0.63786
+0.00 -0.00 2200.00 3.00214 81.64995 92.71801 53.02669 5.55733 4.20273 7.37798 46.86488 5.28707 1.40111 1.16541 -0.67955
diff --git a/burnman/slb.py b/burnman/slb.py
index 2133611..948a3ae 100644
--- a/burnman/slb.py
+++ b/burnman/slb.py
@@ -229,7 +229,7 @@ class SLBBase(eos.EquationOfState):
b_iikkmm= 27.*params['K_0']*(params['Kprime_0']-4.) # EQ 29
F = params['F_0'] + \
- 0.5*volume*b_iikk*f*f + (1./6.)*volume*b_iikkmm*f*f*f +\
+ 0.5*b_iikk*f*f*params['V_0'] + (1./6.)*params['V_0']*b_iikkmm*f*f*f +\
F_quasiharmonic
return F
diff --git a/tests/benchmark.py b/tests/benchmark.py
index d41420f..92052ca 100644
--- a/tests/benchmark.py
+++ b/tests/benchmark.py
@@ -195,6 +195,7 @@ def check_slb_fig7_txt():
'Debye_0': 809.183,
'grueneisen_0': .993,
'q_0': 2.093,
+ 'F_0': -1.1406e5,
'eta_s_0' : 2.364}
forsterite.set_method('slb3')
@@ -234,6 +235,8 @@ def check_slb_fig7_txt():
Cp_comp = np.empty_like(Cp)
gr = np.array(data[:,13])
gr_comp = np.empty_like(gr)
+ gibbs = np.array(data[:,14])
+ gibbs_comp = np.empty_like(gibbs)
for i in range(len(temperature)):
forsterite.set_state(pressure[i], temperature[i])
@@ -248,6 +251,7 @@ def check_slb_fig7_txt():
alpha_comp[i] = 100.*(forsterite.thermal_expansivity()/1.e-5 - alpha[i])/(alpha[-1])
Cp_comp[i] = 100.*(forsterite.heat_capacity_p()/forsterite.params['molar_mass']/1000. - Cp[i])/(Cp[-1])
gr_comp[i] = (forsterite.grueneisen_parameter() - gr[i])/gr[i]
+ gibbs_comp[i] = 100.*(forsterite.molar_gibbs()/1.e6 - gibbs[i])/gibbs[i]
plt.plot(temperature, rho_comp, label=r'$\rho$')
plt.plot(temperature, Kt_comp, label=r'$K_S$')
@@ -260,6 +264,7 @@ def check_slb_fig7_txt():
plt.plot(temperature, alpha_comp, label = r'$\alpha$')
plt.plot(temperature, Cp_comp, label = r'$c_P$')
plt.plot(temperature, gr_comp, label = r'$\gamma$')
+ plt.plot(temperature, gibbs_comp, label = r'Gibbs')
plt.xlim([0, 2750])
plt.ylim([-0.001, 0.001])
More information about the CIG-COMMITS
mailing list