Calculus approach to data of H&H section 4.2.2

In [1]:
import numpy as np

Repeat the calculation of the uncertainty $\alpha_P$ in problem 3 using the "calculus approximation" of the uncertainties.

$$ P(V_m,T) = \frac{RT}{V_m-b} - \frac{a}{V_m^2} $$$$ \alpha_P = \sqrt{\left(\alpha_P^T\right)^2+\left(\alpha_P^V\right)^2} $$$$ \alpha_P^T = \left(\frac{\partial P}{\partial T}\right)\alpha_T = \frac{R}{V_m-b}\alpha_T $$$$ \alpha_P^V = \left(\frac{\partial P}{\partial V}\right)\alpha_V = \left[RT\left(\frac{-1}{(V_m-b)^2}\right) - \frac{a(-2)}{V_m^3}\right]\alpha_V = \left[\frac{-RT}{(V_m-b)^2} + \frac{2a}{V_m^3}\right]\alpha_V $$
In [2]:
R = 8.3145
Tbest = 298.0
alpha_T = 0.2
Vmbest = 2.000e-4
alpha_V = 0.003e-4
a = 1.408e-1
b = 3.913e-5
In [3]:
alpha_PT = (R/(Vmbest-b))*alpha_T
alpha_PV = ((-1*R*Tbest/(Vmbest-b)**2)+2*a/Vmbest**3)*alpha_V
alpha_PT, alpha_PV
Out[3]:
(10336.918008329707, -18162.58562642741)
In [4]:
alpha_P = np.sqrt(alpha_PV**2 + alpha_PT**2)
format(alpha_P,'e')
Out[4]:
'2.089812e+04'
In [5]:
# And divide by 10^6
alpha_P/1e6
Out[5]:
0.020898119306488768

So, the uncertainty in the pressue is 0.02 MPa. Basically the same thing that we got with the other approaches to Section 4.2.2.

Version information

version_information is from J.R. Johansson (jrjohansson at gmail.com); see Introduction to scientific computing with Python for more information and instructions for package installation.

version_information is installed on the linux network at Bucknell

In [6]:
%load_ext version_information
In [7]:
%version_information numpy
Out[7]:
SoftwareVersion
Python3.7.7 64bit [GCC 7.3.0]
IPython7.16.1
OSLinux 3.10.0 1062.9.1.el7.x86_64 x86_64 with centos 7.7.1908 Core
numpy1.18.5
Fri Aug 07 11:02:07 2020 EDT
In [ ]: