blob: 8f19c4c4c8a5ea176f3b91acb328df25252f6656 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
clc
cp = 1.005 // Specific heat capacity of air in kJ/kgK
T2 = 160 // Compressed air temperature in degree Celsius
T1 = 25 // Ambient temperature
T0 = 25 // Ambient temperature
R = 0.287 // Gas constant
P2 = 8 // Pressure ratio
P1 = 1 // Initial pressure of gas in bar
Q = -100 // Heat loss to surrounding in kW
m = 1 // Mass flow rate in kg/s
printf("\n Example 8.14")
W = Q + m*cp*((T1+273)-(T2+273)) // power input
AF = cp*((T2+273)- (T1+273))-(T0+273)*((cp*log((T2+273)/(T1+273))-(R*log(P2/P1)))) // Availability
e = AF/-W // efficiency
printf("\n The power input is %f kW",W)
printf(" \n The second law efficiency of the compressor is %f percent",e*100)
//The answers vary due to round off error
|