summaryrefslogtreecommitdiff
path: root/1019/CH5/EX5.9/Example_5_9.sce
blob: f4923f89cb55f4b296ee4cfddc028bec27fd9bdc (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
//Example 5.9
clear;
clc;

//Given
Cpl=75.4;//heat capacity of water in J K^-1 mol^-1
Cpv=33.2;//heat capacity of water vapour in J K^-1 mol^-1
R=8.314;//gas constant in J K^-1 mol^-1
T=300//temperature in K
delHv=40850;//latent heat of vapourization in J mol^-1
Tb=373;//boiling point of water in K
P1=101325;//initial pressure in Pa
P2=10132.5;//final pressure in Pa

//To determine the free energy change delG
delH1=Cpl*(Tb-T);//enthalpy change during 1st step in J
delS1=Cpl*log(Tb/T);//entropy change during 1st step in J K^-1
delH2=delHv;//enthalpy change during 2nd step in J
delS2=delHv/Tb;//entropy change during 2nd step in J K^-1
delH3=Cpv*(T-Tb);//enthalpy change during 3rd step in J
delS3=Cpv*log(T/Tb);//entropy change during 3rd step in J K^-1
delH4=0;//enthalpy change during final step in J
delS4=R*log(P1/P2);//entropy change during final step in J K^-1
delH=delH1+delH2+delH3+delH4;//total enthalpy in J
delS=delS1+delS2+delS3+delS4;//total entropy change in J
delG=delH-(T*delS);//gibbs free energy change in J
mprintf('Free energy change = %f J mol^-1',delG);
//end