[cig-commits] [commit] master: Add benchmarks for entropy and enthalpy (6e9a3f4)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 15:48:41 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : master
Link : https://github.com/geodynamics/burnman/compare/e7f78ff83a8092bc07fea4398232e73406e7cbbb...6111717707e0bd07c31d999c20c7a56db163ff48
>---------------------------------------------------------------
commit 6e9a3f4cb795ceae36df5f81490d0cb0f6c5300f
Author: ian-r-rose <ian.r.rose at gmail.com>
Date: Fri Dec 12 14:23:06 2014 -0800
Add benchmarks for entropy and enthalpy
Remove warning
>---------------------------------------------------------------
6e9a3f4cb795ceae36df5f81490d0cb0f6c5300f
burnman/data/input_minphys/slb_fig7.txt | 48 ++++++++++++++++-----------------
tests/benchmark.py | 8 ++++++
2 files changed, 32 insertions(+), 24 deletions(-)
diff --git a/burnman/data/input_minphys/slb_fig7.txt b/burnman/data/input_minphys/slb_fig7.txt
index a48dedb..1dd7368 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 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
+Pi depth Ti rho KT KS G VB VS VP vol alpha cP gr Gibbs Entropy Enthalpy
+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.00000 -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 8.23200 -0.10415
+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 44.37796 -0.09856
+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 87.72179 -0.08774
+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 126.79189 -0.07412
+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 160.46437 -0.05900
+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 189.56567 -0.04303
+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 215.02876 -0.02651
+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 237.60343 -0.00960
+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 257.85886 0.00760
+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 276.22445 0.02503
+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 293.02731 0.04266
+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 308.52117 0.06047
+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 322.90554 0.07844
+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 336.34003 0.09657
+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 348.95463 0.11486
+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 360.85643 0.13330
+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 372.13477 0.15190
+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 382.86521 0.17068
+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 393.11263 0.18963
+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 402.93351 0.20878
+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 412.37773 0.22814
+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 421.49010 0.24773
diff --git a/tests/benchmark.py b/tests/benchmark.py
index 4473c4c..f4cdf20 100644
--- a/tests/benchmark.py
+++ b/tests/benchmark.py
@@ -237,6 +237,10 @@ def check_slb_fig7_txt():
gr_comp = np.empty_like(gr)
gibbs = np.array(data[:,14])
gibbs_comp = np.empty_like(gibbs)
+ entropy = np.array(data[:,15])
+ entropy_comp = np.empty_like(gibbs)
+ enthalpy = np.array(data[:,16])
+ enthalpy_comp = np.empty_like(gibbs)
for i in range(len(temperature)):
forsterite.set_state(pressure[i], temperature[i])
@@ -252,6 +256,8 @@ def check_slb_fig7_txt():
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]
+ entropy_comp[i] = 100.*(forsterite.molar_entropy() - entropy[i])/(entropy[i] if entropy[i] != 0. else 1.)
+ enthalpy_comp[i] = 100.*(forsterite.molar_enthalpy()/1.e6 - enthalpy[i])/(enthalpy[i] if enthalpy[i] != 0. else 1.)
plt.plot(temperature, rho_comp, label=r'$\rho$')
plt.plot(temperature, Kt_comp, label=r'$K_S$')
@@ -265,6 +271,8 @@ def check_slb_fig7_txt():
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.plot(temperature, enthalpy_comp, label = r'Enthalpy')
+ plt.plot(temperature, entropy_comp, label = r'Entropy')
plt.xlim([0, 2750])
plt.ylim([-0.001, 0.001])
More information about the CIG-COMMITS
mailing list