summaryrefslogtreecommitdiff
path: root/2705/CH5/EX5.6/Ex5_6.sce
blob: 40f5fc5591dfe33a9a9203fc2db9823742f7177a (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
clear;
clc;
disp('Example 5.6');

//  aim : To determine
//  the mas of the gas and new temperature

//  Given values
P1 = 350;//  [kN/m^2]
V1 = .03;//  [m^3]
T1 = 273+35;//  [K]
R = .29;//  Gas constant,[kJ/kg K]

//  solution
//  using charasteristic equation, P*V=m*R*T
m = P1*V1/(R*T1);//  [Kg]
mprintf('\n The mass of the gas present is  =  %f kg\n',m);

//  Now the gas is compressed
P2 = 1050;//  [kN/m^2]
V2 = V1;
// since mass of the gas is constant so using, P*V/T=constant
//  hence
T2 = T1*P2/P1//  [K]
t2 = T2-273;//  [C]

mprintf('\n The new temperature of the gas is  =  %f  C\n',t2);

//  End