diff options
Diffstat (limited to '555/CH5')
-rw-r--r-- | 555/CH5/EX5.1/1.sce | 23 | ||||
-rw-r--r-- | 555/CH5/EX5.2/2.sce | 28 | ||||
-rw-r--r-- | 555/CH5/EX5.3/3.sce | 30 | ||||
-rw-r--r-- | 555/CH5/EX5.4/4.sce | 16 | ||||
-rw-r--r-- | 555/CH5/EX5.5/5.sce | 32 | ||||
-rw-r--r-- | 555/CH5/EX5.6/6.sce | 21 | ||||
-rw-r--r-- | 555/CH5/EX5.8/8.sce | 21 |
7 files changed, 171 insertions, 0 deletions
diff --git a/555/CH5/EX5.1/1.sce b/555/CH5/EX5.1/1.sce new file mode 100644 index 000000000..855710001 --- /dev/null +++ b/555/CH5/EX5.1/1.sce @@ -0,0 +1,23 @@ +// Implementation of example 5.1
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//Work done W, Velocity V, Pressure p, Specific volume v, Height Z
+V1=7 // m/sec
+p1=100 // kPa
+v1=0.95 // m^3/kg
+Q=-58 // kW
+V2=5 // m/sec
+p2=700 // kPa
+v2=0.19 // m^3/kg
+w=0.5 // kg/sec
+dU=90 // kJ/kg (since its given that u2=u1+90)
+// steady flow energy equation is w(u1+p1v1+V1^2/2+Z1g)+dQ/dt=w(u2+p2v2+V2^2/2+Z2g)+dW/dt
+W=-w*[dU+(p2*v2-p1*v1)+(V2*V2-V1*V1)/2000]+Q;
+printf("rate of work input = %.2f kW \n",W);
+temp=(v1*V2)/(v2*V1);
+ratio=sqrt(temp);
+printf("ratio of diameter is = %.2f",ratio);
+// end
\ No newline at end of file diff --git a/555/CH5/EX5.2/2.sce b/555/CH5/EX5.2/2.sce new file mode 100644 index 000000000..508d322da --- /dev/null +++ b/555/CH5/EX5.2/2.sce @@ -0,0 +1,28 @@ +// Implementation of example 5.2
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//Work done W, Velocity V, Pressure p, Specific volume v, Height Z
+W = 135;//kJ/kg
+Q = - 9;//kJ/kg
+v1 = 0.37; //m^3/kg
+p1 = 600;//kPa
+V1 = 16;//m/s
+Z1 = 32;//m
+v2 = 0.62;
+p2 = 100;
+V2 = 270;
+Z2 = 0;
+g = 9.81;//m/s^2
+//First law:
+//u1 + p1v1 + V1^2/2 + Z1g + dQ/dm = u2+ p2v2 + V2^2/2 + Z2g + dW/dm
+//Change in specific internal energy 'dU'
+dU = (p2*v2 - p1*v1) + (V2^2 - V1^2)*10^(-3)/2 + (Z2 - Z1)*g*10^(-3) + W - Q;
+if(dU>0)
+ printf('Specific internal energy decreases by %0.3f kJ',dU);
+else
+ printf('Specific internal energy increases by %0.3f kJ',-dU);
+end
+// end
\ No newline at end of file diff --git a/555/CH5/EX5.3/3.sce b/555/CH5/EX5.3/3.sce new file mode 100644 index 000000000..adb2ae785 --- /dev/null +++ b/555/CH5/EX5.3/3.sce @@ -0,0 +1,30 @@ +// Implementation of example 5.3
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//diameter of pipe 'd', heat loss from the pipe 'Q'
+d = 0.2; //m
+//parameters with subscript 1 refer to at boiler's end
+//and those with subscript 2 refer to at turbine end
+p1 = 4; //MPa
+t1 = 400; //degree C
+h1 = 3213.6; //kJ/kg
+v1 = 0.073; //m^3/kg
+p2 = 3.5; //MPa
+t2 = 392; //degree C
+h2 = 3202.6; //kJ/kg
+v2 = 0.084; //m^3/kg
+Q = -8.5; //dQ/dm in kJ/kg
+//dW/dm = 0
+//V = V2^2 - V1^2;
+V = 2*((h1-h2) + Q)/10^(-3);
+//Velocity at turbine end 'V1'
+V1 = sqrt(V/((v2/v1)^2-1));
+//Area of cross-ection of pipeline 'A'
+A = (%pi)/4 * d^2;
+//stream flow rate 'w'
+w = A * V1/v1;
+printf("Mass flow rate, w = %0.1f kg/s",w);
+// end
\ No newline at end of file diff --git a/555/CH5/EX5.4/4.sce b/555/CH5/EX5.4/4.sce new file mode 100644 index 000000000..837f21862 --- /dev/null +++ b/555/CH5/EX5.4/4.sce @@ -0,0 +1,16 @@ +// Implementation of example 5.4
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//Water received by heater at rate w1 at enthalpy h1
+//Enthalpy of steam mixed with water h2
+//Rate of liquid leaving the heater w3 at enthalpy h3
+w1 = 4.2;//kg/s
+h1 = 313.93;//kJ/kg
+h2 = 2676;
+h3 = 419;
+//solving equaitons: w1 + w2 = w3 and w1h1 + w2h2 = w3h3
+w2 = w1*(h3-h1)/(h2-h3);
+printf('Steam supplied to heater per hour, w2 = %0.0f kg/h',w2*3600);
\ No newline at end of file diff --git a/555/CH5/EX5.5/5.sce b/555/CH5/EX5.5/5.sce new file mode 100644 index 000000000..dd75dbfc6 --- /dev/null +++ b/555/CH5/EX5.5/5.sce @@ -0,0 +1,32 @@ +// Implementation of example 5.5
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//initial velocity 'V1', initial temperature of air 't1',Temperature after passing through heat exchanger 't2', Temperature after expansion 't3',Velocity after leaving turbine 'V3', Temperature after leaving turbine 't4', air flow rate 'w', enthalpy of air 'h', specific heat 'Cp'
+t1 = 15; //degree C
+t2 = 800; //degree C
+V1 = 30; //m/s
+V2 = 30; //m/s
+t3 = 650; //degree C
+V3 = 60; //m/s
+t4 = 500; //degree C
+g = 9.8; //m/s2
+w = 2; //kg/s
+cp = 1.005; //kJ/kg K
+h2 = cp*t2;
+h1 = cp*t1;
+h3 = cp*t3;
+h4 = cp*t4;
+//Rate of heat transfer 'Q12'
+Q12 = w*(h2-h1); //kJ/s
+mprintf("Rate of heat transfer to air in heat exchanger, Q12 = %d kJ/s\n\n",round(Q12));
+//V = V2^2 - V3^2
+//Power output from turbine 'Wt'
+Wt = w*((V2^2-V3^2)*10^(-3)/2 + (h2-h3)); //kW
+mprintf("Power output from turbine, Wt = %0.1f kW\n\n",Wt);
+//Velocity at exit
+V4 = sqrt(2*(h3-h4)*1000 + V3^2);
+mprintf("Velocity at exit from the nozzle, V4 = %d m/s",round(V4));
+// end
\ No newline at end of file diff --git a/555/CH5/EX5.6/6.sce b/555/CH5/EX5.6/6.sce new file mode 100644 index 000000000..7956232a6 --- /dev/null +++ b/555/CH5/EX5.6/6.sce @@ -0,0 +1,21 @@ +// Implementation of example 5.6
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+Va=270 // (air speed in m/s)
+Ha=260 // (enthalpy of air in kJ/kg)
+Hg=912 // (enthalpy of gas in kJ/kg)
+Ef=44500 // (energy in kJ/kg)
+wf=0.019 // (fuel ratio)
+Q=21 // (heat loss in kJ/kg)
+wg=wf+1;
+// it is given that 5% of energy is not released in reaction
+Eg=0.05*Ef*(wf/wg);
+// the steady flow rate equation is wa*(hg+Va^2/2)+wf*Ef+Q=wg*(hg+Vg^2/2+Eg)
+temp=((Ha+Va*Va/2000)+wf*Ef-Q-wg*(Hg+Eg));
+temp=temp*wg*2000;
+Vg=sqrt(temp);
+printf("velocity of exhaust gas = %.2f",Vg);
+// end
\ No newline at end of file diff --git a/555/CH5/EX5.8/8.sce b/555/CH5/EX5.8/8.sce new file mode 100644 index 000000000..839e031b7 --- /dev/null +++ b/555/CH5/EX5.8/8.sce @@ -0,0 +1,21 @@ +// Implementation of example 5.8
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//temperature at certain instance 't', power to paddle wheel 'Wt'
+t = -273; //degree C
+//Let
+u=0;
+u0 = u - 0.718*t;
+//hp = u + p*v; and u = 0.718(t+273) and pv=0.278(t+273) thus
+t = 150; //degree C
+hp = 1.005*(t+273); //kJ/kg
+Wt = 0.1; //kJ/s or kW
+//dm/dt = m dW/dt = Wt
+//rate of flow of air out of tank 'm'
+m = (1/hp)*Wt;//kg/s
+m = m*3600; //kg/h
+printf("Rate of flow of air out of tank = %.3f kg/h",m);
+// end
\ No newline at end of file |