function cpav = CpMavg(T)
a = -0.703029;
b = 108.4773;
c = -42.52157;
d = 5.862788;
e = 0.678565;
Tref = 25+273.15;
Trefk = Tref/1000;
Tk = T/1000;
CpT = a*Tk + b/2*Tk^2 + c/3*Tk^3 + d/4*Tk^4 - e/Tk;
CpTref = a*Trefk + b/2*Trefk^2 + c/3*Trefk^3 + d/4*Trefk^4 + e/Trefk;
cpav = (CpT-CpTref)/(Tk-Trefk);

