summaryrefslogtreecommitdiff
path: root/476/CH5/EX5.7/Example_5_7.sce
blob: 7784fae1a1a389b0f667897682305e0551573d84 (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
//A Textbook of Chemical Engineering Thermodynamics
//Chapter 5
//Some Applications of the Laws of Thermodynamics
//Example 7


clear;
clc;


//Given:
P1 = 1; //initial pressure (bar)
T1 = 300; //initial temperature (K)
P2 = 10; //final pressure (bar)
gama = 1.3; //gama for CO2
V_rate = 100; //volumetric flow rate (m^3/h)

//To calculate work required and temperature after compression
Ws = (gama/(gama-1))*P1*10^5*(V_rate/3600)*(1-(P2/P1)^((gama-1)/gama));
mprintf('The work required is %f kW',-Ws/1000);

//Using equation 3.23 (Page no.49)
T2 = T1*((P2/P1)^((gama-1)/gama));
mprintf('\nTemperature of gas after compression is %f K',T2);

//end