summaryrefslogtreecommitdiff
path: root/965/CH13/EX13.2/2.sci
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /965/CH13/EX13.2/2.sci
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '965/CH13/EX13.2/2.sci')
-rw-r--r--965/CH13/EX13.2/2.sci34
1 files changed, 34 insertions, 0 deletions
diff --git a/965/CH13/EX13.2/2.sci b/965/CH13/EX13.2/2.sci
new file mode 100644
index 000000000..ad749e77e
--- /dev/null
+++ b/965/CH13/EX13.2/2.sci
@@ -0,0 +1,34 @@
+clc;
+clear all;
+disp("composition determination")
+T=273+15;// K
+G=8314;// kJ/(kgmole*K)
+p=1.1*10^(5);// N/m^2
+pO2=0.21*p;
+pN2=0.79*p;
+
+CO2=pO2/(G*T);// kg mole/m^3
+disp("kg mole/m^3",CO2,"molar concentration of O2, CO2 =")
+CN2=pN2/(G*T);// kg mole/m^3
+disp("kg mole/m^3",CN2,"molar concentration of N2, CN2 =")
+
+MO2=32;
+MN2=28;
+
+rhoO2=MO2*CO2;//kg/m^3
+rhoN2=MN2*CN2;//kg/m^3
+disp("kg/m^3",rhoO2,"molar density of O2 rhoO2 =")
+disp("kg/m^3",rhoN2,"molar density of N2, rhoN2 =")
+
+rho=rhoO2+rhoN2;
+xO2=rhoO2/rho;
+disp(xO2,"mass fraction of O2 xO2 =")
+xN2=rhoN2/rho;
+disp(xN2,"mass fraction of N2, xN2 =")
+
+C=CO2+CN2
+mO2=CO2/C;
+disp(xO2,"mole fraction of O2, mO2 =")
+mN2=CN2/C;
+disp(xN2,"mole fraction of N2, mN2 =")
+