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 Jamieson 1983.

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.18, 37)
In [6]:
jamieson_pt = eos.platinum.Jamieson1982()
In [7]:
jamieson_pt.print_equations()
P_static: Jamieson
P_thermal: Constq
P_anharmonic: None
P_electronic: None
In [8]:
jamieson_pt.print_parameters()
Static:  OrderedDict([('rho0', 21.4449+/-0), ('c0', 3.574+/-0), ('s', 1.582+/-0)])
Thermal:  OrderedDict([('v0', 60.421757141035926+/-0.001), ('gamma0', 2.4+/-0), ('q', 1.0+/-0), ('theta0', 200.0+/-0)])
Anharmonic: None
Electronic: None
In [9]:
v0 = 60.421757141035926
In [10]:
jamieson_pt.three_r
Out[10]:
24.942673080000002
In [11]:
v = v0 * (1.-eta) 
temp = 1500.
In [12]:
p = jamieson_pt.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 =  1500.0
 0.000  7.86+/-0.00
 0.005  9.23+/-0.00
 0.010  10.64+/-0.00
 0.015  12.10+/-0.00
 0.020  13.60+/-0.00
 0.025  15.16+/-0.00
 0.030  16.76+/-0.00
 0.035  18.41+/-0.00
 0.040  20.12+/-0.00
 0.045  21.88+/-0.00
 0.050  23.70+/-0.00
 0.055  25.58+/-0.00
 0.060  27.52+/-0.00
 0.065  29.52+/-0.00
 0.070  31.58+/-0.00
 0.075  33.71+/-0.00
 0.080  35.91+/-0.00
 0.085  38.18+/-0.00
 0.090  40.52+/-0.00
 0.095  42.94+/-0.00
 0.100  45.44+/-0.00
 0.105  48.01+/-0.00
 0.110  50.67+/-0.00
 0.115  53.42+/-0.00
 0.120  56.25+/-0.00
 0.125  59.18+/-0.00
 0.130  62.20+/-0.00
 0.135  65.32+/-0.00
 0.140  68.54+/-0.00
 0.145  71.87+/-0.00
 0.150  75.31+/-0.00
 0.155  78.86+/-0.00
 0.160  82.53+/-0.00
 0.165  86.32+/-0.00
 0.170  90.23+/-0.00
 0.175  94.28+/-0.00
 0.180  98.47+/-0.00
In [14]:
v = jamieson_pt.cal_v(p, temp * np.ones_like(p), min_strain=0.6)
print(1.-(v/v0))
[ 0.     0.005  0.01   0.015  0.02   0.025  0.03   0.035  0.04   0.045
  0.05   0.055  0.06   0.065  0.07   0.075  0.08   0.085  0.09   0.095  0.1
  0.105  0.11   0.115  0.12   0.125  0.13   0.135  0.14   0.145  0.15
  0.155  0.16   0.165  0.17   0.175  0.18 ]
In [ ]: