FWIW the first submarine and the first attempt to use a submarine in combat was during the American Revolutionary war in 1776.
It was called the "American Turtle" and was developed as an afterthought to deliver an underwater timebomb that was designed to be attached to the bottom of a ship. >If I have my dates correct Jules Verne wrote "Twenty Thousand Leagues Under >The Sea" around 1850 or 60, he was born in 1828. Robert Fulton successfully >tested a submarine in France in 1800-1801 to a depth of 25 feet. >http://lcweb.loc.gov/exhibits/treasures/trr024.html > >The Hunley was not so successfully used in battle in 1864. >http://www.charlestonillustrated.com/hunley/index.html >And just to bring this back to EV's, I think that the Hunley was supposed to >be propelled by and electric motor and an on board battery pack. I think >there was a problem with the motor so the propulsion was changed to a bunch >of guys turning the crank. > >So submarines were technically possible but not real practical when the book >was written. I bet they were real interesting cutting edge tech. to the >engineers of the time.
