A curious historical experiment from 1797 to get a man to live alone underground for seven years is spun out into a novel