diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2090/CH2 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2090/CH2')
-rwxr-xr-x | 2090/CH2/EX2.1/Chapter2_example1.sce | 38 | ||||
-rwxr-xr-x | 2090/CH2/EX2.10/Chapter2_example10.sce | 26 | ||||
-rwxr-xr-x | 2090/CH2/EX2.2/Chapter2_example2.sce | 22 | ||||
-rwxr-xr-x | 2090/CH2/EX2.4/Chapter2_example4.sce | 38 | ||||
-rwxr-xr-x | 2090/CH2/EX2.5/Chapter2_example5.sce | 23 | ||||
-rwxr-xr-x | 2090/CH2/EX2.6/Chapter2_example6.sce | 18 | ||||
-rwxr-xr-x | 2090/CH2/EX2.7/Chapter2_example7.sce | 16 | ||||
-rwxr-xr-x | 2090/CH2/EX2.8/Chapter2_example8.sce | 30 | ||||
-rwxr-xr-x | 2090/CH2/EX2.9/Chapter2_example9.sce | 35 |
9 files changed, 246 insertions, 0 deletions
diff --git a/2090/CH2/EX2.1/Chapter2_example1.sce b/2090/CH2/EX2.1/Chapter2_example1.sce new file mode 100755 index 000000000..5dd63f29c --- /dev/null +++ b/2090/CH2/EX2.1/Chapter2_example1.sce @@ -0,0 +1,38 @@ +clc
+clear
+//Input data
+d=20;//Cylinder bore diameter in cm
+L=25;//Stroke length in cm
+Vc=1570;//The clearance volume in cm^3
+P1=1;//Pressure at the beginning of the compression in bar
+T1=300;//Temperature at the beginning of the compression in K
+T3=1673;//The maximum temperature of the cycle in K
+pi=3.141;//Mathematical constant value of pi
+Cv=0.718;//specific heat at constant volume for air in kJ/kgK
+R=0.287;//Real gas constant in kJ/kgK
+g=1.4;//Isentropic index
+c=500;//Number of cycles per minute
+
+//Calculations
+Vs=(pi/4)*d^2*L;//Swept volume in cm^3
+V1=Vs+Vc;//According to pv diagram Total volume i.e sum of swept and clearance volume in cm^3
+V2=Vc;//Volume according to pv diagram in cm^3
+r=V1/V2;//Compression ratio
+T2=T1*r^(g-1);//In isentropic process, Temperature at point 2 in degree centigrade
+P2=P1*r^g;//In isentropic process, Pressure at point 2 in bar
+P3=P2*(T3/T2);//In constant volume, process Pressure at point 3 in bar
+T4=T3*(1/r)^(g-1);//In isentropic process, Temperature at point 4 in degree centigrade
+P4=P3*(1/r)^(g);//In isentropic process, Pressure at point 4 in bar
+no=(1-(1/r)^(g-1))*100;//Air standard efficiency of otto cycle
+Q1=Cv*(T3-T2);//Heat supplied in kJ/kg
+Q2=Cv*(T4-T1);//Heat rejected in kJ/kg
+W=Q1-Q2;//Work done per unit mass in kJ/kg
+m=[(P1*10^5*V1*10^-6)/(R*T1)]/1000;//The amount of mass in kg
+W1=W*m;//Work done in kJ
+pm=[(W1*10^3)/(Vs*10^-6)]/10^5;//Mean effective pressure in N/m^2
+P=W1*(c/60);//Power developed in kW
+
+//Output
+printf('Temperature at point 2 = %3.1f K \n Pressure at point 2 = %3.3f bar \n Pressure at point 3 = %3.2f bar \n Temperature at point 4 = %3.0f K \n Pressure at point 4 = %3.3f bar \n Air standard efficiency of otto cycle = %3.4f percent \n Work done = %3.2f kJ \n Mean effective pressure = %3.3f bar \n Power developed = %3.1f kW ',T2,P2,P3,T4,P4,no,W1,pm,P)
+
+
diff --git a/2090/CH2/EX2.10/Chapter2_example10.sce b/2090/CH2/EX2.10/Chapter2_example10.sce new file mode 100755 index 000000000..71ee14072 --- /dev/null +++ b/2090/CH2/EX2.10/Chapter2_example10.sce @@ -0,0 +1,26 @@ +clc
+clear
+//Input data
+p1=1//Inlet pressure in bar
+T1=27+273//Temperature in K
+p2=4//pressure at point 2 in bar
+p3=16//Maximum pressure in bar
+Cv=0.573//specific heat at constant volume for gas in kJ/kgK
+Cp=0.761//specific heat at constant pressure for gas in kJ/kgK
+
+//Calculations
+g=(Cp/Cv)//Adiabatic index
+T2=(T1*(p2/p1)^((g-1)/g))//Temperature in K
+T3=(p3/p2)*T2//Temperature in K
+T4=T3*(p1/p3)^((g-1)/g)//Temperature in K
+Q1=Cv*(T3-T2)//Heat supplied in kJ/kg
+Q2=Cp*(T4-T1)//Heat rejected in kJ/kg
+W=Q1-Q2//Workdone in kJ/kg
+n=(W/Q1)*100//Efficiency of cycle
+r=(p2/p1)^(1/g)//Compression ratio
+R=(Cp-Cv)//Universal gas constant in kJ/kg.K
+Vs=(R*1000*T1*(r-1))/(p1*10^5*r)//Swept volume in m^3/kg
+pm=(W/(Vs*100))//Mean effective pressure in bar
+
+//Output
+printf('(a) The work done per kg of gas is %3.1f kJ/kg \n (b) The efficiency of the cycle is %3.1f percent \n (c) Mean effective pressure is %3.2f bar',W,n,pm)
diff --git a/2090/CH2/EX2.2/Chapter2_example2.sce b/2090/CH2/EX2.2/Chapter2_example2.sce new file mode 100755 index 000000000..254d00813 --- /dev/null +++ b/2090/CH2/EX2.2/Chapter2_example2.sce @@ -0,0 +1,22 @@ +clc
+clear
+//Input data
+CV=42000;//The calorific value of the fuel in kJ/kg
+pa=5//Percentage of compression
+Pa=1.2;//Pressure in the cylinder at 5% compression stroke
+pb=75//Percentage of compression
+Pb=4.8;//Pressure in the cylinder at 75% compression stroke
+g=1.3;//polytropic index
+g1=1.4//Isentropic index
+n=0.6;//Air standard efficiency
+
+
+//Calculations
+V=(Pb/Pa)^(1/1.3);//Ratio of volumes
+r=(V*(pb/100)-(pa/100))/((1-(pa/100))-(V*(1-(pb/100))))//Compression ratio
+n1=((1-(1/r)^(g1-1)))*100//Relative efficiency
+nthj=n*(n1/100)//Indicated thermal efficiency
+x=(1/(CV*nthj))*3600//Specific fuel consumption in kg/kW.h
+
+//Output
+printf('The compression ratio of the engine is %3.1f \n The specific fuel consumption is %3.3f kg/kW.h',r,x)
diff --git a/2090/CH2/EX2.4/Chapter2_example4.sce b/2090/CH2/EX2.4/Chapter2_example4.sce new file mode 100755 index 000000000..ff82428bb --- /dev/null +++ b/2090/CH2/EX2.4/Chapter2_example4.sce @@ -0,0 +1,38 @@ +clc
+clear
+//Input data
+d=0.2;//The diameter of the cylinder bore in m
+L=0.3;//The length of the stroke in m
+P1=1;//The pressure at the beginning of the compression in bar
+T1=300;//The temperature at the beginning of the compression in K
+r=16;//Compression ratio
+V=0.08;//Cutt off takes place at 8& of the stroke
+pi=3.141;//Mathematical constant value of pi
+R=0.287;//Real gas constant in kJ/kgK
+g=1.4;//Isentropic index
+Cp=1.005;//Specific heat at constant prassure in kJ/kgK
+Cv=0.718;//specific heat at constant volume for air in kJ/kgK
+
+//Calculations
+Vs=(pi/4)*d^2*L;//Swept volume in m^3
+Vc=Vs/(r-1);//Clearance volume in m^3
+V2=Vc;//Volume at point 2 in m^3
+V1=Vs+Vc;//Volume at point 1 in m^3
+m=(P1*10^5*V1)/(R*T1);//The amount of mass in kg
+P2=P1*(r^g);//Pressure at point 2 in bar
+P3=P2;//Pressure at point 3 in bar
+T2=T1*r^(g-1);//Temperature at point 2 in K
+V3=(V*Vs)+V2;//Volume at point 3 in m^3
+C=V3/V2;//Cut off ratio
+T3=C*T2;//Temperature at point 3 in K
+P4=P3*(C/r)^g;//Pressure at the point 4 in bar
+T4=T3*(C/r)^(g-1);//Temperature at point 4 in K
+V4=V1;//Volume at point 4 in m^3
+Q1=[m*Cp*(T3-T2)]/1000;//Heat supplied in kJ
+Q2=[m*Cv*(T4-T1)]/1000;//Heat rejected in kJ
+W=[Q1-Q2];//Work done per cycle in kJ
+na=(W/Q1)*100;//Air standard efficiency
+Pm=[W*1000/Vs]/10^5;//Mean effective pressure in bar
+
+//Output
+printf('(a) Volume at point 2 = %3.6f m^3 \n Volume at point 1 = %3.6f m^3 \n Pressure at point 2 = %3.1f bar \n Temperature at point 2 = %3.1f K \n Temperature at point 3 = %3.0f K \n Pressure at point 4 = %3.3f bar \n Temperature at point 4 = %3.1f K \n Volume at point 4 = %3.6f m^3 \n (b) cut off ratio = %3.2f \n (c) Work done per cycle = %3.3f kJ \n (d) air standard efficiency = %3.2f percent \n (e)Mean effective pressure = %3.2f bar ',V2,V1,P2,T2,T3,P4,T4,V4,C,W,na,Pm)
diff --git a/2090/CH2/EX2.5/Chapter2_example5.sce b/2090/CH2/EX2.5/Chapter2_example5.sce new file mode 100755 index 000000000..483d22229 --- /dev/null +++ b/2090/CH2/EX2.5/Chapter2_example5.sce @@ -0,0 +1,23 @@ +clc
+clear
+//Input data
+Pm=7;//The mean effective pressure of a diesel cycle in bar
+r=12;//The compression ratio
+P1=1;//Initial pressure in bar
+g=1.4;//Isentropic index
+
+//Calculations
+function[f] = F(x);//function definition
+ f = 45.4*x- 12*x^1.4 -64.2;
+endfunction
+x = 1;//Initial guss
+function[z] = D(x)//Derivative
+ z= 3*x^2 - 3;
+endfunction
+y = fsolve(x,F, D);
+C=y;//The cut off ratio
+na=[1-(1/(r^(g-1)))*[((C^g)-1)/(g*(C-1))]]*100;//Air standard efficiency
+
+//Output
+printf('The cut off ratio = %3.1f \n The air standard efficiency = %3.2f percent ',C,na)
+
diff --git a/2090/CH2/EX2.6/Chapter2_example6.sce b/2090/CH2/EX2.6/Chapter2_example6.sce new file mode 100755 index 000000000..987b51114 --- /dev/null +++ b/2090/CH2/EX2.6/Chapter2_example6.sce @@ -0,0 +1,18 @@ +clc
+clear
+//Input data
+m=30;//The air fuel ratio by mass
+T1=300;//The temperature of air at the beginning of the compression in K
+r=16;//The compression ratio
+CV=42000;//The calorific value of the fuel in kJ/kg
+g=1.4;//Isentropic index
+Cp=1.005;//Specific heat at constant prassure in kJ/kgK
+
+//Calculations
+T2=T1*(r^(g-1));//Temperature at point 2 in K
+T3=[(1/m)*(CV/Cp)]+T2;//Temperature at point 3 in K
+C=T3/T2;//The cut off ratio
+n=(1-[(1/r^(g-1))*[((C^g)-1)/(g*(C-1))]])*100;//The ideal efficiency of the engine based on the air standard cycle
+
+//Output
+printf(' The ideal efficiency of the engine based on the air standard cycle = %3.1f percent ',n)
diff --git a/2090/CH2/EX2.7/Chapter2_example7.sce b/2090/CH2/EX2.7/Chapter2_example7.sce new file mode 100755 index 000000000..b3c9dde24 --- /dev/null +++ b/2090/CH2/EX2.7/Chapter2_example7.sce @@ -0,0 +1,16 @@ +clc
+clear
+//Input data
+p1=1//Inlet pressure in bar
+p2=32.425//Pressure at the end of isentropic compression in bar
+r=6//Ratio of expansion
+r1=1.4//Isentropic index
+
+//Calculations
+rc=(p2/p1)^(1/r1)//Compression ratio
+b=(rc/r)//cut-off ratio
+n=(1-((b^r1-1)/(rc^(r1-1)*r1*(b-1))))*100//Air-standard efficiency
+pm=((p1*rc^r1*n/100*r1*(b-1))/((r1-1)*(rc-1)))//Mean effective pressure in bar
+
+//Output
+printf('Air-standard efficiency is %3.2f percent \n Mean effective pressure is %3.3f bar',n,pm)
diff --git a/2090/CH2/EX2.8/Chapter2_example8.sce b/2090/CH2/EX2.8/Chapter2_example8.sce new file mode 100755 index 000000000..1fe96216a --- /dev/null +++ b/2090/CH2/EX2.8/Chapter2_example8.sce @@ -0,0 +1,30 @@ +clc
+clear
+//Input data
+rc=15//Compression ratio
+p1=1//Pressure at which compression begins in bar
+T1=27+273//Temperature in K
+pm=60//Maximum pressure in bar
+h=2//Heat transfered to air at constant volume is twice that at constant pressure
+g=1.4;//Isentropic index
+Cv=0.718;//specific heat at constant volume for air in kJ/kgK
+Cp=1.005;//specific heat at constant pressure for air in kJ/kgK
+R=0.287;//Real gas constant in kJ/kgK
+
+//Calculations
+T2=(T1*rc^(g-1))//Temperature in K
+p2=(p1*rc^g)//Pressure in bar
+T3=(T2*(pm/p2))//Temperature in K
+T4=(Cv*(T3-T2))/(2*Cp)+T3//Temperature in K
+b=(T4/T3)//Cut-off ratio
+T5=(T4*(b/rc)^(g-1))//Temperature in K
+p5=(p1*(T5/T1))//Pressure in bar
+Q1=(Cv*(T3-T2))+(Cp*(T4-T3))//Heat supplied per unit mass in kJ/kg
+Q2=Cv*(T5-T1)//Heat rejected per unit mass in kJ/kg
+W=(Q1-Q2)//Workdone in kJ/kg
+n=(W/Q1)*100//Air standard efficiency
+Vs=((1*R*1000*T1)/(p1*10^5))*(1-1/rc)//Swept volume in m^3/kg
+pmean=((W*1000)/Vs)/10^5//Mean-effective pressure in bar
+
+//Output
+printf('(a) The pressures and temperatures at the cardinal points of the cycle are \n T2 = %3.0f K p2 = %3.1f bar \n T3 = %3.0f K p3 = %3.0f bar \n T4 = %3.0f K p4 = %3.0f bar \n T5 = %3.0f K p5 = %3.2f bar \n (b) The cycle efficiency is %3.0f percent \n (c) The mean effective pressure of the cycle is %3.2f bar',T2,p2,T3,pm,T4,pm,T5,p5,n,pmean)
diff --git a/2090/CH2/EX2.9/Chapter2_example9.sce b/2090/CH2/EX2.9/Chapter2_example9.sce new file mode 100755 index 000000000..744058e53 --- /dev/null +++ b/2090/CH2/EX2.9/Chapter2_example9.sce @@ -0,0 +1,35 @@ +clc
+clear
+//Input data
+r=12;//Compression ratio
+B=1.615;//Cut off ratio
+p3=52.17;//Maximum pressure in bar
+p4=p3;//Maximum pressure in bar
+p1=1;//Initial pressure in bar
+T1=(62+273);//Initial temperature in K
+n=1.35;//Indices of compression and expansion
+g=1.4;//Adiabatic exponent
+mR=0.287;//Real gas constant in kJ/kgK
+Cv=0.718;//specific heat at constant volume for air in kJ/kgK
+Cp=1.005;//specific heat at constant pressure for air in kJ/kgK
+
+//Calculations
+T2=T1*r^(n-1);//The temperature at point 2 in K
+p2=p1*(r)^n;//The pressure at point 2 in bar
+T3=T2*(p3/p2);//The temperature at point 3 in K
+T4=T3*B;//The temperature at point 4 in K
+T5=T4*(B/r)^(n-1);//The temperature at point 5 in K
+Q12=[(g-n)/(g-1)]*mR*[(T1-T2)/(n-1)];//Heat transfer during the process 1-2 for unit mass in kJ/kg
+Q23=Cv*(T3-T2);//Heat transfer during the process 2-3 for unit mass in kJ/kg
+Q34=Cp*(T4-T3);//Heat transfer during the process 3-4 for unit mass in kJ/kg
+Q45=((g-n)/(g-1))*mR*((T4-T5)/(n-1));//Heat transfer during the process 4-5 for unit mass in kJ/kg
+Q51=Cv*(T1-T5);//Heat transfer during the process 5-1 for unit mass in kJ/kg
+Q1=Q23+Q34+Q45;//Heat supplied in kJ/kg
+Q2=-Q12+(-Q51);//Heat rejected in kJ/kg
+W=Q1-Q2;//Work done in kJ/kg
+E=[W/Q1]*100;//Efficiency in percentage
+Vs=[(mR*T1)/p1]*(r-1)/r;//Swept volume for unit mass in m^3/kg
+pm=[W*1000/Vs]/10^3;//Mean effective pressure in bar
+
+//Output
+printf(' (a)The temperature at cardinal points ,\n T2 = %3.0f K\n T3 = %3.0f K \n T4 = %3.0f K \n T5 = %3.0f K \n (b) The cycle efficiency = %3.1f percent \n (c) The mean effective pressure of the cycle = %3.3f bar ',T2,T3,T4,T5,E,pm)
|