blob: 87d682b7e68ec4ee5bf5a6b20034cc134e67736e (
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
|
clear;
clc;
// Example: 5.22
// Page: 174
printf("Example: 5.22 - Page: 174\n\n");
// Solution
//*****Data*****//
T1 = 400;// [K]
P1 = 300;// [kPa]
V1 = 1;// [cubic m]
V2 =2;// [cubic m]
R = 8.314;// [kJ/kmol K]
//**************//
// Since the system is well insulated, there is no scope of transferring heat between system & surrounding.
deltaQ = 0;// [kJ]
deltaW = 0;// [kJ]
// By first law of thermodynamics:
deltaU =deltaQ - deltaW;// [kJ]
// As the internal energy of the gas depends only on temperature,
deltaT = 0;// [K]
T2 = T1 + deltaT;// [K]
P2 = (P1*V1/T1)*(T2/V2);// [kPa]
n = P1*V1/(R*T1);// [kmol]
deltaS_system = n*R*log(P1/P2);// [kJ/K]
// Since process is adiabatic:
deltaS_surrounding = 0;// [kJ/K]
deltaS = deltaS_system + deltaS_surrounding;// [kJ/K]
printf("Change in Entropy of the gas is %.4f kJ/K",deltaS);
|