To simulate a star on a computer, you need equations describing the behavior of gases under the action of gravity. You must include nuclear reactions that release energy and produce elements beyond hydrogen. Furthermore, you have to describe how energy is carried through the star, either by photons, electrons, or moving matter. Finally, you must spin your star to shape the internal rotation as well as the internal distribution of chemical elements. You can then watch your theoretical star evolve and see that the model reproduces the main observational features of real stars, such as overall temperature and luminosity. However, your model will not pass all the tests.
展开▼