Source and citation

  • This notebook is part of the pytheos package (Github).

  • [Citation] S.-H. Shim (2017) Pytheos - python equations of state tools. doi:

In [1]:
%matplotlib inline
# %matplotlib notebook # for interactive

For high dpi displays.

In [2]:
%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 [3]:
import matplotlib.pyplot as plt
import numpy as np
from uncertainties import unumpy as unp
import pytheos as eos

3. Compare

In [4]:
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 [5]:
speziale_mgo = eos.periclase.Speziale2001()
In [6]:
speziale_mgo.print_equations()
P_static:  bm3
P_thermal:  speziale
P_anharmonic:  None
P_electronic:  None
In [7]:
speziale_mgo.print_equations()
P_static:  bm3
P_thermal:  speziale
P_anharmonic:  None
P_electronic:  None
In [8]:
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 [9]:
v0 = 74.698
In [10]:
speziale_mgo.three_r
Out[10]:
24.943379399999998
In [11]:
v = v0 * (eta) 
temp = 3000.
In [12]:
p = speziale_mgo.cal_p(v, temp * np.ones_like(v))
In [13]:
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  17.69+/-0.35
 0.980  20.87+/-0.37
 0.960  24.50+/-0.41
 0.940  28.62+/-0.46
 0.920  33.26+/-0.50
 0.900  38.45+/-0.54
 0.880  44.24+/-0.58
 0.860  50.70+/-0.61
 0.840  57.89+/-0.64
 0.820  65.89+/-0.67
 0.800  74.81+/-0.69
 0.780  84.74+/-0.71
 0.760  95.84+/-0.74
 0.740  108.24+/-0.76
 0.720  122.13+/-0.78
 0.700  137.72+/-0.81
 0.680  155.25+/-0.84
 0.660  175.02+/-0.88
 0.640  197.36+/-0.93
 0.620  222.70+/-1.00
 0.600  251.51+/-1.08
In [15]:
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 [ ]: