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 Speiale 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(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]:
speziale_mgo = eos.periclase.Speziale2001()
In [7]:
speziale_mgo.print_equations()
P_static:  bm3
P_thermal:  speziale
P_anharmonic:  None
P_electronic:  None
In [8]:
speziale_mgo.print_equations()
P_static:  bm3
P_thermal:  speziale
P_anharmonic:  None
P_electronic:  None
In [9]:
speziale_mgo.print_parameters()
Static:  OrderedDict([('v0', 74.698+/-0.001), ('k0', 160.2+/-0), ('k0p', 3.99+/-0.01)])
Thermal:  OrderedDict([('v0', 74.698+/-0.001), ('gamma0', 1.524+/-0.03), ('q0', 1.65+/-0.4), ('q1', 11.8+/-0.2), ('theta0', 773.0+/-0)])
Anharmonic:  None
Electronic:  None
In [10]:
v0 = 74.698
In [11]:
speziale_mgo.three_r
Out[11]:
24.943379399999998
In [16]:
v = v0 * (eta) 
temp = 300.
In [17]:
p = speziale_mgo.cal_p(v, temp * np.ones_like(v))
In [18]:
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 =  300.0
 1.000  0.00+/-0.00
 0.980  3.37+/-0.00
 0.960  7.09+/-0.00
 0.940  11.22+/-0.00
 0.920  15.78+/-0.01
 0.900  20.83+/-0.01
 0.880  26.44+/-0.02
 0.860  32.66+/-0.03
 0.840  39.57+/-0.04
 0.820  47.27+/-0.05
 0.800  55.84+/-0.07
 0.780  65.41+/-0.09
 0.760  76.11+/-0.11
 0.740  88.09+/-0.15
 0.720  101.53+/-0.19
 0.700  116.65+/-0.24
 0.680  133.69+/-0.29
 0.660  152.94+/-0.37
 0.640  174.74+/-0.46
 0.620  199.50+/-0.56
 0.600  227.72+/-0.70
In [19]:
v = speziale_mgo.cal_v(p, temp * np.ones_like(p), min_strain=0.6)
print((v/v0))
[ 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 [ ]: