The U.S. Department of Energy has declared an emergency as a heat wave bears down on a huge part of the nation's electrical grid.