Skip to content

Commit 2561a74

Browse files
committed
benchmarked Decker calibration
1 parent 02878c7 commit 2561a74

File tree

4 files changed

+77
-30
lines changed

4 files changed

+77
-30
lines changed

burnman/calibrants/Decker_1971.py

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from burnman.eos.mie_grueneisen_debye import MGDBase
1212
from burnman.classes.calibrant import Calibrant
13+
from burnman.eos.birch_murnaghan_4th import birch_murnaghan_fourth
1314

1415

1516
class NaCl_B1(Calibrant):
@@ -25,43 +26,26 @@ class NaCl_B1(Calibrant):
2526

2627
def __init__(self):
2728
def _pressure_Decker_NaCl(volume, temperature, params):
28-
2929
# Isothermal pressure (GPa)
30-
a = (3 / 2) * (params["Kprime_0"] - 4)
31-
b = (
32-
9 * params["K_0"] * params["Kprime_prime_0"]
33-
+ 9 * params["Kprime_0"] ** 2
34-
- 63 * params["Kprime_0"]
35-
+ 143
36-
) / 6.0
37-
f = 0.5 * ((volume / params["V_0"]) ** (-2 / 3) - 1)
38-
K_T = (
39-
params["K_0"]
40-
* ((1 + 2 * f) ** (5 / 2))
41-
* (1 + (7 + 2 * a) * f + (9 * a + 3 * b) * f**2 + 11 * b * f**3)
42-
)
43-
P0 = 3 * f * params["K_0"] * (1 + 2 * f) ** (5 / 2) * (1 + a * f + b * f**2)
30+
P0 = birch_murnaghan_fourth(params["V_0"] / volume, params)
4431

4532
# Thermal pressure
4633
thermal_model = MGDBase()
4734
Pth0 = thermal_model._thermal_pressure(params["T_0"], volume, params)
4835
Pth = thermal_model._thermal_pressure(temperature, volume, params)
4936

50-
# Total pressure
51-
P = (P0 * 1e9) + Pth - Pth0
52-
53-
return P
37+
return P0 + Pth - Pth0
5438

5539
_params_Decker_NaCl = {
5640
"V_0": 2.7013e-05,
57-
"K_0": 23.7,
41+
"K_0": 23.7e9,
5842
"Kprime_0": 4.91,
59-
"Kprime_prime_0": -0.267,
43+
"Kprime_prime_0": -0.267e-9,
6044
"Debye_0": 279.0,
6145
"grueneisen_0": 1.59,
6246
"q_0": 0.93,
6347
"n": 2.0,
64-
"T_0": 300.0,
48+
"T_0": 298.15,
6549
"P_0": 0.0,
6650
"Z": 4.0,
6751
}

misc/benchmarks/calibrant_benchmarks.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,40 @@ def check_figures():
6363
)
6464

6565

66+
def check_Decker_1971():
67+
NaCl = calibrants.Decker_1971.NaCl_B1()
68+
V_0 = NaCl.params["V_0"]
69+
70+
# First column in table
71+
V = V_0
72+
73+
print(
74+
"Pressures from Decker 1971 calibrant "
75+
"vs. tabulated data in original paper (given in GPa)"
76+
)
77+
print(f"\nV={V:.4e} m^3/mol (standard state volume):")
78+
T_C = [25.0, 100.0, 200.0, 300.0, 500.0, 800.0]
79+
P_kbar = [0.00, 2.13, 5.00, 7.89, 13.72, 22.48]
80+
for i, T in enumerate(T_C):
81+
print(f"{T} C: {NaCl.pressure(V, T+273.15)/1.e9:.2f}, {P_kbar[i]/10.:.2f}")
82+
83+
# Middle column in table
84+
V = (1.0 - 0.1904) * V_0
85+
print(f"\nV={V:.4e} m^3/mol (middle row):")
86+
T_C = [0.0, 25.0, 100.0, 200.0, 300.0, 500.0, 800.0]
87+
P_kbar = [83.24, 83.93, 86.02, 88.89, 91.79, 97.65, 106.52]
88+
for i, T in enumerate(T_C):
89+
print(f"{T} C: {NaCl.pressure(V, T+273.15)/1.e9:.2f}, {P_kbar[i]/10.:.2f}")
90+
91+
# Last column in table
92+
V = (1.0 - 0.2950) * V_0
93+
print(f"\nV={V:.4e} m^3/mol (last row):")
94+
P_kbar = [193.45, 194.12, 196.18, 199.03, 201.93, 207.81, 216.73]
95+
for i, T in enumerate(T_C):
96+
print(f"{T} C: {NaCl.pressure(V, T+273.15)/1.e9:.2f}, {P_kbar[i]/10.:.2f}")
97+
print("")
98+
99+
66100
if __name__ == "__main__":
101+
check_Decker_1971()
67102
check_figures()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
Pressures from Decker 1971 calibrant vs. tabulated data in original paper (given in GPa)
2+
3+
V=2.7013e-05 m^3/mol (standard state volume):
4+
25.0 C: 0.00, 0.00
5+
100.0 C: 0.21, 0.21
6+
200.0 C: 0.50, 0.50
7+
300.0 C: 0.79, 0.79
8+
500.0 C: 1.37, 1.37
9+
800.0 C: 2.25, 2.25
10+
11+
V=2.1870e-05 m^3/mol (middle row):
12+
0.0 C: 8.32, 8.32
13+
25.0 C: 8.39, 8.39
14+
100.0 C: 8.60, 8.60
15+
200.0 C: 8.88, 8.89
16+
300.0 C: 9.17, 9.18
17+
500.0 C: 9.76, 9.77
18+
800.0 C: 10.65, 10.65
19+
20+
V=1.9044e-05 m^3/mol (last row):
21+
0.0 C: 19.33, 19.34
22+
25.0 C: 19.40, 19.41
23+
100.0 C: 19.60, 19.62
24+
200.0 C: 19.89, 19.90
25+
300.0 C: 20.18, 20.19
26+
500.0 C: 20.77, 20.78
27+
800.0 C: 21.66, 21.67
28+
129
Checking burnman.calibrants.Fei_2007.Au...
230
Checking burnman.calibrants.Fei_2007.Pt...
331
Checking burnman.calibrants.Holmes_1989.Pt...

misc/ref/example_calibrants.py.out

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
Experimental observations:
2-
Volume: 19.0287 +/- 0.1903 m^3/mol
2+
Volume: 19.0328 +/- 0.1903 m^3/mol
33
Temperature: 1073.15 +/- 10.0 K
44

55
Pressure estimated using the Decker equation of state:
6-
21.7355 GPa
6+
21.7180 GPa
77

88
Pressure with propagated uncertainty
99
estimated using the Decker equation of state:
10-
21.7355 +/- 1.0254 GPa
10+
21.7180 +/- 1.0245 GPa
1111
PVT correlation matrix:
12-
[[ 1. -0.99957671 0.02909288]
13-
[-0.99957671 1. 0. ]
14-
[ 0.02909288 0. 1. ]]
12+
[[ 1. -0.99957603 0.02911621]
13+
[-0.99957603 1. 0. ]
14+
[ 0.02911621 0. 1. ]]
1515
The uncertainties and correlation matrix only take into account
1616
the uncertainties in the measured volume and temperature,
1717
not the uncertainties in the calibrated equation of state.
1818

1919
Consistency checks:
20-
Volume: 19.0287 +/- 0.1903 m^3/mol
20+
Volume: 19.0328 +/- 0.1903 m^3/mol
2121
Temperature: 1073.15 +/- 10.0000 K
2222
V-T correlation: 0.000000
2323

2424
Result of conversion from Decker calibration to Decker calibration:
25-
21.7355 +/- 1.0254 GPa
25+
21.7180 +/- 1.0245 GPa
2626
(This should be the same as the pressures above)

0 commit comments

Comments
 (0)