Verify that the basic equations of stellar structure [Eqs. (10.6), (10.7), (10.36), (10.68)] are satisfied by the 1M⊙ StatStar model available for download from the companion website; see Appendix L. This may be done by selecting two adjacent zones and numerically computing the derivatives on the left-hand sides of the equations, for example
drdP≃ri+1−riPi+1−Pi,
and comparing your results with results obtained from the right-hand sides using average values of quantities for the two zones [e.g., Mr=(Mi+Mi+1)/2].
Perform your calculations for two adjacent shells at temperatures near 5×106 K, and then compare your results for the left- and right-hand sides of each equation by determining relative errors. Note that the model assumes complete ionization everywhere and has the uniform composition X=0.7, Y=0.292, Z=0.008. Your results on the left- and right-hand sides of the stellar structure equations will not agree exactly because StatStar uses a Runge--Kutta numerical algorithm that carries out intermediate steps not shown in the output file.