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 platinum 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_pt = eos.platinum.Yokoo2009()
In [7]:
yokoo_pt.print_equations()
P_static:  bm3
P_thermal:  tange
P_anharmonic:  None
P_electronic:  tsuchiya
In [8]:
yokoo_pt.print_equations()
P_static:  bm3
P_thermal:  tange
P_anharmonic:  None
P_electronic:  tsuchiya
In [9]:
yokoo_pt.print_parameters()
Static:  OrderedDict([('v0', 60.37930856339099+/-0.001), ('k0', 276.4+/-0), ('k0p', 5.12+/-0.1)])
Thermal:  OrderedDict([('v0', 60.37930856339099+/-0.001), ('gamma0', 2.63+/-0), ('a', 0.39+/-0.08), ('b', 5.2+/-1.1), ('theta0', 230.0+/-0)])
Anharmonic:  None
Electronic:  OrderedDict([('v0', 60.37930856339099+/-0.001), ('a', 0.011316+/-0), ('b', -5.6486e-07+/-0), ('c', 2.67e-07+/-0), ('d', -2.8531e-11+/-0)])
In [10]:
v0 = 60.37930856339099
In [11]:
yokoo_pt.three_r
Out[11]:
24.943379399999998
In [12]:
v = v0 * (eta) 
temp = 3000.
In [13]:
p = yokoo_pt.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  21.04+/-0.00
 0.980  26.54+/-0.22
 0.960  32.85+/-0.42
 0.940  40.08+/-0.61
 0.920  48.34+/-0.78
 0.900  57.77+/-0.94
 0.880  68.51+/-1.10
 0.860  80.76+/-1.26
 0.840  94.71+/-1.44
 0.820  110.62+/-1.65
 0.800  128.76+/-1.90
 0.780  149.48+/-2.21
 0.760  173.17+/-2.60
 0.740  200.29+/-3.10
 0.720  231.42+/-3.72
 0.700  267.19+/-4.50
 0.680  308.43+/-5.47
 0.660  356.06+/-6.67
 0.640  411.27+/-8.16
 0.620  475.44+/-9.98
 0.600  550.29+/-12.22

It is alarming that even 300 K isotherm does not match with table value. The difference is 1%.

In [15]:
v = yokoo_pt.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 ]