How does an ideal gas radiate?

Recently I've been reading a lot about blackbody radiation, Rayleigh-Jeans law, Planck's law and the UV catastrophe.

In deriving the Rayleigh-Jeans and Planck's laws, we are examining a perfectly reflecting cavity filled with radiating ideal gas. The gas and the radiation are in thermal equilibrium. In Rayleigh-Jeans law, it is assumed that as an ideal gas has the average energy of $$1/2kT$$ per degree of freedom, the radiation has the same average energy per mode.

This is somewhat understandable to me, as the radiation originates from the charged particles having average energy of $$1/2kT$$, it would be reasonable to assume the radiation has the same average energy. But how does an ideal gas radiate in the first place?

My understanding of the ideal gas model is that it is a collection of particles moving with constant speeds and are non-interacting except during collisions, which are fully elastic. But to radiate, a particle has to accelerate. Only situation I can think of where electrons in ideal gas accelerate are during collisions (they collide and change directions), but the collisions are elastic and there is no change in kinetic energies of the particles. So if the collisions are elastic, where does the energy to produce radiation come from?

• "but the collisions are elastic and there is no change in kinetic energies of the particles" there is a dp/dt with the collision that turns to electromagnetic radiation. The elastic hypothesis fails with real atoms that have spill over fields from the orbitals . Nov 11 '18 at 12:57

• But still we are using results that describe ideal gases, such as $1/2kT$ for energy. Isn't this a result from Maxwell-Boltzmann distribution, which specifically describes ideal gases? Nov 11 '18 at 14:54