function dsr=ds_dP(T,P,vf)
% Compute entropy of gas
% T : Temperature [C]
% P : Pressure    [bar a]
% vf: Vapour fraction (1=vapour and 0=liquid)

R    = 8.314;                            % Gas constant          [J/(mol*K)]
Tref = 273.15;                           % Reference temperature [K]
Pref = 1;                                % Reference pressure    [bar a]

dsv  =-ones(8,1)*R/P;

dsvCmp=[dsv(1) (dsv(2)+dsv(3)+dsv(4))/3 dsv(6) dsv(7) dsv(8)]';

dsl=0;
dslv=0;

dsr=[(1-vf)*dsl + vf*(dslv+dsvCmp)];     % [J/(mol*K)]
return
