Can the Sun's core be treated as an ideal gas? I know that a gas behaves more like an ideal gas at higher temperature, and that is very well achieved in the Sun's core. But also low pressure is needed for a gas to behave like an ideal gas, and the pressure at the Sun's core is very high.
So now if I know correctly and accurately the temperature, density and pressure of the Sun and I want to calculate the average kinetic energy of a Hydrogen or a Helium ion at the center of the Sun's core, can I simply use the $\frac32kT$ law to calculate that ?
Also, if the electrons were degenerate, but I knew the temperature at different parts from a standard solar model (not by using ideal gas laws), can I still use $\frac32kT$ for the ions (not the electrons) ? Or will the electron degeneracy prevent me somehow ?
 A: The first part is handled well by Chris Drost - the kinetic particle energies are a lot larger than their interaction energies, so the gas can be considered (approximately) ideal.
The last part - yes, as long as the Coulomb energy is a lot lower than the thermal energy then the protons or He ions can be considered an ideal gas with the appropriate average kinetic energy.
The same is true whether or not the electrons are degenerate, however in white dwarfs it is possible for the ions to "freeze" when Coulomb energies reach a certain multiple ($\sim 100 kT$) of the thermal energy. The ionic "gas" then behaves more like a solid with energy $3kT$ per ion.
A: According to a NASA page, the density in the middle of the Sun is about 150 g/cm3. That's about 9 × 1025 protons in a 1cm3 box, or 450 million to a side, and using that spacing for a voltage calculation reveals a typical interaction energy of 65 eV or so. (If you've never seen this unit before, that is the energy used by a 1V battery to move an electron's charge from one terminal to the other. If you've never seen these calculations before, they belong to a part of physics called "classical electromagnetism.")
The same source says "The temperature at the very center of the Sun is about 15,000,000° C", which we can convert to a thermal energy of about 1.2 keV. That means that every degree of freedom has about 200 times the thermal energy as any particle-particle interaction has.
So it's not at the level where it's a great approximation (you'd want this number to be thousands or millions for that), but it is certainly at the level where it's a useful approximation, yes, since it's in the tens or hundreds range. (It also matters that the electron mass of 512 keV is probably big enough compared to that thermal energy to neglect relativity to first order.) In fact if it does deviate, those numbers are probably small enough to view it as a van der Waals gas with the usual "attractive potential" having its sign reversed or so.
