function [hg]=hg(T) 
  %gas saturation enthalpy [kJ/kg] at T [celsius] 
 
 Tsat=[0:10:370,374.15];
  %saturation temperature in celsius

 hvap=[2501,2519,2538,2556,2574,2592,2609,2626,2643,2660,2676,2691,2706,2720,2734,2747,2758,2769,2778,2786,2793,2798,2802,2803,2803,2801,2796,2790,2780,2766,2749,2727,2700,2666,2623,2565,2481,2331,2095];
 %vapor saturation enthalpy in kJ/kg

hg=interp1(Tsat,hvap,T);
