summaryrefslogtreecommitdiff
path: root/647/CH3/EX3.5/Example3_5.sce
blob: cf403fe21e7e1dbcf05463531e45b56f4788581e (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
clear;
clc;

// Example: 3.5
// Page: 95

printf("Example: 3.5 - Page: 95\n\n");

// Solution

//*****Data*****//
m = 1.373;// [kg]
P = 1.95*10^(6);// [Pa]
V = 0.1;// [cubic m]
a = 422.546*10^(-3);// [cubic m/square mol]
b = 37*10^(-6);// [cubic m/mol]
M = 17*10^(-3);// [kg/mol]
R = 8.314;// [J/mol K]
//****************//

n = m/M;// [moles]
Vm = V/n;// [molar volume, cubic m]
// Applying Van der Waals equation of state:
T = (P + (a/Vm^2))*((Vm - b)/R);// [K]
printf("The temperature at which ammonia exists in the cylinder is %.1f K\n",T)