Constrained work output of the moist atmospheric heat engine in a