summaryrefslogtreecommitdiff
path: root/2762/CH1/EX1.4.2/1_4_2.sce
blob: 631027402235e4c6b6b99323c672becfe7201403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Transport Processes and Seperation Process Principles
//Chapter 1
//Example 1.4-2
//Introduction to engineering principles and units
//given data
//Pressure and composition calculation
//A:carbon dioxide, B: carbon monoxide, C: Nitrogen gas, D: Oxygen gas
pA=75;
pB=50;
pC=595; 
pD=26;
//above are the patial pressures of the given gases respectively in mm Hg
P=pA+pB+pC+pD; //total pressure of the mixture
mprintf("the total pressure in mm Hg is %d", P);//
xA=pA/P;
xB=pB/P;
xC=pC/P;
xD=pD/P;
//above are the patial pressures of the given gases respectively
mprintf(" the mole fractions of the carbon dioxide %f",xA);
mprintf(" the mole fractions of the carbon monoxide %f",xB);
mprintf(" the mole fractions of the nitrogen %f",xC);
mprintf(" the mole fractions of the oxygen %f",xD);