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 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.225, 46)
print(eta)
[ 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   0.185  0.19   0.195  0.2    0.205
  0.21   0.215  0.22   0.225]
In [6]:
jamieson_aul = eos.gold.Jamieson1982L()
jamieson_auh = eos.gold.Jamieson1982H()
In [7]:
jamieson_aul.print_equations()
P_static: Jamieson
P_thermal: Constq
P_anharmonic: None
P_electronic: None
In [8]:
jamieson_auh.print_equations()
P_static: Jamieson
P_thermal: Constq
P_anharmonic: None
P_electronic: None
In [9]:
jamieson_aul.print_parameters()
Static:  OrderedDict([('rho0', 19.2827+/-0), ('a', 2.975+/-0), ('b', 1.896+/-0), ('c', -0.309+/-0)])
Thermal:  OrderedDict([('v0', 67.84747902176544+/-0.001), ('gamma0', 3.215+/-0), ('q', 1.0+/-0), ('theta0', 170.0+/-0)])
Anharmonic: None
Electronic: None
In [10]:
jamieson_auh.print_parameters()
Static:  OrderedDict([('rho0', 19.2827+/-0), ('c0', 3.071+/-0), ('s', 1.536+/-0)])
Thermal:  OrderedDict([('v0', 67.84747902176544+/-0.001), ('gamma0', 3.215+/-0), ('q', 1.0+/-0), ('theta0', 170.0+/-0)])
Anharmonic: None
Electronic: None
In [11]:
v0 = 67.84747902176544
In [12]:
jamieson_aul.three_r
Out[12]:
24.62081875
In [13]:
jamieson_auh.three_r
Out[13]:
24.62081875
In [14]:
v = v0 * (1.-eta) 
temp = 1500.
In [15]:
p = jamieson_auh.cal_p(v, temp * np.ones_like(v))

In [16]:
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  9.27+/-0.00
 0.005  10.15+/-0.00
 0.010  11.07+/-0.00
 0.015  12.01+/-0.00
 0.020  12.98+/-0.00
 0.025  13.98+/-0.00
 0.030  15.02+/-0.00
 0.035  16.08+/-0.00
 0.040  17.18+/-0.00
 0.045  18.31+/-0.00
 0.050  19.48+/-0.00
 0.055  20.69+/-0.00
 0.060  21.93+/-0.00
 0.065  23.20+/-0.00
 0.070  24.52+/-0.00
 0.075  25.88+/-0.00
 0.080  27.27+/-0.00
 0.085  28.71+/-0.00
 0.090  30.20+/-0.00
 0.095  31.72+/-0.00
 0.100  33.30+/-0.00
 0.105  34.92+/-0.00
 0.110  36.58+/-0.00
 0.115  38.30+/-0.00
 0.120  40.07+/-0.00
 0.125  41.89+/-0.00
 0.130  43.77+/-0.00
 0.135  45.70+/-0.00
 0.140  47.69+/-0.00
 0.145  49.74+/-0.00
 0.150  51.85+/-0.00
 0.155  54.02+/-0.00
 0.160  56.25+/-0.00
 0.165  58.55+/-0.00
 0.170  60.92+/-0.00
 0.175  63.36+/-0.00
 0.180  65.87+/-0.00
 0.185  68.46+/-0.00
 0.190  71.12+/-0.00
 0.195  73.86+/-0.00
 0.200  76.68+/-0.00
 0.205  79.59+/-0.00
 0.210  82.58+/-0.00
 0.215  85.66+/-0.00
 0.220  88.83+/-0.00
 0.225  92.09+/-0.00
In [17]:
v = jamieson_auh.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   0.185  0.19   0.195  0.2    0.205
  0.21   0.215  0.22   0.225]