The object is a single self-gravitating sphere. Its interior follows a Lane–Emden polytrope whose index comes from the equation of state, so the centre is denser and hotter than the average. Pressure is the sum of degenerate electrons (the exact zero-temperature Fermi gas, with a lattice correction so each material sits at its laboratory density at zero pressure and a Birch–Murnaghan branch for mild compression), degenerate neutrons once electrons are captured, ideal ions, thermal electrons suppressed by degeneracy, and radiation.
When you move a slider you play god: the object gets whatever temperature hydrostatic balance demands at that size. Then time runs. It radiates (diffusion luminosity calibrated to the Sun, a Hayashi floor for convective stars, Mestel cooling for degenerate ones), loses pair neutrinos, and gains fusion energy from deuterium, pp, CNO, triple-α, carbon, neon, oxygen and silicon burning (Kippenhahn & Weigert rates; neon and silicon use threshold laws). Losing energy makes it contract adiabatically; fusion makes it expand. That feedback is the main-sequence thermostat. Iron cannot burn: above ~6×10⁹ K it photodisintegrates and drains the pressure.
General relativity enters as limits: nothing static exists inside 1.41 Schwarzschild radii, and neutron degeneracy cannot hold more than 2.3 M☉ (the TOV limit). The Chandrasekhar mass is not put in by hand; it falls out of the relativistic electron gas.
Approximations: one zone plus a burning core; no convection, rotation, magnetic fields, mass loss or binaries; no red-giant phases (those need shell burning); planets come out 10–40% too large because the cold equation of state is stiff; gas-cloud dispersal uses a 10 K ambient temperature.