Hi, I'm trying to make a simple model of stellar evolution for a game project of mine, but I'm not sure how to predict the radius of a star's core without reference to its surface radius. I am trying to derive the surface radius from the amount of energy being released by the core. The goal is to find the properties of the star given only its total mass, the time elapsed from birth, and the initial distribution of materials in the star. I hope that's not too much to ask. My guess is that I would have to sum the radiation pressure at the core surface and the thermal pressure from the gas, but I'm not quite sure how to go about doing this, even after reading online about it. How can I get the density with respect to radius? Would anyone care to help?