blob: 597fd0bfb9021e75c603a1b90be9e071efd08e4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
clear ;
clc;
// Example 15.2
printf('Example 15.2\n\n');
//Page No. 465
// Solution
// Given
R = 10.73 ;// gas constant-[(cubic feet *psia)/(lb mol *R)]
a = 3.49 * 10^4 ;//(psia) *(cubic feet/lb mol)^2
b = 1.45 ;// (cubic feet)/(lb mol)
p = 679.7 ;// Pressure -[ psia]
n = 1.136 ;// Amount of mole -[lb mol]
T = 683 ;// Temperature - [degree R]
// Get V using Van der Waal's eqn.
deff('[y]=g(V)','y=(V^3) -(((p*n*b) + (n*R*T))/p)*V^2 + ((n^2)*a*V/p) - ((n^3)*a*b)/p');
V=fsolve(b,g) ;// Volume of final solution (volume of vessel) [cubic feet]
printf('\nVolume of final solution (volume of vessel) is %.0f cubic feet.',V);
|