Generation of cold for compensating heat leaks or liquid production