blob: f3ac3173af43ac6363d16251acec46f3adcaaf5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
clc
//Initialization of variables
n1=1
n2=2
c1=5.02
c2=4.97
t1=60 //F
t2=100 //F
R0=10.73
p1=30 //psia
p2=10 //psia
//calcualtions
t=(n1*c1*t1+n2*c2*t2)/(n1*c1+n2*c2)
V1= n1*R0*(t1+460)/p1
V2=n2*R0*(t2+460)/p2
V=V1+V2
pm=(n1+n2)*R0*(t+460)/V
//results
printf("Pressure of mixture = %.1f psia",pm)
|