function u=sos(T,Pname,dd);

% General constants
R=8.314;
Tc=dd(1)+273.15;
rhoc=1/dd(2);
Pc=dd(3)*1e2;
mu0=dd(4)*1e-3;
Tb=dd(5)+273.15;
omega=dd(6);
R=8.314;
% DIPPR constants sets for temperature-dependent properties
RHOS=dd(8:12);
PS=dd(14:18);
LS=dd(20:24);
CS=dd(26:30);

% Density
rhos=mu0*1e3*DIPPR105(RHOS,T);
Ps=DIPPR101(PS,T);
rhosb=mu0*1e3*DIPPR105(RHOS,Tb);

% Internal pressure at the boiling point
switch Pname
    case 'S'
        Pib=PiS(Tb,rhosb,omega,mu0);
    case 'T'
        Pib=PiT(Tb,rhosb,omega,mu0);
    case 'L'
        Pib=rhosb.*DIPPR106(LS,Tb,Tc)*1e-3/mu0;  
end

xi=xiBO(RHOS,rhoc,Tb,Pib,mu0);
[nu,k]=nuBO(T,rhos,rhoc,xi);
 
% Isothermal compressibility
betaTs=(mu0./(R*T))./(rhos.*nu);
 
% Isobaric expansion coefficient
dlnrhosdT=dlnDIPPR105(RHOS,T);
dPsdT=dDIPPR101(PS,T);
alphaPs=betaTs.*dPsdT-dlnrhosdT;

% Internal pressure
Pi=T.*alphaPs./betaTs-Ps;

% Heat capacity
Cs=1e-3*DIPPR100(CS,T)/mu0;
Cps=Cs-alphaPs.*dPsdT;
 
% Speed of sound
u=1./sqrt(betaTs.*rhos-alphaPs.^2.*T./Cps);