So I am working on making a simulation that shows the habitable zone of our solar system from now until our sun reaches the end of it's red giant phase. The sun will die when it is 10 billion years old and will reach the end of the red giant stage at 5 billion years. I know the habitable zone will be between 50-70 AU at the end of this timeline and the sun will be 256 times bigger than it is now, but how long will Earth to leave a habitable zone? Also, does anyone know how quickly the sun will increase in radius during it's red giant phase? Before it dies, it will be 1.37 it's current size. How will the sun change from now until then in terms of luminosity and temperature?