summaryrefslogtreecommitdiff
path: root/965/CH13/EX13.1/1.sci
blob: c6bf289f913610871298623d1d3a110f41c70a4e (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
28
29
30
31
clc;
clear all;
disp("fracion and pressure")

Ma=24;
Mb=48;
M=30;
rho=1.2;// kg/m^3
T=290;// K
C=rho/M;// mole concentration of the mixture
//Ca=C-Cb
//rhoA+rhoB=rho;
//rhoA=Ma*Ca
//rhoB=Mb*Cb
//24*(C-Cb)+48*Cb=rho
Cb=(rho-24*C)/24;//kg mole/m^3
Ca=C-Cb;//kg mole/m^3
rhoA=Ma*Ca;// kg/m^3
rhoB=Mb*Cb;// kg/m^3
xA=Ca/C;
disp(xA,"mole fraction of A, xA =")
xB=Cb/C;
disp(xB,"mole fraction of B, xB =")
mA=rhoA/rho;
disp(mA,"mole fraction of A, mA =")
mB=rhoB/rho;
disp(mB,"mole fraction of B, mB =")
G=8.314;// kJ/(kgmole*K)
p=rho*G*T/M;
disp("kPa",p,"Total pressure p =")