The present disclosure relates to improvements to thermodynamic devices that approximate the Ericsson cycle, Brayton cycle, or regenerated Brayton cycle. These cycles and various ways of implementing them are known in the art. They can operate as engines or refrigerators. The Ericsson cycle is attractive since it can theoretically operate at the Carnot efficiency, which is the maximum possible efficiency for a heat engine or refrigerator.