Say I have a volume of hydrogen gas that is raised to a temperature T so that 99.9 percent of the gas is ionized. If now, with the plasma at some pressure P, the volume is compressed a small volume dV such that no energy leaves the volume I'm curious of a total accounting of where the energy PdV goes. Some energy goes into heating the plasma and some energy goes into "heating" the photon gas? This is not a statics problem but is there an average total electrostatic energy that can be computed and does it change during compression? The electrostatic energy of a compressed neutral plasma confuses me. What about the magnetic energy of the moving charges, their average speed increases but the volume decreases so does the total magnetic energy change? I may be mixing classical and quantum, any clarifications welcome. Thanks for any help!