summaryrefslogtreecommitdiff
path: root/3685/CH8/EX8.3/Ex8_3.sce
blob: 6373b23fd5d4df0b70d0da97e144f8de1c51f6d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
Tw_ = 75 // Initial temperature of water in degree Celsius
Ts_ = 5 // Atmospheric temperature in degree Celsius
m = 40 // mass of water in kg
cp = 4.2 // Specific heat capacity of water in kJ/kgK
printf("\n Example 8.3")
Tw= Tw_+273 // Initial temperature of water in K
Ts = Ts_+273 // Atmospheric temperature in K
Q1 = m*cp*(Tw-Ts) // Heat transfer

W = integrate('m*cp*(1-(Ts/T))','T',Ts,Tw)
UE = Q1-W // Available energy
printf("\n Available energy is %d kJ",UE)
//The answers vary due to round off error