function [Ts]=Ts(P)
%yields the saturation temperature [celsius] at pressure P [bar]

Tsat=[0:10:370,374.15];
 %saturation temperature in celsius

Psat=[0.006112,0.012271,0.023368,0.042418,0.073750,0.12335,0.19919,0.31161,0.47358,0.70109,1.01325,1.4327,1.9854,2.7011,3.6136,4.7597,6.1804,7.9202,10.027,12.553,15.550,19.080,23.202,27.979,33.480,39.776,46.941,55.052,64.191,74.449,85.917,98.694,112.89,128.64,146.08,165.37,186.74,210.53,221.2];
 %saturation pressure in bar

Ts=interp1(Psat,Tsat,P);
