summaryrefslogtreecommitdiff
path: root/575/CH5/EX5.4.2/5_4_2.sce
blob: abd1cfdb2195ec24b5c717883947ff5425cf843f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
pathname=get_absolute_file_path('5_4_2.sce')
filename=pathname+filesep()+'542.sci'
exec(filename)
printf("All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
Tr=T/Tc
Pr=P/Pc
Vrideal=V*Pc/(n*R*Tc)
printf(" \n Tr= %f",Tr)
printf(" \n Pr= %f",Pr)
printf("\n Vrideal=%f",Vrideal)
z=1.77
printf("\n From the graphs, z=%f",z)
P=z*R*T*n/V
printf(" \n Pressure in the cylinder = %f atm",P)