summaryrefslogtreecommitdiff
path: root/1019/CH4/EX4.11/Example_4_11.sce
blob: 7253d59254b03ff31f5f4f0bbf9e0b8c8b6c9d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Example 4.11
clear;
clc;

//Given
R=8.314;// gas constant in J K^-1 mol^-1
T=300; //initial temperature in K
r=3;//ratio of final volume to initial volume

//To calculate the entropy
q=R*T*log(r);//r=V2/V1
n=(P*V1*0.001)/(R*T);//moles
delSsys=q/T;//entropy of system in J K^-1 mol^-1
delSuniv=R*log(r);//entropy of universe in J K^-1
mprintf('(a) Entropy of the system = %f J K^-1 mol^-1',delSsys);
mprintf('\n Entropy of the surrounding = 0 J K^-1 mol^-1');
mprintf('\n \n (b) Entropy of the system = 0 J K^-1 mol^-1');
mprintf('\n Entropy of the surrounding = %f J K^-1 mol^-1',delSuniv);
//end