when the sun exhausts its nuclear fuel and leaves the so-called main sequence of stars , the energy output will increase , the outer atmosphere of the sun will expand to engulf the earth and life on earth will end as the oceans boil away .