Making Hertzsprung-Russell diagrams with xnbody

 Modify common6.h and include under COMMON/NBODY/ the line &              LMNST(NMAX), RDS(NMAX) This will introduce global arrays in which luminosity and stellar radius of each star are going to be stored during the simulation.  Modify hrplot.f and include the following lines just above the last WRITE statements for unit 82: * Store LUM & RM globally for xnbody LMNST(J1)=LUM LMNST(J2)=LUM2 RDS(J1)=RM RDS(J2)=RM2 and unit 83: * Store LUM & RM globally for xnbody LMNST(I)=LUM RDS(I)=RM At the end of hrplot, set the output frequency DTPLOT in Myr (default: 10.0). The end of hrplot.f should look something like this: *      Update plot interval (10 Myr initially) and next output time. IF (TIME.EQ.0.0D0) THEN DTPLOT = 10.0 TPLOT = TPLOT + DTPLOT/TSTAR END IF     TPLOT = TPLOT + DTPLOT/TSTAR CALL FLUSH(82) CALL FLUSH(83) RETURN END  Modify viscon.f, in particular the subroutine VISCONPART: VBUFFER(21,LSTORED)=LOG10((LMNST(I)/(RDS(I)**2))**0.25) VBUFFER(22,LSTORED)=LOG10(REAL(LMNST(I))) Now temperature (which is a function of luminosity and stellar radius according to the Stefan-Boltzmann law) and luminosity are stored in the attributes ATT4 and ATT5.  Compile nbody6++ with xnbody/VISIT support. In your nbody6++ input file, turn on stellar evolution by setting KZ(12)=1 and KZ(19)=3. Start nbody6++ and xnbody and make the 2D plot windows display ATT5 against ATT4. 