summaryrefslogtreecommitdiff
path: root/647/CH5/EX5.12/Example5_12.sce
blob: 7c49e3740c6174d31120d2f6254bf04bbfe48f7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clear;
clc;

// Example: 5.12
// Page: 167

printf("Example: 5.12 - Page: 167\n\n");

// Solution

//*****Data*****//
Vol_O2 = 5.6;// [L]
Vol_H2 = 16.8;// [L]
R = 1.987;// [cal/mol K]
//*************//

xA = Vol_O2/22.4;// [mole fraction O2]
xB = Vol_H2/22.4;// [mle fraaction H2]
N = xA + xB;// [total number of moles]
// From Eqn. 5.21:
deltaS = - (N*R*(xA*log(xA) + xB*log(xB)));// [cal/K]
printf("Change in Entropy is %.3f cal/K",deltaS);