Entropy and mass flow for energy conversion