summaryrefslogtreecommitdiff
path: root/632/CH5/EX5.1/example5_1.sce
blob: 75ee7b5f4acc16ceb8c60c29984e7b4e28547ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
//clc()
V = 0.6;//m^3;
T = 473;//K
N = 1 * 10 ^ 3;//mol
R = 8.314;//Pa * m^3/molK
P = N * R * T / (V * 10^5);
disp("bar",P,"(a)Pressure calculated using ideal gas equation = ")
a = 0.4233;//N * m^4 / mol^2
b = 3.73 * 10^-5;//m^3/mol
P1 = (R*T/(V/N - b)-a/(V/N)^2)/10^5;
disp("bar",P1,"(a)Pressure calculated using van der waals equation = ")