summaryrefslogtreecommitdiff
path: root/1775/CH5/EX5.17/Chapter5_Example17.sce
blob: b6f2d5632f0ce6ad2aa95e1217000ad126cfdc5b (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
//Chapter-5, Illustration 17, Page 267
//Title: Air Compressors
//=============================================================================
clc
clear

//INPUT DATA
P1=1;//Pressure at point 1 in bar
P3=30;//Pressure at point 3 in bar
T1=300;//Temperature at point 1 in K
n=1.3;//Adiabatics gas constant

//CALCULATIONS
P2=sqrt(P1*P3);//Intermediate pressure in bar
rD=sqrt(P2/P1);//Ratio of cylinder diameters

//OUTPUT
mprintf('Ratio of cylinder diameters is %3.2f',rD)







//==============================END OF PROGRAM=================================