Methods and Devices for Heating or Cooling Viscous Materials