vunits.convert.temp_to_energy

vunits.convert.temp_to_energy(temp, units_in='K', return_quantity=False, units_out='J')

Converts temperature to energy

Parameters
  • temp (float) – Temperature in K

  • units_in (str, optional) – Units corresponding to temp. Default is ‘K’.

  • return_quantity (bool, optional) – If True, returns Quantity. Otherwise, returns float.

  • units_out (str, optional) – Units corresponding to energy. Default is ‘J’.

Returns

energy – Energy corresponding to units_out.

Return type

float or Quantity obj