summaryrefslogtreecommitdiff
path: root/611/CH8/EX8.4/Chap8_Ex4_R1.sce
blob: 560e8a63bd91072dafed9dafcacaaa93e2134b39 (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
// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.

//Chapter-8,Example 4,Page 278
//Title: Entropy departure using Beattie-Bridgman equation of state
//================================================================================================================
clear 
clc

//INPUT
T=100;//temperature of carbon dioxide in degree celsius
P=10;//pressure of carbon dioxide in MPa
B0=104.76*10^-6;//Beattie-Bridgman constant for carbon dioxide in m^3/mol
b=72.35*10^-6;//Beattie-Bridgman constant for carbon dioxide in m^3/mol
C=660.0;//Beattie-Bridgman constant for carbon dioxide in (m^3 K^3)/mol
R=8.314;//universal gas constant in J/molK
v=0.233*10^-3;//volume calculated in Example (8.3) in m^3/mol
Z=0.751;//compressibility factor as calculated in Example (8.3) (no unit)

//CALCULATION
T=T+273.15;//conversion of temperature in K
//calculation of entropy departure using Eq.(8.38) in J/molK
dep_s=(R*log (Z))-(((B0*R)+((2*C*R)/(T^3)))*(1/v))+(((b*B0*R)-((2*C*B0*R)/(T^3)))*(1/(2*(v^2))))+((2*b*C*B0*R)/(3*(T^3)*(v^3)));

//OUTPUT
mprintf("\n The entropy departure for carbon dioxide using the Beattie-Bridgman equation of state = %f J/mol K\n",dep_s);


//===============================================END OF PROGRAM===================================================

//DISCLAIMER: THE PROBLEM STATEMENT MENTIONS THE TEMPERATURE TO BE 100 DEGREE CELSIUS, WHICH CORRESPONDS TO A TEMPERATURE OF     373.15K. HOWEVER, THE AUTHOR HAS EVALUATED THE ENTROPY DEPARTURE FOR A TEMPERATURE OF 313.15K, WHICH IS CLEARLY A PRINTING ERROR. THE CODE ABOVE HAS BEEN WRITTEN FOR THE TEMPERATURE OF 373.15K  AS GIVEN IN THE PROBLEM STATEMENT.