This paper presents a thermodynamic model for a heat engine based on evaporative cooling of unsaturated air at reduced pressure. Also analysed is a related heat pump based on condensation of water vapour in moist air at reduced pressure. These devices operate as two-stroke reciprocating engines, which are their simplest possible embodiments. The mathematical models for the two devices are based on conservation of mass for both air and water vapour, ideal gas laws, constant specific heats, and, as appropriate, either constant entropy processes or cooling/heating by evaporation/condensation. Both models take the form of coupled algebraic systems in six variables, which require numerical solution for certain stages of the cycle. The specific work output of the heat engine increases as the inlet air becomes hotter and as the expansion ratio of the engine increases. The engine provides evaporative cooling of air from inlet to outlet. The heat pump has a good coefficient of performance, which decreases as the expansion ratio increases. The heat pump also has the effect of drying the air from inlet to outlet, producing distilled water as a by-product.