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 Shim 2001.

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(0., 0.34, 18)
print(eta)


[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]

In [6]:
shim_au = eos.gold.Shim2002()

In [7]:
shim_au.print_equations()


P_static:  bm3
P_thermal:  constq
P_anharmonic:  None
P_electronic:  None

In [8]:
shim_au.print_equations()


P_static:  bm3
P_thermal:  constq
P_anharmonic:  None
P_electronic:  None

In [9]:
shim_au.print_parameters()


Static:  OrderedDict([('v0', 67.84742110765599+/-0.001), ('k0', 167.0+/-3.0), ('k0p', 5.0+/-0.2)])
Thermal:  OrderedDict([('v0', 67.84742110765599+/-0.001), ('gamma0', 2.97+/-0.05), ('q', 1.0+/-0.1), ('theta0', 170.0+/-0)])
Anharmonic:  None
Electronic:  None

In [10]:
v0 = 67.84742110765599

In [11]:
shim_au.three_r


Out[11]:
24.620360273215415

In [12]:
v = v0 * (1.-eta) 
temp = 3000.

In [13]:
p = shim_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
 0.000  19.30+/-0.32
 0.020  22.84+/-0.33
 0.040  26.84+/-0.36
 0.060  31.35+/-0.41
 0.080  36.44+/-0.50
 0.100  42.19+/-0.61
 0.120  48.68+/-0.76
 0.140  56.03+/-0.96
 0.160  64.35+/-1.21
 0.180  73.80+/-1.52
 0.200  84.52+/-1.90
 0.220  96.72+/-2.38
 0.240  110.62+/-2.97
 0.260  126.50+/-3.68
 0.280  144.68+/-4.55
 0.300  165.53+/-5.62
 0.320  189.51+/-6.91
 0.340  217.17+/-8.48

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

In [ ]: