Thermal management in electric and hybrid vehicles