Working principle of steam engine