blob: 004db91041283b2ccee102ec1667c88e238e21a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Theory and Problems of Thermodynamics
// Chapter 1
// Basic Concepts
// Example 6
clear ;clc;
//Given data
X_O = 0.21 // X_O = molefraction of oxygen
X_N = 0.79 // X_N = molefraction of nitrogen
mw_O = 32 // mw_O = molecular mass of oxygen
mw_N = 28 // mw_N = molecular mass of nitrogen
//Calculate mass of 1 kmol air
m = X_O * mw_O + X_N * mw_N; //mass of 1 kmol air
// Results
mprintf('Mass of 1 kmol air = %5.2f kg', m)
|