blob: 0e79192bfe6ceb3719533762b3660531e66a8785 (
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
|
//A Textbook of Chemical Engineering Thermodynamics
//Chapter 3
//P-V-T Behaviour and Heat Effects
//Example 6
clear;
clc;
//Given:
V = 0.3821*10^-3 //molar volume(m^3/mol)
T = 313; //temperature (K)
R = 8.314; //ideal gas constant
a = 0.365; b = 4.28*10^-5; //Vander Waals constant
//To compare the pressures
//(a): Ideal gas equation
P = ((R*T)/(V*10^5)); //pressure in bar
mprintf('Pressure obtained by ideal gas equation is %f bar',P);
//(b): Van der Waals equation
P = ((((R*T)/(V-b))-(a/(V^2)))/(10^5));
mprintf('\nPressure obtained by Van der Waals equation is %f bar',P);
//end
|