; this program does the work for problem 3.9 in Carroll and Ostlie, 2nd ed ; using the equations given in chapter 3 of the text. ; The output given here is just to the screen, and no files are read nor ; written to. Modifications will need to be made. ; magnitudes are not bolometric magnitudes PRO PROBLEM3_9 ; ; bring in constants @physical_constants.inc ; use your file name ; we'll deal with fixed quantities here lum_sun = 3.839D+26 ; luminosity of the Sun in watts -- note decimal points teff_star = 28000. ; effective temp of star Dschubba radius_star = 5.16D+9 ; radius in m dist_star_pc = 123. ; distance to star in parsecs dist_star = dist_star_pc * 3.0857D+16 ; distance in m absmag_sun = 4.76 ; on to the problem! lum_star = 4. * pi * radius_star^2 * sigma * teff_star^4 absmag_star = absmag_sun - 2.5 * alog10(lum_star / lum_sun) appmag_star = absmag_star + 5. * alog10(dist_star_pc) - 5. dist_mod_star = appmag_star - absmag_star fluxstar_surf = sigma * teff_star^4 fluxstar_earth = lum_star / (4. * pi * dist_star^2) print, lum_star, absmag_star, appmag_star, dist_mod_star, fluxstar_surf, fluxstar_earth help ; spits out types and values of all variables onto screen END