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=V−bRTexp(−RTVa), becomes, in the reduced variables v=V/b, τ=RTb/a and p=Pb2/a, p(v,τ)=v−1τe−1/(τv),v>1,τ>0. Its critical point is where ∂vp=0 and ∂v2p=0 hold together.
((a)) Show that, because p>0, these two conditions are equivalent to g1=∂vlnp=0 and g2=∂v2lnp=0. Write g1, g2 and the Jacobian of (g1,g2) with respect to (v,τ).
((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). Solve g1=g2=0 by hand as well, and use the exact root to tabulate ∣vk−vc∣ and show that the convergence is quadratic.
((c)) Give (vc,τc) and the critical compressibility factor Zc=PcVc/(RTc).
((d)) Start instead from (3.0,0.3). What does the first step do, and what check in your implementation would catch it?