For an isentropic compression process, the relation dh=vdp can be found in any text book. When I calculate the compression work for high pressure humid air, the enthalpy obtained with function “HumidAirProps” seems to produce incorrect results. Below are the codes I used in Mathematica 9.0.1, Win7 x64.
{P1, T1, [Phi]1} = {5000, 303.15, 1};
P2 = 10000;
{W, V1, H1, S1} =
{HumidAirProps["W", "P", P1, "T", T1, "R", [Phi]1],
HumidAirProps["Vha", "P", P1, "T", T1, "R", [Phi]1],
HumidAirProps["Hha", "P", P1, "T", T1, "R", [Phi]1],
HumidAirProps["S", "P", P1, "T", T1, "R", [Phi]1]};
{T2, V2, H2, S2} =
{HumidAirProps["T", "P", P2, "S", S1, "W", W],
HumidAirProps["Vha", "P", P2, "S", S1, "W", W],
HumidAirProps["Hha", "P", P2, "S", S1, "W", W],
S1};
Ws1 = NIntegrate[
HumidAirProps["Vha", "P", p, "S", S1, "W", W], {p, P1, P2}];
Ws2 = H2 - H1;
In[415]:= {Ws1,Ws2}
Out[415]= {67.7215,70.9963}
"Ws1" is calculated by numerical integration along the isentropic path, while "Ws2" is the enthalpy difference between the starting and ending point of the compression process.
"Ws1" should equal "Ws2". However, this isn't true for any value of relative humidity [Phi]1. Besides, "Ws2" does not vary continuously at relative humidity [Phi]1=0.
The large difference between these methods confuses me a lot, and it will lead to large error in the prediction of compressor efficiency.
I tested the function "Props" for dry air, and got the right result "Ws1"="Ws2".
So I wonder If there is a bug in "HumidAirProps" or the method described in ASHRAE RP-1485.
Thanks!