From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3831/CH9/EX9.1/Ex9_1.sce | 18 ++++++++++++++++++ 3831/CH9/EX9.10/Ex9_10.sce | 18 ++++++++++++++++++ 3831/CH9/EX9.11/Ex9_11.sce | 11 +++++++++++ 3831/CH9/EX9.2/Ex9_2.sce | 23 +++++++++++++++++++++++ 3831/CH9/EX9.3/Ex9_3.sce | 18 ++++++++++++++++++ 3831/CH9/EX9.4/Ex9_4.sce | 41 +++++++++++++++++++++++++++++++++++++++++ 3831/CH9/EX9.5/Ex9_5.sce | 23 +++++++++++++++++++++++ 3831/CH9/EX9.6/Ex9_6.sce | 26 ++++++++++++++++++++++++++ 3831/CH9/EX9.7/Ex9_7.sce | 17 +++++++++++++++++ 3831/CH9/EX9.8/Ex9_8.sce | 21 +++++++++++++++++++++ 3831/CH9/EX9.9/Ex9_9.sce | 36 ++++++++++++++++++++++++++++++++++++ 3831/CH9/EX9.9/Figure9_20.pdf | Bin 0 -> 18895 bytes 12 files changed, 252 insertions(+) create mode 100644 3831/CH9/EX9.1/Ex9_1.sce create mode 100644 3831/CH9/EX9.10/Ex9_10.sce create mode 100644 3831/CH9/EX9.11/Ex9_11.sce create mode 100644 3831/CH9/EX9.2/Ex9_2.sce create mode 100644 3831/CH9/EX9.3/Ex9_3.sce create mode 100644 3831/CH9/EX9.4/Ex9_4.sce create mode 100644 3831/CH9/EX9.5/Ex9_5.sce create mode 100644 3831/CH9/EX9.6/Ex9_6.sce create mode 100644 3831/CH9/EX9.7/Ex9_7.sce create mode 100644 3831/CH9/EX9.8/Ex9_8.sce create mode 100644 3831/CH9/EX9.9/Ex9_9.sce create mode 100644 3831/CH9/EX9.9/Figure9_20.pdf (limited to '3831/CH9') diff --git a/3831/CH9/EX9.1/Ex9_1.sce b/3831/CH9/EX9.1/Ex9_1.sce new file mode 100644 index 000000000..d1e1a8c6d --- /dev/null +++ b/3831/CH9/EX9.1/Ex9_1.sce @@ -0,0 +1,18 @@ +// Example 9_1 +clc;funcprot(0); +// Given data +T_1=15+273.15;// K +T_2=50+273.15;// K +Q=0.100;// The electrical energy in W +c=4.186;// kJ/kg.K +T_b=20+273.15;// K + +// Calculation +m=Q/(c*(T_2-T_1));// The expected water flow rate in kg/s +// Assume ds=s_out-s_in +ds=c*log(T_2/T_1);// kJ/kg.K +S_p=(m*ds)-(Q/T_b);// kJ/s.K +printf("\nThe entropy production rate,S_p=%1.2e kJ/s.K ",S_p); +if(S_p<0) + printf("\nSince the entropy production rate is negative, this water heater cannot possibly meet the claims of the inventor, so we should reject the patent application.") + end diff --git a/3831/CH9/EX9.10/Ex9_10.sce b/3831/CH9/EX9.10/Ex9_10.sce new file mode 100644 index 000000000..c81a6d189 --- /dev/null +++ b/3831/CH9/EX9.10/Ex9_10.sce @@ -0,0 +1,18 @@ +// Example 9_10 +clc;funcprot(0); +// Given data +m=500;// lbm/s +T=50.0;// °F +y_1=1.00;// The inlet height in ft +y_2=1.80;// The exit height in ft +v_1=8.00;// The inlet velocity ft/s +v_2=5.14;// The exit velocity in ft/s +g=32.174;// ft/s^2 +g_c=32.174;// lbm.ft/(lbf.s^2) +c=1.00; // Btu/(lbm.R) + +// Solution +h_L12=(y_2-y_1)^3/(4*y_1*y_2);// ft +E_dr=(m*(g/g_c)*h_L12)/778.17;// The energy dissipation rate in Btu/s +S_p=m*c*log(1+(g*[(h_L12)]/(c*g_c*(T+459.67))));// The entropy production rate in Btu/(s.R) +printf('\nThe energy dissipation rate=%0.4f Btu/s \nThe entropy production rate,S_p=%0.4f Btu/(s.R)',E_dr,S_p); diff --git a/3831/CH9/EX9.11/Ex9_11.sce b/3831/CH9/EX9.11/Ex9_11.sce new file mode 100644 index 000000000..86c027d95 --- /dev/null +++ b/3831/CH9/EX9.11/Ex9_11.sce @@ -0,0 +1,11 @@ +// Example 9_11 +clc;funcprot(0); +// Given data +mu=10.1*10^-3;// The viscosity of the water in kg/(m.s) +L=10.0;// The length of the pipe in m +V_m=0.500;// The maximum velocity of the fluid in m/s +T=20.0;// °C + +// Solution +S_pW=(2*%pi*mu*L*V_m^2)/(T+273.15);// The entropy production rate in W/K +printf('\nThe entropy production rate,(S_p)_W=%1.3e W/K',S_pW); diff --git a/3831/CH9/EX9.2/Ex9_2.sce b/3831/CH9/EX9.2/Ex9_2.sce new file mode 100644 index 000000000..4b97626b2 --- /dev/null +++ b/3831/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,23 @@ +// Example 9_2 +clc;funcprot(0); +// Given data +m=0.2000;// lbm/s +// Station 1 +p_1=14.7;// psia +T_1=50.00;// °F +// Station 2 +p_2=95.00;// psia +D_1=1.000;// The inlet diameter of the nozzle in m +D_2=0.2500;// The outlet diameter of the nozzle in m +c=1.0;// Btu/lbm.R +g_c=32.174;// lbm.ft/(lbf.s^2) + +// Calculation +v_f=0.01602;// ft^3/lbm +v=v_f;// ft^3/lbm +V_1=(4*m*v*144)/(%pi*D_1^2);// ft/s +V_2=V_1*(D_1/D_2)^2;// ft/s +T_2=(T_1+459.67)+(v*(((p_2-p_1)*144)/(c*778.17)))-((V_2^2-V_1^2)/(2*c*g_c*778.17));// R +S_p=m*c*log(T_2/(T_1+459.7));// Btu/(s.R) +S_p=S_p*778.17;// ft.lbf/(s.R) +printf("\nThe rate of entropy production,S_p=%0.4f ft.lbf/(s.R)",S_p); diff --git a/3831/CH9/EX9.3/Ex9_3.sce b/3831/CH9/EX9.3/Ex9_3.sce new file mode 100644 index 000000000..36301b55d --- /dev/null +++ b/3831/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,18 @@ +// Example 9_3 +clc;funcprot(0); +// Given data +m=0.800;// kg/s +V_1=93.0;// m/s +// Station 1 +p_1=97.0;// kPa +T_1=80.0;// °C +// Station 2 +p_2=101.3;// kPa +g_c=1;// The gravitational constant +c_p=523;// J/(kg.K) +R=208;// J/(kg.K) + +// Calculation +T_2=(T_1+273.15)+((V_1^2)/(2*g_c*c_p));// K +S_p=m*((c_p*log(T_2/(T_1+273.15)))-(R*log(p_2/p_1)));// The rate of entropy production within the diffuser in W/K +printf("\nThe rate of entropy production within the diffuser,S_p=%1.2f W/K",S_p); diff --git a/3831/CH9/EX9.4/Ex9_4.sce b/3831/CH9/EX9.4/Ex9_4.sce new file mode 100644 index 000000000..f26f376cd --- /dev/null +++ b/3831/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,41 @@ +// Example 9_4 +clc;funcprot(0); +// Given data +m=0.100;// lbm/s +// Station 1 +x_1=0.00;// The quality of steam at inlet +T_1=100;// °F +// Station 2 +x_2=0.530;// The quality of steam at exit +T_2=20;// °F +T_b=60.0;// °F + +// Calculation +// (a) +// From Table C.7a for R-134a, we find +h_f1=44.23;// Btu/lbm +h_1=h_f1;// Btu/lbm +s_f1=0.0898;// Btu/(lbm.R) +s_1=s_f1;// Btu/(lbm.R) +h_f2=17.74;// Btu/lbm +h_fg2=86.87;// Btu/lbm +s_f2=0.0393;// Btu/(lbm.R) +s_fg2=0.2206-s_f2;// Btu/(lbm.R) +h_2=h_f2+(x_2*h_fg2);// Btu/lbm +s_2=s_f2+(x_2*s_fg2);// Btu/(lbm.R) +Q=m*(h_2-h_1);// Btu/s +S_pa=((m*(s_2-s_1))-(Q/(T_b+459.67)));// The entropy production rate inside the valve in Btu/(s.R) +S_p=S_pa*778.17;// ft.lbf/(s.R) +printf("\n(a)The entropy production rate inside the valve if the valve is not insulated and has an isothermal external surface temperature of 60.0°F,S_p=%0.4f ft.lbf/(s.R)",S_p); +// (b) +h_2=h_1;// Btu/lbm +x_2=(h_2-h_f2)/h_fg2;// The quality of steam +x_2p=x_2*100;// % (in x_2p,p refers the quality of steam in percentage) +s_2=s_f2+(x_2*s_fg2);// Btu/(lbm.R) +Q=0;// W +S_pb=m*(s_2-s_1)-(Q/T_b);// Btu/(s.R) +S_p=S_pb*778.17;// lbf/(s.R) +printf("\n(b)The entropy production rate inside the valve if it is insulated and assuming it has the same inlet conditions and exit temperature,S_p=%0.3f ft.lbf/(s.R)",S_p); +//(c) +S_p_pd=((S_pa-S_pb)/S_pa)*100;// The percentage decrease in S_p brought about by adding the insulation in % +printf("\n(c)The percentage decrease in S_p brought about by adding the insulation is %2.1f percentage.",S_p_pd); diff --git a/3831/CH9/EX9.5/Ex9_5.sce b/3831/CH9/EX9.5/Ex9_5.sce new file mode 100644 index 000000000..feb1c574c --- /dev/null +++ b/3831/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,23 @@ +// Example 9_5 +clc;funcprot(0); +// Given data +m_a=0.200;// kg/s +T_ain=90.0;// °C +T_aout=75.0;// °C +T_win=20.0;// °C +T_wout=40.0;// °C +U=140;// W/(m^2.K) +c_pa=1.004;// The specific heat of air in kJ/kg.K +c_pw=4.186;// The specific heat of water in kJ/kg.K + +// Calculation +// (a) Parallel flow +delT_LMTDa=((T_aout-T_wout)-(T_ain-T_win))/(log((T_aout-T_wout)/(T_ain-T_win)));// K +//(b) Counter flow +delT_LMTDb=((T_aout-T_win)-(T_ain-T_wout))/(log((T_aout-T_win)/(T_ain-T_wout)));// K +Q=abs(m_a*c_pa*10^3*(T_aout-T_ain));// J/s +A_pf=Q/(U*delT_LMTDa);// m^2 +A_cf=Q/(U*delT_LMTDb);// m^2 +m_w=m_a*(c_pa/c_pw)*((T_ain-T_aout)/(T_wout-T_win));// kg/s +S_p=(m_a*c_pa*10^3*log((T_aout+273.15)/(T_ain+273.15)))+(m_w*c_pw*10^3*log((T_wout+273.15)/(T_win+273.15)));// W/K +printf("\nThe corresponding heat exchanger area for parallel flow,A_parallel flow=%0.3f m^2 \nThe corresponding heat exchanger area for counter flow,A_counter flow=%0.3f m^2 \nThe entropy production rate,S_p=%1.2f W/K",A_pf,A_cf,S_p); diff --git a/3831/CH9/EX9.6/Ex9_6.sce b/3831/CH9/EX9.6/Ex9_6.sce new file mode 100644 index 000000000..166f942d5 --- /dev/null +++ b/3831/CH9/EX9.6/Ex9_6.sce @@ -0,0 +1,26 @@ +// Example 9_6 +clc;funcprot(0); +// Given data +m_H=0.300;// lbm/s +T_H=140.0;// °F +m_C=0.300;// lbm/s +T_C=50.0;// °F +c=1.00;// Btu/(lbm.R) + +// Calculation +// (a) +m_M=m_H+m_C;// lbm/s +gamma=m_H/m_M;// The mass flow rate ratio +T_1=T_H;// °F +T_2=T_C;// °F +T_1byT_2=(T_H+459.67)/(T_C+459.67);// The temperature ratio +T_3=T_C+(gamma*(T_H-T_C));// °F +m_3=m_M;// lbm/s +S_p_mixing=m_3*c*log((1+(gamma*(T_1byT_2-1)))*(T_1byT_2)^(-gamma));// Btu/(s.R) +S_p_mixing=S_p_mixing*778.17;// ft.lbf/(s.R) +printf("\n(a)The shower mixture temperature,T_3=%2.0f°F \n The entropy production rate,(S_p)_mixing=%1.2f lbf/(s.R)",T_3,S_p_mixing); +// (b) +gamma_c=((1-T_1byT_2)+log(T_1byT_2))/((1-T_1byT_2)*log(T_1byT_2));// The critical mass fraction +S_p_mixing=m_3*c*log((1+(gamma_c*(T_1byT_2-1)))*(T_1byT_2)^(-gamma_c));// // Btu/(s.R) +S_p_mixing=S_p_mixing*778.17;// ft.lbf/(s.R) +printf("\n(b)The critical mass fraction,gamma_c=%0.3f \n The value of the maximum entropy production rate,(S_p)_mixing=%1.2f ft.lbf/(s.R)",gamma_c,S_p_mixing); diff --git a/3831/CH9/EX9.7/Ex9_7.sce b/3831/CH9/EX9.7/Ex9_7.sce new file mode 100644 index 000000000..91cfa862f --- /dev/null +++ b/3831/CH9/EX9.7/Ex9_7.sce @@ -0,0 +1,17 @@ +// Example 9_7 +clc;funcprot(0); +// Given data +mdot=0.500;// kg/s +p_1=8.00;// MPa +T_1=300;// °C +T_2=100;// °C +x_2=1.00;// The quality of steam at station 2 +T_b=20.0;// °C +h_1=2785.0;// kJ/kg +h_2=2676.0;// kJ/kg +s_1=5.7914;// kJ/kg.K +s_2=7.3557;// kJ/kg.K + +// Calculation +W_max=mdot*[(h_1-((T_b+273.15)*s_1))-(h_2-((T_b+273.15)*s_2))];// kW +printf("\nThe maximum (reversible) power,W_max=%3.0f kW",W_max); diff --git a/3831/CH9/EX9.8/Ex9_8.sce b/3831/CH9/EX9.8/Ex9_8.sce new file mode 100644 index 000000000..61c745009 --- /dev/null +++ b/3831/CH9/EX9.8/Ex9_8.sce @@ -0,0 +1,21 @@ +// Example 9_8 +clc;funcprot(0); +// Given data +V_2=3.00;// ft^3 +T_in=70+459.67;// °F +p_2=2000;// psia + +// Calculation +// From Table C.13a of Thermodynamic Tables to accompany Modern Engineering Thermodynamics, we find for oxygen +c_p=0.219;// Btu/(lbm.R) +R=48.29;// ft.lbf/(lbm.R) +k=1.39;// The specific heat ratio +T_2_af=k*T_in;// R +T_2_if=T_in;// R +m_2_af=(p_2*144*V_2)/(R*T_2_af);// lbm +m_2_if=(p_2*144*V_2)/(R*T_2_if);// lbm +// (a) +S_p_12_af=m_2_af*c_p*2.303*log10(k);// Btu/R +// (b) +S_p_12_if=m_2_if*R/778.16;// Btu/R +printf("\n(a)The amount of entropy produced when the container is filled adiabatically by insulating it,[1(S_P)2]adiabatic filling=%1.2f Btu/R \n(b)The amount of entropy produced when the container is filled isothermally,[1(S_P)2]isothermal filling=%1.2f Btu/R",S_p_12_af,S_p_12_if) diff --git a/3831/CH9/EX9.9/Ex9_9.sce b/3831/CH9/EX9.9/Ex9_9.sce new file mode 100644 index 000000000..37c9f8bdb --- /dev/null +++ b/3831/CH9/EX9.9/Ex9_9.sce @@ -0,0 +1,36 @@ +// Example 9_9 +clc;funcprot(0); +// Given data +gamma=0.500;// The specific heat ratio for air +T_in=70.0;// °F +p_in_psig=[0.000,20.00,40.00,60.00,80.00,100.00,120.00,140.00];// psig +p_in=[14.7,34.7,54.7,74.7,94.7,114.7,134.7,154.7];// psia +T_hot=[70.0,119.0,141.0,150.0,156.0,161.0,164.0,166.0];// °F +T_cold=[70.0,19.5,-3.00,-14.0,-22.0,-29.0,-34.0,-39.0];// °F +T_r=[1.000,1.209,1.315,1.368,1.406,1.441,1.465,1.487];// Note:T_r=(T_hot+460)/(T_cold+460) +p_e=14.7;// The exit pressure in psia +R=0.0685;// Btu/(lbm.R) +c_p=0.240;// Btu/(lbm.R) + +// Calculation +Sdot_pbymdot_3_1=((c_p*log(((T_r(1)^gamma)/(1+(gamma*(T_r(1)-1))))))+(R*log(p_in(1)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_2=((c_p*log(((T_r(2)^gamma)/(1+(gamma*(T_r(2)-1))))))+(R*log(p_in(2)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_3=((c_p*log(((T_r(3)^gamma)/(1+(gamma*(T_r(3)-1))))))+(R*log(p_in(3)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_4=((c_p*log(((T_r(4)^gamma)/(1+(gamma*(T_r(4)-1))))))+(R*log(p_in(4)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_5=((c_p*log(((T_r(5)^gamma)/(1+(gamma*(T_r(5)-1))))))+(R*log(p_in(5)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_6=((c_p*log(((T_r(6)^gamma)/(1+(gamma*(T_r(6)-1))))))+(R*log(p_in(6)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_7=((c_p*log(((T_r(7)^gamma)/(1+(gamma*(T_r(7)-1))))))+(R*log(p_in(7)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3_8=((c_p*log(((T_r(8)^gamma)/(1+(gamma*(T_r(8)-1))))))+(R*log(p_in(8)/p_e)));// Btu/(lbm.R) +Sdot_pbymdot_3=[Sdot_pbymdot_3_1,Sdot_pbymdot_3_2,Sdot_pbymdot_3_3,Sdot_pbymdot_3_4,Sdot_pbymdot_3_5,Sdot_pbymdot_3_6,Sdot_pbymdot_3_7,Sdot_pbymdot_3_8];// Btu/(lbm.R) +plot(p_in_psig,Sdot_pbymdot_3); +xlabel('Inlet pressure(psig)'); +ylabel('Sdot_p/mdot_3(Btu/lbm.R)'); +xtitle('Sdot_p/mdot_3 vs. inlet pressure for a vortex tube'); +disp('Remaining Results for Example 9.9'); +disp('The entropy production rate per unit mass flow rate for each pressure shown'); +disp('Inlet pressure psig'); +disp(p_in_psig); +disp('T_1/T_2'); +disp(T_r); +disp('Sdot_P/mdot_3 Btu/(lbm⋅R)'); +disp(Sdot_pbymdot_3); diff --git a/3831/CH9/EX9.9/Figure9_20.pdf b/3831/CH9/EX9.9/Figure9_20.pdf new file mode 100644 index 000000000..ad20ac117 Binary files /dev/null and b/3831/CH9/EX9.9/Figure9_20.pdf differ -- cgit