function P=psat(T, d)
% Calculates saturation pressure at a given temperature
% Parameters and equation found in Haar, L and Gallagher, J.S. 1978
% Usage P=psat(T,d)
% T    - Temperature
% d    - Struct with parameters for equation
w = T/d.Tc;
F = 1./w.*(d.As(1)*(1-w)+d.As(2)*(1-w).^(3/2)+d.As(3)*(1-w).^(5/2)+ ...
		 d.As(4)*(1-w).^5);
P = d.Pc*exp(F);
