Numerical study of heat transfer in two-phase flows