summaryrefslogtreecommitdiff
path: root/479/CH4/EX4.3/Example_4_3.sce
blob: f72a688e827e9a78b61c43d5d5af20779a98316e (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
//Chemical Engineering Thermodynamics
//Chapter 4
//Second Law of Thermodynamics

//Example 4.3
clear;
clc;

//Given
Cp = 0.09;//specific heat of metal block in Kcal/Kg K
m = 10;//mass of metal block in Kg
T1 = 323;//initial temperature of the block in K
T2 = 298;//final temperature of the block in K
//constant pressure process
//To find out entropy change of block,air and total entropy change

//(i)To calculate the entropy change of block
del_S1 = m*Cp*log(T2/T1);
mprintf('(i)Entropy change of block is %f Kcal/Kg K',del_S1);

//(ii)To calculate the entropy change of air
Q = m*Cp*(T1-T2);//heat absorbed by air = heat rejected by block in Kcal
del_S2 = (Q/T2);
mprintf('\n (ii)Entropy change of air is %f Kcal/Kg K',del_S2);

//(iii)To calculate the total entropy change
del_St = del_S1+del_S2;
mprintf('\n (iii)Total entropy change is %f Kcal/Kg K',del_St);
if(del_St == 0)
    mprintf('\n Process is reversible');
else
    mprintf('\n Process is irreversible');
end
//end