summaryrefslogtreecommitdiff
path: root/1457/CH9/EX9.5/9_5.sce
blob: bf210e723d27af13e59ed20625c2019399ffd036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
clc
//Initialization of variables
P1=50 //psia
T1=540 //K
g=32.2
R=1715
k=1.4
P3=13.5 //psia
A2=0.0218 //ft^2
cp=6000
//calculations
Pc=0.528*P1
V32=R*T1/g *k/(k-1) *(1- (P3/P1)^((k-1)/k))
V3=sqrt(V32*2*g)
G3=g*A2*P1*144/sqrt(T1) *sqrt(k/R *(2/(k+1))^((k+1)/(k-1)))
T3= T1 - V3^2 /(2*cp) 
gam3= g*P3*144/(R*T3)
gam2= (Pc/P3 *gam3^k )^(1/k)
V2=G3/gam2/A2
T2= (V3^2 -V2^2)/(2*cp) + T3
A3=G3/gam3/V3
D3= sqrt(4/%pi *A3)
G2=G3
//results
printf("\n velocity at section 3 = %d fps",V3)
printf("\n Flow rate at section 3 = %.3f lb/s",G3)
printf("\n temperature at section 3  = %d R",T3)
printf("\n velocity at section 2 = %d fps",V2)
printf("\n Flow rate at section 2 = %.3f lb/s",G2)
printf("\n temperature at section 2  = %d R",T2)
printf("\n Required Diameter = %.2f in",D3*12)