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 Tange 2008.

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.65, 36)
print(eta)
[ 1.    0.99  0.98  0.97  0.96  0.95  0.94  0.93  0.92  0.91  0.9   0.89
  0.88  0.87  0.86  0.85  0.84  0.83  0.82  0.81  0.8   0.79  0.78  0.77
  0.76  0.75  0.74  0.73  0.72  0.71  0.7   0.69  0.68  0.67  0.66  0.65]
In [6]:
tange_mgo = eos.periclase.Tange2009()
In [7]:
tange_mgo.print_equations()
P_static:  vinet
P_thermal:  tange
P_anharmonic:  None
P_electronic:  None
In [8]:
tange_mgo.print_equations()
P_static:  vinet
P_thermal:  tange
P_anharmonic:  None
P_electronic:  None
In [9]:
tange_mgo.print_parameters()
Static:  OrderedDict([('v0', 74.698+/-0.001), ('k0', 160.63+/-0.18), ('k0p', 4.367+/-0.013)])
Thermal:  OrderedDict([('v0', 74.698+/-0.001), ('gamma0', 1.442+/-0.015), ('a', 0.138+/-0.019), ('b', 5.4+/-1.1), ('theta0', 761.0+/-13.0)])
Anharmonic:  None
Electronic:  None
In [10]:
v0 = 74.698
In [11]:
tange_mgo.three_r
Out[11]:
24.943379399999998
In [12]:
v = v0 * (eta) 
temp = 3000.
In [13]:
p = tange_mgo.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  16.76+/-0.18
 0.990  18.44+/-0.18
 0.980  20.22+/-0.18
 0.970  22.10+/-0.19
 0.960  24.09+/-0.21
 0.950  26.18+/-0.22
 0.940  28.40+/-0.23
 0.930  30.74+/-0.25
 0.920  33.21+/-0.26
 0.910  35.82+/-0.28
 0.900  38.58+/-0.29
 0.890  41.48+/-0.30
 0.880  44.55+/-0.31
 0.870  47.79+/-0.33
 0.860  51.20+/-0.34
 0.850  54.81+/-0.35
 0.840  58.61+/-0.36
 0.830  62.63+/-0.37
 0.820  66.87+/-0.38
 0.810  71.34+/-0.39
 0.800  76.07+/-0.40
 0.790  81.06+/-0.41
 0.780  86.33+/-0.42
 0.770  91.90+/-0.43
 0.760  97.79+/-0.44
 0.750  104.01+/-0.46
 0.740  110.59+/-0.47
 0.730  117.55+/-0.48
 0.720  124.91+/-0.50
 0.710  132.70+/-0.52
 0.700  140.95+/-0.54
 0.690  149.69+/-0.56
 0.680  158.94+/-0.58
 0.670  168.75+/-0.61
 0.660  179.16+/-0.64
 0.650  190.19+/-0.67

Make comparison with the Vinet column in the table.

In [15]:
v = tange_mgo.cal_v(p, temp * np.ones_like(p), min_strain=0.6)
print(1.-(v/v0))
[ 0.    0.01  0.02  0.03  0.04  0.05  0.06  0.07  0.08  0.09  0.1   0.11
  0.12  0.13  0.14  0.15  0.16  0.17  0.18  0.19  0.2   0.21  0.22  0.23
  0.24  0.25  0.26  0.27  0.28  0.29  0.3   0.31  0.32  0.33  0.34  0.35]