I have been thinking about a battery cover to keep it warm while riding in cold.
How would you insulate a battery that's inside the frame? Is there a bunch of extra room in there?
I do think getting the metal battery shell away from the frame would reduce losses; the frame is basically going to stay at ambient in the wind. But I wonder if the battery ever really heats up in the first place? Is there anything worth insulating really? Maybe one that was charging inside where it was warm before heading out?
It would be interesting to think about an active heating system, like big packs on cars use, to try to bring the battery into a better thermal regime when riding. Using regen to heat could be a better win than trying to put the electricity back into the battery, too. Let's see: 150 pound rider on a 50 pound bike going 20mph. That's about 2Wh of kinetic energy. It takes about 60Wh to raise 10 pounds of water 20 degrees, which is about how much we'd want to bring a near-freezing battery up to get better performance. If we assume the battery is about the same, and we an ideal heat transfer mechanism, and we have a perfect insulative sleeve like you've suggested, then about 100 hard stops could bring a cold battery up. Well, good luck!
This reminds me a little bit of when I had one of the first Tesla Roadsters. At the time, they'd tested it mostly in California, where it must have been warm and flat all the time, and instead I lived on the top of a mountain in Colorado. My commute was straight down hill for 15 miles and 3000 vertical feet. In the morning on very cold days, even when the battery was not topped off from having charged overnight, the car would not regen, because of course putting energy into lithium chemistries at low temperatures is really rough on the battery. This meant I had to ride the brakes the whole way down the mountain, which was about as fun as you could imagine -- not to mention really annoying to the people behind me who had to watch the bozo in the fancy sports car light up the brakes the whole way down instead of downshifting like a normal person.
My solution was to learn to hold down the accelerator AND the brake at the same time, thereby pulling lots of energy out of the pack and heating up the whole thing quickly. After a minute or two of that, regen was good to go! My brakes, alas, were probably not. (Tesla did eventually add a pre-heat option to get the car to bring itself up before the drive, upon request. And they replaced my brakes.)