Vous êtes sur la page 1sur 6

UNIVERSITITEKNOLOGIMALAYSIA

FACULTYOFMECHANICALENGINEERING

SME1013
PROGRAMMINGFORENGINEER
PROJECT1CPROGRAMMING

NAME:MOHDFIRDAUSBINMOHDNASIR
MATRIK:SXO81059MMJ04
SECTION:1
LECTURE:DRYUSSOFF

Universiti Teknologi Malaysia'


Fakulti Kejuruteraan Mekanikal

SME/SKMM 1013 Programming for Engineers


2011-2012-02
Project 1 - C Programming
Psychrometry deals with the properties of moist air. When the atmospheric pressure (total
pressure) P (kPa), the air dry bulb temperature T cae), and the relative humidity RH (%) are
known, the following properties can be calculated:

p.,. = 0.00008T 3 -

=RH( I~'O )

Pv
w

0.0007T2 + 0.0754T + 0.487~ .. ................ (kPa)

~ 0622 ~

/-L

P,

........... . .............. . ...... . ...... . ........ (kPa)

.. .

= 100 Pv [P - p., ]
p.,.

P - Pv

"

"

"

:,~::, 1

.( : :

.... ... ... .... .... ........................ ( %)

h = 1.00ST + w(2S00 + 1.88T) ....... ..... .. .... ... ... ... . ...... (kJlkgdryair)
where

p., = saturation pressure of water at dry bulb temperature T ~


P v = partial pressure of water vapor
w = humidity ratio
j.1 = percentage saturation
h = specific enthalpy of air-vapor mixture
RH = relative humidity

Write a C program to tabulate the following properties for 18C


2C, and 40 ~ RH ~ 100 in increment of 10 :

/-L
h

40C in increment of

Tabulate for P = 101.325 kPa and P = 95 kPa.


Refer
http://www.fkm .utm.my/-myusofflw .doc
Be creative when tabulating the properties!

for a sample of tabulated property .

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)

Relative Humidity (%)


----------------------------------------------------------T(C)
40
50
60
70
80
90
100
----------------------------------------------------------18. 0.00516 0.00646 0.00777 0.00909 0.01041 0.01173 0.01306
20. 0.00584 0.00731 0.00880 0.01029 0.01179 0.01329 0.01480
22. 0.00660 0.00827 0.00995 0.01164 0.01334 0.01505 0.01676
24. 0.00745 0.00935 0.01125 0.01316 0.01509 0.01703 0.01898
26. 0.00841 0.01055 0.01271 0.01487 0.01706 0.01926 0.02147
28. 0.00949 0.01191 0.01434 0.01680 0.01927 0.02176 0.02428
30. 0.01069 0.01342 0.01617 0.01895 0.02175 0.02458 0.02743
32. 0.01203 0.01511 0.01822 0.02136 0.02453 0.02773 0.03096
34. 0.01351 0.01698 0.02049 0.02404 0.02763 0.03125 0.03492
36. 0.01516 0.01907 0.02302 0.02702 0.03108 0.03518 0.03934
38. 0.01698 0.02137 0.02582 0.03034 0.03491 0.03956 0.04426
40. 0.01899 0.02392 0.02892 0.03401 0.03917 0.04442 0.04975
-----------------------------------------------------------Humidity Ratio of Air
(P = 95 kPa)

Relative Humidity (%)


----------------------------------------------------------T(C)
40
50
60
70
80
90
100
----------------------------------------------------------18. 0.00516 0.00646 0.00777 0.00909 0.01041 0.01173 0.01306
20. 0.00584 0.00731 0.00880 0.01029 0.01179 0.01329 0.01480
22. 0.00660 0.00827 0.00995 0.01164 0.01334 0.01505 0.01676
24. 0.00745 0.00935 0.01125 0.01316 0.01509 0.01703 0.01898
26. 0.00841 0.01055 0.01271 0.01487 0.01706 0.01926 0.02147
28. 0.00949 0.01191 0.01434 0.01680 0.01927 0.02176 0.02428
30. 0.01069 0.01342 0.01617 0.01895 0.02175 0.02458 0.02743
32. 0.01203 0.01511 0.01822 0.02136 0.02453 0.02773 0.03096
34. 0.01351 0.01698 0.02049 0.02404 0.02763 0.03125 0.03492
36. 0.01516 0.01907 0.02302 0.02702 0.03108 0.03518 0.03934
38. 0.01698 0.02137 0.02582 0.03034 0.03491 0.03956 0.04426
40. 0.01899 0.02392 0.02892 0.03401 0.03917 0.04442 0.04975
------------------------------------------------------------

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.

Vous aimerez peut-être aussi