The Dieterici equation of state,

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists

Scientific Computing for Physicists, Ch The numerical toolkit closed: backward error and the audit of a library routine

Problem

The Dieterici equation of state, P=RTV−bexp⁡ ⁣(−aRTV)P=\dfrac{RT}{V-b}\exp\!\left(-\dfrac{a}{RTV}\right), becomes, in the reduced variables v=V/bv=V/b, τ=RTb/a\tau=RTb/a and p=Pb2/ap=Pb^2/a, p(v,τ)=τv−1 e−1/(τv),v>1, τ>0.p(v,\tau)=\frac{\tau}{v-1}\,e^{-1/(\tau v)},\qquad v>1,\ \tau>0. Its critical point is where ∂vp=0\partial_v p=0 and ∂v2p=0\partial_v^2 p=0 hold together. ((a)) Show that, because p>0p>0, these two conditions are equivalent to g1=∂vln⁡p=0g_1=\partial_v\ln p=0 and g2=∂v2ln⁡p=0g_2=\partial_v^2\ln p=0. Write g1g_1, g2g_2 and the Jacobian of (g1,g2)(g_1,g_2) with respect to (v,τ)(v,\tau). ((b)) Implement Newton's method for this system (Jacobian, linear solve, update and a stopping test) and run it from (v,τ)=(1.8, 0.22)(v,\tau)=(1.8,\,0.22). Solve g1=g2=0g_1=g_2=0 by hand as well, and use the exact root to tabulate ∣vk−vc∣|v_k-v_c| and show that the convergence is quadratic. ((c)) Give (vc,τc)(v_c,\tau_c) and the critical compressibility factor Zc=PcVc/(RTc)Z_c=P_cV_c/(RT_c). ((d)) Start instead from (3.0, 0.3)(3.0,\,0.3). What does the first step do, and what check in your implementation would catch it?

Browse the problem library