diff options
Diffstat (limited to '2120/CH2')
-rwxr-xr-x | 2120/CH2/EX2.1/exa_2_1.sce | 14 | ||||
-rwxr-xr-x | 2120/CH2/EX2.12/exa_2_12.sce | 13 | ||||
-rwxr-xr-x | 2120/CH2/EX2.13/exa_2_13.sce | 12 | ||||
-rwxr-xr-x | 2120/CH2/EX2.14/exa_2_14.sce | 24 | ||||
-rwxr-xr-x | 2120/CH2/EX2.15/exa_2_15.sce | 16 | ||||
-rwxr-xr-x | 2120/CH2/EX2.16/exa_2_16.sce | 11 | ||||
-rwxr-xr-x | 2120/CH2/EX2.17/exa_2_17.sce | 15 | ||||
-rwxr-xr-x | 2120/CH2/EX2.2/exa_2_2.sce | 34 | ||||
-rwxr-xr-x | 2120/CH2/EX2.3/exa_2_3.sce | 19 | ||||
-rwxr-xr-x | 2120/CH2/EX2.4/exa_2_4.sce | 17 | ||||
-rwxr-xr-x | 2120/CH2/EX2.5/exa_2_5.sce | 20 | ||||
-rwxr-xr-x | 2120/CH2/EX2.6/exa_2_6.sce | 12 | ||||
-rwxr-xr-x | 2120/CH2/EX2.7/exa_2_7.sce | 23 |
13 files changed, 230 insertions, 0 deletions
diff --git a/2120/CH2/EX2.1/exa_2_1.sce b/2120/CH2/EX2.1/exa_2_1.sce new file mode 100755 index 000000000..0e178bb87 --- /dev/null +++ b/2120/CH2/EX2.1/exa_2_1.sce @@ -0,0 +1,14 @@ +// Exa 2.1
+clc;
+clear;
+close;
+// Given data
+p1= 2;// in bar
+v1= 30;// in litre
+T1= 27+273;// in K
+T2= -3+273;// in K
+v2= v1;// in litre
+// Gas law p1*v1/T1= p2*v2/T2
+p2= p1*v1*T2/(T1*v2);// in bar
+disp(p2,"The air pressure in the tyre in bar is :")
+
diff --git a/2120/CH2/EX2.12/exa_2_12.sce b/2120/CH2/EX2.12/exa_2_12.sce new file mode 100755 index 000000000..cf190e289 --- /dev/null +++ b/2120/CH2/EX2.12/exa_2_12.sce @@ -0,0 +1,13 @@ +// Exa 2.12
+clc;
+clear;
+close;
+// Given data
+AvogadroNo= 6.023*10^23;
+n= 5/AvogadroNo;// number of moles
+v=10^-6;// in m^3
+T= -270+273;// in K
+R= 0.287;
+p= n*R*T/v;// in kPa
+p= p*10^18;// in aPa
+disp("The pressure in the space is "+string(p)+" aPa");
diff --git a/2120/CH2/EX2.13/exa_2_13.sce b/2120/CH2/EX2.13/exa_2_13.sce new file mode 100755 index 000000000..d34e993fd --- /dev/null +++ b/2120/CH2/EX2.13/exa_2_13.sce @@ -0,0 +1,12 @@ +// Exa 2.13
+clc;
+clear;
+close;
+// Given data
+T1= 300;// in K
+T2= 900;// in K
+m=2;// in kg
+Cp= '40+600/sqrt(T)+7000/T';// in kJ/kg mole K
+delta_H=m* integrate('40-600/sqrt(T)+7000/T','T',T1,T2);// in kJ/kg mole
+delta_H= delta_H/17.03;// in kJ/kg
+disp(delta_H,"Change in enthalpy in kJ/kg is : ")
diff --git a/2120/CH2/EX2.14/exa_2_14.sce b/2120/CH2/EX2.14/exa_2_14.sce new file mode 100755 index 000000000..522088c61 --- /dev/null +++ b/2120/CH2/EX2.14/exa_2_14.sce @@ -0,0 +1,24 @@ +// Exa 2.14
+clc;
+clear;
+close;
+// Given data
+m=12;// in kg mol
+v=723.7;// in m^3
+T=140;// in °C
+T=T+273;// in K
+rho= 0.644;// in kg/m^3
+Ro= 8314;// in J/kg-mole K
+// rho= m/v, where m in Kg , so rho= m*M/v
+M= rho*v/m;
+m= m*M;// in kg
+disp(M,"Molecular weight is : ")
+
+// Part (b)
+R= Ro/M;// in J/kg K
+disp(R*10^-3,"Gas constant in kJ/kg K")
+
+// Part(c)
+p= m*R*T/v;// in N/m^2
+p=p*10^-5;// in bar
+disp(p,"The pressure of the gas in bar is : ")
diff --git a/2120/CH2/EX2.15/exa_2_15.sce b/2120/CH2/EX2.15/exa_2_15.sce new file mode 100755 index 000000000..07a7c0212 --- /dev/null +++ b/2120/CH2/EX2.15/exa_2_15.sce @@ -0,0 +1,16 @@ +// Exa 2.15
+clc;
+clear;
+close;
+// Given data
+p= 0.98;// in bar
+p= p*10^5;// in N/m^2
+v=1000;// in m^3
+T= 27+273;// in K
+g= 9.8;
+M=2;
+Ro= 8314;// in J/kg-mole K
+R=Ro/M;// in kg K
+m= p*v/(R*T);// in kg
+W= m*g;// in N
+disp(W,"The load that can be lifted with the air of aerostat in N is : ")
diff --git a/2120/CH2/EX2.16/exa_2_16.sce b/2120/CH2/EX2.16/exa_2_16.sce new file mode 100755 index 000000000..aad52a47d --- /dev/null +++ b/2120/CH2/EX2.16/exa_2_16.sce @@ -0,0 +1,11 @@ +// Exa 2.16
+clc;
+clear;
+close;
+// Given data
+T1= 500;// in K
+T2= 2000;// in K
+m=1;// in kg
+Cp= '11.515-172/sqrt(T)-1530/T';// in kcal/kg mole K
+delta_H=m* integrate('11.515-172/sqrt(T)-1530/T','T',T1,T2);// in kcal/kg mole
+disp(delta_H,"Change in enthalpy in kcal/kg mole is : ")
diff --git a/2120/CH2/EX2.17/exa_2_17.sce b/2120/CH2/EX2.17/exa_2_17.sce new file mode 100755 index 000000000..5e7a65551 --- /dev/null +++ b/2120/CH2/EX2.17/exa_2_17.sce @@ -0,0 +1,15 @@ +// Exa 2.17
+clc;
+clear;
+close;
+// Given data
+u='196+0.718*t';
+pv= '0.278*(t+273)';
+duBydt= 0.718;
+Cv= duBydt;// in kJ/kg-K
+h= u+pv;
+h='273.351+1.005*t';
+dhBydt= 1.005;// in kJ/kg-K
+Cp= dhBydt;// in kJ/kg-K
+disp(Cv,"The value of Cv in kJ/kg-K is : ")
+disp(Cp,"The value of Cp in kJ/kg-K is : ")
diff --git a/2120/CH2/EX2.2/exa_2_2.sce b/2120/CH2/EX2.2/exa_2_2.sce new file mode 100755 index 000000000..39de168ba --- /dev/null +++ b/2120/CH2/EX2.2/exa_2_2.sce @@ -0,0 +1,34 @@ +// Exa 2.2
+clc;
+clear;
+close;
+// Given data
+p= 12;// in bar
+p=p*10^5;// in N/m^2
+v= 25;// in m^3
+T= 30+273;// in K
+// Part (a) Mass of each gas
+//Formula p*v=m*R*T
+R_U= 8314;// in J/kg-mole K
+M_N2= 28.016;// in mole
+M_O2= 32;// in mole
+M_CO2= 44;// in mole
+R_N2= R_U/M_N2;// in J/kg K
+R_O2= R_U/M_O2;// in J/kg K
+R_CO2= R_U/M_CO2;// in J/kg K
+m_of_N2= p*v/(R_N2*T);// in kg
+m_of_O2= p*v/(R_O2*T);// in kg
+m_of_CO2= p*v/(R_CO2*T);// in kg
+disp(m_of_N2,"The mass of Nitrogen gas stored in the vessel in kg is : ")
+disp(m_of_O2,"The mass of Oxygen gas stored in the vessel in kg is : ")
+disp(round(m_of_CO2),"The mass of Carbon dioxide gas stored in the vessel in kg is : ")
+
+// Part (b) Molar Volume
+// Formula v_molar= M*R*T/p= R_U*T/p
+v_molar= R_U*T/p;// in m^3
+disp(v_molar,"Molar volume of the gas mixture in m^3 is : ")
+
+// Part (c) Average density
+// rho_avg= total mass/total volume
+rho_avg= (m_of_N2+m_of_O2+m_of_CO2)/v;// in kg/m^3
+disp(rho_avg,"Average density of the gas mixture in kg/m^3 is : ")
diff --git a/2120/CH2/EX2.3/exa_2_3.sce b/2120/CH2/EX2.3/exa_2_3.sce new file mode 100755 index 000000000..062db4c22 --- /dev/null +++ b/2120/CH2/EX2.3/exa_2_3.sce @@ -0,0 +1,19 @@ +// Exa 2.3
+clc;
+clear;
+close;
+// Given data
+Qp= 1230; // kJ/kg
+Qv= 795; // kJ/kg
+t1= 16;// in °C
+t2= 96;// in °C
+R_U= 8.314;
+delta_T= t2-t1;// in °C
+Cp= Qp/delta_T;// in kJ/kg °C
+disp(Cp,"The value of Cp in kJ/kg°C")
+Cv= Qv/delta_T;// in kJ/kg °C
+disp(Cv,"The value of Cv in kJ/kg°C")
+R= Cp-Cv;// in kJ/kg °C
+disp(R,"The value of R in kJ/kg°C")
+molecular_weight= R_U/R;
+disp(molecular_weight,"Molecular weight of the gas is : ")
diff --git a/2120/CH2/EX2.4/exa_2_4.sce b/2120/CH2/EX2.4/exa_2_4.sce new file mode 100755 index 000000000..b0a65f69e --- /dev/null +++ b/2120/CH2/EX2.4/exa_2_4.sce @@ -0,0 +1,17 @@ +// Exa 2.4
+clc;
+clear;
+close;
+// Given data
+a= 0.85;
+b= 0.00004;
+c= 5*10^-5;
+T1= 300;// in K
+T2= 2300;// in K
+gama= 1.5;// the ratio of specific heats
+m=1;// in kg
+delta_H= m*integrate('a+b*T+c*T^2','T',T1,T2);// in kJ
+disp(delta_H*10^-3,"Change in enthalpy in MJ is : ")
+// Formula delta_U= integration of m*Cv = integration of m*Cp/gama= delta_H/gama
+delta_U= delta_H/gama;// in kJ
+disp(delta_U*10^-3,"The change in internal energy in MJ is : ")
diff --git a/2120/CH2/EX2.5/exa_2_5.sce b/2120/CH2/EX2.5/exa_2_5.sce new file mode 100755 index 000000000..b30a45489 --- /dev/null +++ b/2120/CH2/EX2.5/exa_2_5.sce @@ -0,0 +1,20 @@ +// Exa 2.5
+clc;
+clear;
+close;
+// Given data
+v= 0.9/3;// in m^3/kg
+v= 2*v;// in m^3/kg mole (as M_hydrogen = 2)
+T=120+273;// in K
+R=8314;// in J/kg mole K
+a=2.51*10^4;// in Nm^4/(kg mole)^2
+b= 0.0262;
+// Part (a)
+p= R*T/v;// in N/m^2
+p= p*10^-5;// in bar
+disp(p,"Using perfect gas law the pressure for unit mass of hydrogen in bar is : ")
+
+// Part (b)
+p= R*T/(v-b)-a/v^2;// N/m^2
+p= p*10^-5;// in bar
+disp(p,"Using Van der waals equation, the pressure in bar is : ")
diff --git a/2120/CH2/EX2.6/exa_2_6.sce b/2120/CH2/EX2.6/exa_2_6.sce new file mode 100755 index 000000000..d4902d050 --- /dev/null +++ b/2120/CH2/EX2.6/exa_2_6.sce @@ -0,0 +1,12 @@ +// Exa 2.6
+clc;
+clear;
+close;
+// Given data
+p1= 0.98;// in bar
+p2= 0.6;// in bar
+v1= 0.45;// in m^3/kg
+// Applying Boyle's law
+v2= p1*v1/p2;// in m^3/kg
+rho2= 1/v2;// in kg/m^3
+disp(rho2,"The density of the gas under the changed condition in kg/m^3 is : ")
diff --git a/2120/CH2/EX2.7/exa_2_7.sce b/2120/CH2/EX2.7/exa_2_7.sce new file mode 100755 index 000000000..93220b4d3 --- /dev/null +++ b/2120/CH2/EX2.7/exa_2_7.sce @@ -0,0 +1,23 @@ +// Exa 2.7
+clc;
+clear;
+close;
+// Given data
+r=5;// in cm
+R_U= 8314
+T= 27+273;// in K
+V= 4/3*%pi*r^3;// volume of balloon in cm^3
+// atmPressure= 75 cm off mercury = 75/76*1.01325
+atmPressure= round(75/76*1.01325) ;// in bar
+p= atmPressure;// pressure of hydrogen in balloon in bar
+p=p*10^5;// in N/m^2
+R= R_U/2;// in J/kg K
+m1= p*V/(R*T);// in kg
+// The volume of air displaced = the volume of balloon, so
+R=287;
+T=20+273;// in K
+m2= p*V/(R*T);// in kg
+payload= m2-m1;// in kg
+disp(payload,"Payload that can be lifted along with the balloon in kg is : ")
+
+
|