blob: ee7d849eecd1827238d11ef845a3f8bf8e8ee296 (
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
|
// Theory and Problems of Thermodynamics
// Chapter 9
// Air_water Vapor Mixtures
// Example 3
clear ;clc;
//Given data
gam = 1.5 // specific heat ratio
Cp1 = 20.7860 // molar heat capacity of Helium in kJ/mol K
Cv1 = 12.4717 // molar heat capacity of Helium in kJ/mol K
Cp2 = 28.6455 // molar heat capacity of Hydrogen in kJ/mol K
Cv2 = 20.3311 // molar heat capacity of Hydrogen in kJ/mol K
// Calculations
// X1 be the molefraction of He in the mixture
// CP_m = X1*Cp1 + (1-X1)*Cp2
// Cv_m = X1*Cv1 + (1-X1)*Cv2
// gam = (X1*Cp1 + (1-X1)*Cp2)/(X1*Cv1 + (1-X1)*Cv2)
deff('y=mol_frac(X1)', 'y = gam-(X1*Cp1 + (1-X1)*Cp2)/(X1*Cv1 + (1-X1)*Cv2)')
X1 = fsolve(0.1,mol_frac)
X2 = (1-X1)*100 // volume composition of H2
X1 = X1 * 100 // volume composition of He
// Output Results
mprintf('Volume percent composition of Helium = %4.2f ' ,X1);
mprintf('\n Volume percent composition of Hydrogen = %4.2f ' ,X2);
|