Mechanics of an early steam engine