I was going through a review of rotary compressor and i understood that the stagnation pressure and stagnation temperature both change in the rotor stage (as energy is being added).I also read that in the stator stage the stagnation temperature remains a constant but there is loss of stagnation pressure. If there is a loss in stagnation pressure shouldn't the stagnation temperature increase (I am guessing here that the loss is converted into heat)? (I am guessing this has to do something with expansion but I am not sure)
additional info: https://physics.stackexchange.com/questions/292589/why-does-a-diffuser-increase-pressure