Heat transfer and expansion of substances