The sun is big. And it doesn't matter which model we choose, the gravity model or the swell model (discussed below), polytropic process takes place on it. For the sake of familiarity, let's take the model of gravity. Under the influence of gravity, the gas compresses and releases temperature from the outside (isothermal process) and stores it from the inside (a static process).
How much heat is released by the isothermal process in the Sun, it seems, is also not yet calculated.
And what happens to a gas when it gives up its energy when compressed?
It cools down.
On Earth, it is difficult to create models of what is happening in the Sun. On earth, when hydrogen is liquefied, it is molecular, not atomic, hydrogen that is liquefied. This is where the spin isomers of hydrogen work. The question is whether the spins of the hydrogen atoms in the molecule are arranged in one direction or in opposite directions. How hydrogen will behave at those pressures, when it becomes atomic and will be liquefied under a pressure that cannot be reproduced on Earth, we can only build models. The models can be different. It is necessary to calculate, and depending on the numbers that can be obtained by performing these calculations, it will be possible to assume that thermonuclear reactions in the Sun do not occur at all, and inside the sun consists of liquid gases at a temperature close to absolute zero.
I'm not saying that. This should be considered. But the possibility of such a hypothesis is obvious.
And what is temperature in General? Why do bodies heat up or cool down?
Temperature – a value that intuitively quantifies the different heat of an object.
Living beings are able to perceive the sensations of heat and cold directly with the help of their senses. However, science requires that temperature be measured objectively.
The funny thing is that when scientists try to explain to you where the temperature comes from, they will start telling you about the degree of ionization of matter, more or less collisions of molecules, and other nonsense. The gibberish is very clever and correct, but it doesn't just tell you why and where the thermal (still – electromagnetic) radiation from this ionization and the number of collisions comes from.