In [1]:
%cat 0Source_Citation.txt
Source and citation

- This notebook is a part of the `pytheos` package.
- Website: http://github.com/SHDShim/pytheos.
- How to cite: S.-H. Shim (2017) Pytheos - a python tool set for equations of state. DOI: 10.5281/zenodo.802392
In [2]:
%matplotlib inline
# %matplotlib notebook # for interactive

For high dpi displays.

In [3]:
%config InlineBackend.figure_format = 'retina'

0. General note

This example compares pressure calculated from pytheos and original publication for the gold scale by Yokoo 2009.

1. Global setup

In [4]:
import matplotlib.pyplot as plt
import numpy as np
from uncertainties import unumpy as unp
import pytheos as eos

3. Compare

In [5]:
eta = np.linspace(1., 0.60, 21)
print(eta)
[ 1.    0.98  0.96  0.94  0.92  0.9   0.88  0.86  0.84  0.82  0.8   0.78
  0.76  0.74  0.72  0.7   0.68  0.66  0.64  0.62  0.6 ]
In [6]:
yokoo_au = eos.gold.Yokoo2009()
In [7]:
yokoo_au.print_equations()
P_static:  bm3
P_thermal:  tange
P_anharmonic:  None
P_electronic:  tsuchiya
In [8]:
yokoo_au.print_equations()
P_static:  bm3
P_thermal:  tange
P_anharmonic:  None
P_electronic:  tsuchiya
In [9]:
yokoo_au.print_parameters()
Static:  OrderedDict([('v0', 67.84742110765599+/-0.001), ('k0', 167.5+/-0), ('k0p', 5.79+/-0.1)])
Thermal:  OrderedDict([('v0', 67.84742110765599+/-0.001), ('gamma0', 2.96+/-0), ('a', 0.45+/-0.09), ('b', 4.2+/-0.6), ('theta0', 170.0+/-0)])
Anharmonic:  None
Electronic:  OrderedDict([('v0', 67.84742110765599+/-0.001), ('a', -0.00021606+/-0), ('b', -4.3795e-06+/-0), ('c', 1.4526e-08+/-0), ('d', 7.8072e-14+/-0)])
In [10]:
v0 = 67.84742110765599
In [11]:
yokoo_au.three_r
Out[11]:
24.943379399999998
In [12]:
v = v0 * (eta) 
temp = 3000.
In [13]:
p = yokoo_au.cal_p(v, temp * np.ones_like(v))

In [14]:
print('for T = ', temp)
for eta_i, p_i in zip(eta, p):
    print("{0: .3f} {1: .2f}".format(eta_i, p_i))
for T =  3000.0
 1.000  19.60+/-0.00
 0.980  22.86+/-0.18
 0.960  26.66+/-0.34
 0.940  31.09+/-0.50
 0.920  36.24+/-0.66
 0.900  42.18+/-0.81
 0.880  49.06+/-0.96
 0.860  56.98+/-1.11
 0.840  66.12+/-1.26
 0.820  76.65+/-1.42
 0.800  88.79+/-1.61
 0.780  102.80+/-1.81
 0.760  118.96+/-2.06
 0.740  137.65+/-2.36
 0.720  159.28+/-2.72
 0.700  184.36+/-3.18
 0.680  213.52+/-3.74
 0.660  247.49+/-4.44
 0.640  287.17+/-5.30
 0.620  333.68+/-6.38
 0.600  388.35+/-7.70
In [15]:
v = yokoo_au.cal_v(p, temp * np.ones_like(p), min_strain=0.6)
print(1.-(v/v0))
[ 0.    0.02  0.04  0.06  0.08  0.1   0.12  0.14  0.16  0.18  0.2   0.22
  0.24  0.26  0.28  0.3   0.32  0.34  0.36  0.38  0.4 ]
  • I cannot quite reproduce the table values. The mismatch is about 3 GPa at 3000 K and 380 GPa.

  • This means his parameters may have been rounded.

  • Therefore, I readjusted the eos parameters from Yokoo to match their table values better. Users have a choice if they use the table values or the parameter values. If reproduce_table sets to True, the difference reduces to 0.1 GPa.

In [16]:
yokoo_au = eos.gold.Yokoo2009(reproduce_table=True)
In [17]:
p = yokoo_au.cal_p(v, temp * np.ones_like(v))