summaryrefslogtreecommitdiff
path: root/3825/CH6/EX6.12/Ex6_12.sce
blob: 7e6810fcc424e4457ea8615aff7417e2adcc357d (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
clc
m1=1000 //mass of wet steam in kg
vg1=0.06663 
vf1=0.0012163
V=(2*m1)/((1/vf1)+(1/vg1))
P1=3*10^5
mprintf("V=%fmetre-cube\n",V)//ans vary due to roundoff error\n
mf=V/(2*vf1)
mg=V/(2*vg1)
mprintf("mass of liquid=%fkg\n",mf)//ans vary due to roundoff erorr
mprintf("mass of steam=%fkg\n",mg)//ans vary due to roundoff error
m2=900 //mass in kg
X1=mg/m1
mprintf("X1=%f\n",X1)//ans vary due to roundoff error
hg1=2802.3
hf1=1008.4
h1=(X1*hg1)+((1-X1)*hf1)
mprintf("h1=%fkJ/kg\n",h1)//ans vary due to roundoff error
u1=(h1*10^3)-(P1*(V/m1))
mprintf("u1=%fkJ/kg\n",u1/1000)//ans vary due to roundoff error
P2=15*10^5 //pressure assumed
vg2=0.1317
vf2=0.0011538
v2=V/m2
mprintf("v2=%fmetre-cube/kg\n",v2)//ans vary due to roundoff error
X=(v2-vf2)/(vg2-vf2)
mprintf("X=%f\n",X)//ans vary due to roundoff error
hg2=2789.8
hf2=844.67
h2=(X*hg2)+((1-X)*hf2)
mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error
u2=(h2*10^3)-(P2*v2)
mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error
he=(hg1+hg2)/2
LHS=(m1-m2)*he
RHS=(m1*u1)-(m2*u2)
mprintf("RHS=%fkJ\n",RHS/1000)//ans in textbook is wrong
mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error
P3=14*10^5 //pressure assumed
hg3=2787.8
hf3=830.08
vg3=0.1407
vf3=0.0011489
X=(v2-vf3)/(vg3-vf3)
mprintf("X=%f\n",X)//ans vary due to roundoff error
h2=(X*hg3)+((1-X)*hf3)
mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error
u2=(h2*10^3)-(P3*v2)
mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error
he=(hg1+hg3)/2
LHS=(m1-m2)*he
RHS=(m1*u1)-(m2*u2)
mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error
mprintf("RHS=%fkJ\n",RHS/1000)//ans in the textbook is wrong
P4=13.8*10^5 //pressure assumed
hg4=2787.32
hf4=827
vg4=0.1428
vf4=0.0011478
X=(v2-vf4)/(vg4-vf4)
mprintf("X=%f\n",X)//ans vary due to roundoff error
h2=(X*hg4)+((1-X)*hf4)
mprintf("h2=%fkJ/kg\n",h2)//ans vary due to roundoff error
u2=(h2*10^3)-(P4*v2)//ans may vary due to roundoff error
mprintf("u2=%fkJ/kg\n",u2/1000)//ans vary due to roundoff error
he=(hg1+hg4)/2
LHS=(m1-m2)*he
RHS=(m1*u1)-(m2*u2)
mprintf("LHS=%fkJ\n",LHS)//ans vary due to roundoff error
mprintf("RHS=%fkJ\n",RHS/1000)//ans in textbook is wrong
mprintf("Final pressure=%fbar",P4*10^-5)//since LHS and RHS differ by 0.2 percent