When I was writing about cosmic heat death a couple of weeks ago [see ‘Will it all be over soon?’ posted on November 2nd, 2016], I implied that our sun would expire on a shorter timescale of about 4 to 5 billion years but without mentioning what we expect to happen. The gravitational field associated with every piece of matter is proportional to the mass of the piece of matter and inversely proportional to distance from its centre. The size of the sun implies it should collapse under its own gravitational forces, except that the fusion of hydrogen in its core causes an outwards heat transfer, which prevents this from happening. The sun remains a sphere of hot gases with diameter of about 864,000 miles by ‘burning’ hydrogen. When the hydrogen runs out, the gravitational field will take over and the sun is expected to collapse to a 30,000 mile diameter ball of atoms and free electrons, or a white dwarf.
These are all spontaneous processes and so the total entropy must increase although there are some local reductions. The heat dissipated following the fusion of two hydrogen nuclei generates more entropy in the surroundings than the local reduction caused by the fusion. The collapse to white dwarf would appear to represent a substantial reduction of entropy of the sun because the atomic particles are crushed together. However, this is countered by the release of photons to the surroundings which ensures that the entropy of the surroundings increases sufficiently to satisfy the second law of thermodynamics.
Isaac Asimov, The roving mind: a panoramic view of fringe science, technology, and the society of the future, London: Oxford University Press, 1987.
An extract is available in John Carey (editor), The Faber Book of Science, London: Faber & Faber, 2005.