Project Programming C
Project Programming C
FACULTYOFMECHANICALENGINEERING
SME1013
PROGRAMMINGFORENGINEER
PROJECT1CPROGRAMMING
NAME:MOHDFIRDAUSBINMOHDNASIR
MATRIK:SXO81059MMJ04
SECTION:1
LECTURE:DRYUSSOFF
p.,. = 0.00008T 3 -
=RH( I~'O )
Pv
w
~ 0622 ~
/-L
P,
.. .
= 100 Pv [P - p., ]
p.,.
P - Pv
"
"
"
:,~::, 1
.( : :
h = 1.00ST + w(2S00 + 1.88T) ....... ..... .. .... ... ... ... . ...... (kJlkgdryair)
where
/-L
h
40C in increment of
Your report submission must include the source code and the computer generated outputs.
Briefly discuss the results obtained and give your conclusions.
The report is due on 13 th oMay 2012.
SOLUTION
SOURCE CODE
1) P=101.325 Kpa
#include <stdio.h>
main()
{
float t,h,p,ps[12],rh,pv[12][7],w[12][7],mu[12][7],temp[12];
int i,j;
p=101.325;
i=-1;
{ for(t=18; t<=40; t=t+2)
i=i+1;
j=-1;
for(rh=40; rh<=100; rh=rh+2)
j=j+1;
temp[i]=t;
ps [i]=(0.00008*pow(t,3)) + (0.0007*pow(t,2)) + (0.0754*t) + 0.4875;
pv[i][j] =((rh*ps[i])/100);
w[i][j] =0.622*pv[i][j]/(p-pv[i][j]);
mu[12][7] =(100*pv[i][j]/ps[i])*((p-ps[i])/(p-pv[i][j]));
h=(1.005*t) + (w[i][j]*(2500+(1.88*t)));
}
printf("
Relative Humidity(Percent)
\n");
printf(" -----------------------------------------------------------------\n");
printf(" T(C)
40 50
60
70
80 90 100 \n");
printf(" -----------------------------------------------------------------\n");
for(i=0;i<=1;++i)
for(j=0;j<=0;++j)
printf(" %.2d %.4f %.4f %.4f %.4f %.4f %.4f %.4f \n",pv[i][0], pv[i][1], pv[i][2],
pv[i][3], pv[i][4], pv[i][5], pv[i][6], pv[i][7]);
system("pause");
}
2) P=95 Kpa
#include <stdio.h>
main()
{
float t,h,p,ps[12],rh,pv[12][7],w[12][7],mu[12][7],temp[12];
int i,j;
p=95;
i=-1;
for(t=18; t<=40; t=t+2)
{ i=i+1;
j=-1;
for(rh=40; rh<=100; rh=rh+2)
j=j+1;
temp[i]=t;
ps [i]=(0.00008*pow(t,3)) + (0.0007*pow(t,2)) + (0.0754*t) + 0.4875;
pv[i][j] =((rh*ps[i])/100);
w[i][j] =0.622*pv[i][j]/(p-pv[i][j]);
mu[12][7] =(100*pv[i][j]/ps[i])*((p-ps[i])/(p-pv[i][j]));
h=(1.005*t) + (w[i][j]*(2500+(1.88*t)));
}
printf("
Relative Humidity(Percent)
\n");
printf(" -----------------------------------------------------------------\n");
printf(" T(C)
40 50
60
70
80 90 100 \n");
printf(" -----------------------------------------------------------------\n");
for(i=0;i<=1;++i)
for(j=0;j<=0;++j)
printf(" %.2d %.4f %.4f %.4f %.4f %.4f %.4f %.4f \n",pv[i][0], pv[i][1], pv[i][2],
pv[i][3], pv[i][4], pv[i][5], pv[i][6], pv[i][7]);
system("pause");
}
3) Graf
Humidity Ratio of Air
(P = 101.325 kPa)
4) Conclusion
From the above table we can see that the value slightly different when the pressure was change from
101.325 Kpa to 95 Kpa. Due to pressure drop the condensation was happen and resulted the relative
humidity become higher instead higher pressure apply.