summaryrefslogtreecommitdiff
path: root/3685/CH10/EX10.3/Ex10_3.sce
blob: 335ea5193a3e81ecec19a139da9d224ffe6ef162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
m = 1.5 // Mass of gas in kg
P1 = 5.6 // Initial pressure of gas in MPa
V1 = 0.06 // Initial volume of gas in m^3
T2_ = 240 // Final temperature of gas in degree Celsius
a = 0.946 // Constant
b = 0.662 // Constant
k = 1e-4 // Constant
// Part (b)
R = a-b // constant
T2 = T2_+273 // Final temperature of gas in KK
T1 = (P1*1e03*V1)/(m*R) // Initial temperature
W12 = -integrate('m*(b+k*T)','T',T1,T2) // Work done

printf("\n Example 10.3")
printf("\n The work done in the expansion is %d kJ",W12)
//The answers vary due to round off error