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 /3012/CH11 | |
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 '3012/CH11')
-rwxr-xr-x | 3012/CH11/EX11.1/Ex11_1.sce | 50 | ||||
-rwxr-xr-x | 3012/CH11/EX11.10/Ex11_10.sce | 67 | ||||
-rwxr-xr-x | 3012/CH11/EX11.3/Ex11_3.sce | 32 | ||||
-rwxr-xr-x | 3012/CH11/EX11.4/Ex11_4.sce | 35 | ||||
-rwxr-xr-x | 3012/CH11/EX11.6/Ex11_6.sce | 21 | ||||
-rwxr-xr-x | 3012/CH11/EX11.8/Ex11_8.sce | 27 | ||||
-rwxr-xr-x | 3012/CH11/EX11.9/Ex11_9.sce | 35 |
7 files changed, 267 insertions, 0 deletions
diff --git a/3012/CH11/EX11.1/Ex11_1.sce b/3012/CH11/EX11.1/Ex11_1.sce new file mode 100755 index 000000000..b03e76e53 --- /dev/null +++ b/3012/CH11/EX11.1/Ex11_1.sce @@ -0,0 +1,50 @@ +// Given:- +m = 4.00 // mass of carbon monoxide in kg +T = 223.00 // temperature of carbon monoxide in kelvin +D = 0.2 // inner diameter of cylinder in meter +L = 1.00 // length of the cylinder in meter +pi=3.14 +// Analysis +M = 28.00 // molar mass in kg/kmol + +// Calculations +V = (pi*D**2.00/4.00)*L // volume occupied by the gas in m^3 +vbar = M*(V/m) // The molar specific volume in m^3/kmol + +// Part(a) +// From Table A-1 for CO +Tc = 133 // in kelvin +Pc = 35 // in bar +Tr = T/Tc // reduced temperature +Rbar = 8314 // universal gas constant in N.m/kmol.K +Z = 0.9 +// Calculations +vrdash = (vbar*Pc*10**5)/(Rbar*Tc) // pseudoreduced specific volume +p = (Z*Rbar*T/vbar)*10**-5 // in bar +// Result +printf( '\n part(a)the pressure in bar is: %.2f bar',p) + +// Part(b) +// The ideal gas equation of state gives +// Calculations +p = (Rbar*T/vbar)/10**5 // in bar +// Result +printf( '\n Part(b)the pressure in bar is: %.2f bar',p) + +// Part(c) +// For carbon monoxide, the van der Waals constants a and b can be read directly from Table A-24 +a = 1.474 // in (m^3/kmol)^2 +b = 0.0395 // in m^3/kmol +// Calculations +p = (Rbar*T/(vbar-b))/10**5 - a/vbar**2 +// Result +printf( '\n Part(c)the pressure in bars is: %.2f bar',p) + +// Part(d) +// For carbon monoxide, the Redlich–Kwong constants can be read directly from Table A-24 +a = 17.22 // in m^6*K^.5/kmol^2 +b = 0.02737 // in m^3/kmol +// Calculations +p = (Rbar*T/(vbar-b))/10**5 - a/(vbar*(vbar+b)*T**.5) +// Result +printf( '\n Part(d)the pressure in bar is: %.2f bar', p) diff --git a/3012/CH11/EX11.10/Ex11_10.sce b/3012/CH11/EX11.10/Ex11_10.sce new file mode 100755 index 000000000..8b1a2eb83 --- /dev/null +++ b/3012/CH11/EX11.10/Ex11_10.sce @@ -0,0 +1,67 @@ + +// Given:- +// Analysis +V = 0.241 // volume of the mixture in m^3 +T = 511.00 // temperature of the mixture in kelvin +n1 = 0.18 // number of moles of methane in kmol +n2 = 0.274 // number of moles of butane in kmol +Rbar = 8314 // universal gas constant in (N.m)/(kmol.K) + +// Calculations +n = n1 + n2 // The total number of moles of mixture +y1 = n1/n // mole fraction of methane +y2 = n2/n // mole fraction of butane +vbar = V/(n) // The specific volume of the mixture on a molar basis in m^3/kmol + +// Part(a) +p = (Rbar*T/vbar)*10**-5 // in bar +// Result +printf( ' The pressure in bar obtained using ideal gas equation is: %.2f',p) + +// Part(b) +// From table A-1 +Tc1 = 191.00 // critical temperature for methane in kelvin +Pc1 = 46.4 // critical pressure for methane in bar +Tc2 = 425.00 // critical temperature for butane in kelvin +Pc2 = 38.00 // critical pressure for butane in bar +Z = 0.88 + + +// Calculations +Tc = y1*Tc1 + y2*Tc2 // critical temperature in kelvin +Pc = y1*Pc1 + y2*Pc2 // critical pressure in bar +TR = T/Tc // reduced temperature of the mixture +vRdash= vbar*Pc/(Rbar*Tc) +p = ((Z*Rbar*T)/vbar)*10**-5 // mixture pressure in bar +// Result +printf( ' Pressure obtained using Kay’s rule together with the generalized compressibility chart, is: %.2f ',p) + +// Part(c) +// Table A-24 gives the following van der Waals constants values for methane +a1 = 2.293 // in (m^3/kmol)^2 +b1 = 0.0428 // in m^3/kmol +// Table A-24 gives the following van der Waals constants values for butane +a2 = 13.86 // in (m^3/kmol)^2 +b2 = 0.1162 // in m^3/kmol + +a = (y1*a1**.5 + y2*a2**.5)**2 // in bar*(m^3/kmol)^2 +b = y1*b1+y2*b2 // in m^3/kmol +// From van der Waals equation +p = ((Rbar*T)/(vbar-b))*10**-5 - a/(vbar**2) +printf( ' The pressure in bar from van der Waals equation is: %.2f',p) + +// Part(d) +// For methane +TR1 = T/Tc1 +vR1dash = (.241/.18)*10**5*Pc1/(Rbar*Tc1) +Z1 = 1.00 +// For butane +TR2 = T/Tc2 +vR2dash = (.88*10**5*Pc2)/(Rbar*Tc2) +Z2 = 0.8 +Z = y1*Z1 + y2*Z2 +// Accordingly, the same value for pressure as determined in part (b) using Kay’s rule results: +p = 70.4 + +// Result +printf( ' The pressure in bar obtained using the rule of additive pressures employing the generalized compressibility chart is: %.2f',p) diff --git a/3012/CH11/EX11.3/Ex11_3.sce b/3012/CH11/EX11.3/Ex11_3.sce new file mode 100755 index 000000000..119bc0631 --- /dev/null +++ b/3012/CH11/EX11.3/Ex11_3.sce @@ -0,0 +1,32 @@ +// Given:- +// Part(a) +v = 0.4646 // specific volume in in m^3/kg +M = 18.02 // molar mass of water in kg/kmol +// At the specified state, the temperature is 513 K and the specific volume on a molar basis is +vbar = v*M // in m^3/kmol +// From Table A-24 +a = 142.59 // (m^3/kmol)^2 * K^.5 +b = 0.0211 // in m^3/kmol + +Rbar = 8314.0 // universal gas constant in N.m/kmol.K +T = 513.0 // in kelvin +delpbydelT = (Rbar/(vbar-b) + a/(2*vbar*(vbar+b)*T**1.5)*10**5)/10**3 // in kj/(m^3*K) + +// By The Maxwell relation +delsbydelv = delpbydelT +// Result +printf( ' The value of delpbydelT in kj/(m^3*K) is: %.2f',delpbydelT); + +// Part(b) +// A value for (dels/delv)T can be estimated using a graphical approach with steam table data, as follows: At 240C, Table A-4 provides the values for specific entropy s and specific volume v tabulated below +T = 240.0 // in degree celcius +// At p =1, 1.5, 3, 5, 7, 10 bar respectively +y = [7.994, 7.805, 7.477, 7.230, 7.064, 6.882] +x = [2.359, 1.570, 0.781, 0.4646, 0.3292, 0.2275] +plot(x,y) +xlabel("Specific volume") +ylabel("Specific entropy") + +// The pressure at the desired state is 5 bar.The corresponding slope is +delsbydelv = 1 // in kj/m^3.K +printf( ' From the data of the table,delsbydelv = %.2f',delsbydelv); diff --git a/3012/CH11/EX11.4/Ex11_4.sce b/3012/CH11/EX11.4/Ex11_4.sce new file mode 100755 index 000000000..0d233d37f --- /dev/null +++ b/3012/CH11/EX11.4/Ex11_4.sce @@ -0,0 +1,35 @@ +// Given:- +// Analysis +// For comparison, Table A-2 gives at 100C, +hgf =2257.00 // in kj/kg +ugf = 2087.6 // in kj/kg +sgf = 6.048 // in kj/kg.K +// Values +printf( ' From table, hg-hf = %.2f',hgf); +printf( ' From table, ug-uf = %.2f',ugf); +printf( ' From table, sg-sf = %.2f',sgf); + +// Part(a) +T = 373.15 // in kelvin +// If we plot a graph between temperature and saturation pressure using saturation pressure–temperature data from the steam tables, the desired slope is: +delpbydelT = 3570.00 // in N/(m^2.K) +vg = 1.673 // in m^3/kg +vf = 1.0435e-3 // in m^3/kg +// Calculations +// From the Clapeyron equation +hgf = T*(vg-vf)*delpbydelT*10**-3 // in kj/kg +// Result +printf( '\n Part(a)using Clapeyron equation, hg-hf = %.2f KJ/kg', hgf); + +// Part(b) +psat = 1.014e5 // in N/m^2 +hgf = 2256.00 // can be obtained using IT software in kj/kg +// Calculations +ugf = hgf - psat*(vg-vf)/10**3 // in kj/kg +// Result +printf( '\n Part(b)ug-uf = %.2f KJ/kg',ugf) +// Part(c) +// Calculation +sgf =hgf/T // in kj/kg.K +// Result +printf( '\n Part(c)sg-sf = %.2f KJ/kg. k',sgf) diff --git a/3012/CH11/EX11.6/Ex11_6.sce b/3012/CH11/EX11.6/Ex11_6.sce new file mode 100755 index 000000000..acc0b5c1f --- /dev/null +++ b/3012/CH11/EX11.6/Ex11_6.sce @@ -0,0 +1,21 @@ +// Given:- +// Part(a) +v = 1.00/998.21 // specific volume of water in m^3/kg +T = 293.00 // given temperature in kelvin +beta = 206.6e-6 // volume expansivity in /K +k = 45.90e-6 // isothermal compressibility in /bar +// Interpolating in Table A-19 +cp = 4.188 // in kj/kg.k +// Calculations +cpv = (v*T*beta**2.00/k)*10**2 // in kj/kg.k +cv = cp-cpv // in kj/kg.k +errorPercentage = 100*(cp-cv)/cv +// Result +printf( ' The percentage error is: %.2f',errorPercentage) + +// Part(b) +// Calculations +K = cp/cv // specific heat ratio +c = ((K*v/k)*10**5)**0.5 // velocity of sound in m/s +// Result +printf( ' The velocity of sound is: %.2f m/s',c) diff --git a/3012/CH11/EX11.8/Ex11_8.sce b/3012/CH11/EX11.8/Ex11_8.sce new file mode 100755 index 000000000..91eb2d0d9 --- /dev/null +++ b/3012/CH11/EX11.8/Ex11_8.sce @@ -0,0 +1,27 @@ +// Given:- +p1 = 100.00 // in bar +T1 = 300.00 // in kelvin +p2 = 40.00 // in bar +T2 = 245.00 // in kelvin + + +// From table A-23 +h1starbar = 8723.00 // in kj/kmol +h2starbar = 7121.00 // in kj/kmol +// From Tables A-1 +Tc = 126.00 // critical temperature in kelvin +pc = 33.9 // critical pressure in bar +M = 28.00 // molar mass in kg/kmol +Rbar = 8.314 // universal gas constant in kj/(kmol.K) +Term1 = 0.5 +Term2 = 0.31 + +// Calculations +TR1 = T1/Tc // reduced temperature at the inlet +PR1 = p1/pc // reduced pressure at the inlet +TR2 = T2/Tc // reduced temperature at the exit +PR2 = p2/pc // reduced pressure at the exit +wcvdot = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) // in kj/kg + +// Result +printf( ' The work developed, in kJ per kg of nitrogen flowing is : %.2f',wcvdot) diff --git a/3012/CH11/EX11.9/Ex11_9.sce b/3012/CH11/EX11.9/Ex11_9.sce new file mode 100755 index 000000000..7c8b4f92e --- /dev/null +++ b/3012/CH11/EX11.9/Ex11_9.sce @@ -0,0 +1,35 @@ + +// Given:- +// Part(a) +// With values from Table A-23 +sT2bar = 185.775 // in kj/(kmol.K) +sT1bar = 191.682 // in kj/(kmol.K) +Rbar = 8.314 // universal gas constant +M = 28.00 // molar mass in kg/kmol +p2 = 40.00 // in bar +p1 = 100.00 // in bar +Term1 = 0.21 +Term2 = 0.14 + +// Calculations + +S2StarBarMinusS1StarBar = sT2bar-sT1bar-Rbar*log(p2/p1) // The change in specific entropy in kj/(kmol.K) +sigmacvdot = (1.00/M)*(S2StarBarMinusS1StarBar-Rbar*(Term2-Term1)) +// Result +printf( ' the rate of entropy production in kj/kg.K is: %.2f', sigmacvdot) + +// Part(b) +// From Table A-23, +h2starbar = 6654.00 // in kj/kmol +h1starbar = 8723.00 // in kj/kmol +Tc = 126.00 // critical temperature in kelvin +Term2 = 0.36 +Term1 = 0.5 +wcvdot = 50.1 // from example 11.8 + +// Calculations +wcvdots = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) // isentropic work in kj/kg +etat = wcvdot/wcvdots // turbine efficiency + +// Result +printf( ' The isentropic turbine efficiency is: %.2f', etat) |