summaryrefslogtreecommitdiff
path: root/2870/CH4/EX4.10/Ex4_10.sce
blob: 04ba1e8cf13e9b8f04ff29ecbabc79243c328e7a (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
32
33
34
35
clc;clear;
//Example 4.10

//given data
P1=150;
P2=350;
T1=27+273;//in K
V1=400/1000;// in m^3
R=0.287;

//from Table A–17
u1=214.07;
u2=1113.52;

//calculations

//part a
V2=2*V1;
//using ideal gas eqn
// P1 * V1 / T1 = P2 * T2 /V2
T2=P2*V2*T1/(P1*V1);
disp(T2,'the final temperature in K');

//part b
// Work done is Pdv
W=P2*(V2-V1);
disp(W,'the work done by the air im kPa');

//part c
//Ein - Eout = Esystem
//Qin - Wout = dU = m(u2 - u1)
m= P1* V1 /(T1 * R);
Q= m*(u2 - u1)+ W;
Q=ceil(Q);
disp(Q,'the total heat transferred to the air in kJ')