summaryrefslogtreecommitdiff
path: root/3685/CH8
diff options
context:
space:
mode:
Diffstat (limited to '3685/CH8')
-rw-r--r--3685/CH8/EX8.1/Ex8_1.sce8
-rw-r--r--3685/CH8/EX8.1/Ex8_1.txt3
-rw-r--r--3685/CH8/EX8.10/Ex8_10.sce10
-rw-r--r--3685/CH8/EX8.10/Ex8_10.txt3
-rw-r--r--3685/CH8/EX8.11/Ex8_11.sce23
-rw-r--r--3685/CH8/EX8.11/Ex8_11.txt6
-rw-r--r--3685/CH8/EX8.12/Ex8_12.sce47
-rw-r--r--3685/CH8/EX8.12/Ex8_12.txt20
-rw-r--r--3685/CH8/EX8.14/Ex8_14.sce19
-rw-r--r--3685/CH8/EX8.14/Ex8_14.txt4
-rw-r--r--3685/CH8/EX8.15/Ex8_15.sce18
-rw-r--r--3685/CH8/EX8.15/Ex8_15.txt3
-rw-r--r--3685/CH8/EX8.16/Ex8_16.sce22
-rw-r--r--3685/CH8/EX8.16/Ex8_16.txt3
-rw-r--r--3685/CH8/EX8.17/Ex8_17.sce20
-rw-r--r--3685/CH8/EX8.17/Ex8_17.txt4
-rw-r--r--3685/CH8/EX8.18/Ex8_18.sce23
-rw-r--r--3685/CH8/EX8.18/Ex8_18.txt4
-rw-r--r--3685/CH8/EX8.19/Ex8_19.sce22
-rw-r--r--3685/CH8/EX8.19/Ex8_19.txt7
-rw-r--r--3685/CH8/EX8.2/Ex8_2.sce19
-rw-r--r--3685/CH8/EX8.2/Ex8_2.txt3
-rw-r--r--3685/CH8/EX8.20/Ex8_20.sce35
-rw-r--r--3685/CH8/EX8.20/Ex8_20.txt17
-rw-r--r--3685/CH8/EX8.3/Ex8_3.sce15
-rw-r--r--3685/CH8/EX8.3/Ex8_3.txt3
-rw-r--r--3685/CH8/EX8.4/Ex8_4.sce19
-rw-r--r--3685/CH8/EX8.4/Ex8_4.txt3
-rw-r--r--3685/CH8/EX8.5/Ex8_5.sce17
-rw-r--r--3685/CH8/EX8.5/Ex8_5.txt3
-rw-r--r--3685/CH8/EX8.6/Ex8_6.sce24
-rw-r--r--3685/CH8/EX8.6/Ex8_6.txt5
-rw-r--r--3685/CH8/EX8.7/Ex8_7.sce27
-rw-r--r--3685/CH8/EX8.7/Ex8_7.txt6
-rw-r--r--3685/CH8/EX8.8/Ex8_8.sce34
-rw-r--r--3685/CH8/EX8.8/Ex8_8.txt5
-rw-r--r--3685/CH8/EX8.9/Ex8_9.sce18
-rw-r--r--3685/CH8/EX8.9/Ex8_9.txt4
38 files changed, 526 insertions, 0 deletions
diff --git a/3685/CH8/EX8.1/Ex8_1.sce b/3685/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..3088a8fed
--- /dev/null
+++ b/3685/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,8 @@
+clc
+T0 = 35 // Heat rejection temperature in degree Celsius
+T1 = 420 // Vapor condensation temperature in degree Celsius
+T1_ = 250 // water vapor temperature in degree Celsius
+printf("\n Example 8.1")
+f = ((T0+273)*((T1+273)-(T1_+273)))/((T1_+273)*((T1+273)-(T0+273)))// fraction of energy lost
+printf("\n The fraction of energy that becomes unavailable due to irreversible heat transfer is %f ",f)
+//The answers vary due to round off error
diff --git a/3685/CH8/EX8.1/Ex8_1.txt b/3685/CH8/EX8.1/Ex8_1.txt
new file mode 100644
index 000000000..783cb88ab
--- /dev/null
+++ b/3685/CH8/EX8.1/Ex8_1.txt
@@ -0,0 +1,3 @@
+
+ Example 8.1
+ The fraction of energy that becomes unavailable due to irreversible heat transfer is 0.260038 eration with this heat transfer process is 0.352983 W/K \ No newline at end of file
diff --git a/3685/CH8/EX8.10/Ex8_10.sce b/3685/CH8/EX8.10/Ex8_10.sce
new file mode 100644
index 000000000..32304cdc5
--- /dev/null
+++ b/3685/CH8/EX8.10/Ex8_10.sce
@@ -0,0 +1,10 @@
+clc
+m = 3 // Mass flow rate in kg/s
+R = 0.287 // Gas constant
+T0 = 300 // Ambient temperature in K
+k = 0.10 // Fractional pressure drop
+printf("\n Example 8.10")
+Sgen = m*R*k // Entropy generation
+I = Sgen*T0 // Irreversibility Calculation
+printf("\n The rate of energy loss because of the pressure drop due to friction %f kW",I)
+
diff --git a/3685/CH8/EX8.10/Ex8_10.txt b/3685/CH8/EX8.10/Ex8_10.txt
new file mode 100644
index 000000000..bcce64e3f
--- /dev/null
+++ b/3685/CH8/EX8.10/Ex8_10.txt
@@ -0,0 +1,3 @@
+
+ Example 8.10
+ The rate of energy loss because of the pressure drop due to friction 25.830000 kW \ No newline at end of file
diff --git a/3685/CH8/EX8.11/Ex8_11.sce b/3685/CH8/EX8.11/Ex8_11.sce
new file mode 100644
index 000000000..66bfb6dd3
--- /dev/null
+++ b/3685/CH8/EX8.11/Ex8_11.sce
@@ -0,0 +1,23 @@
+clc
+m1 = 2 // Flow rate of water in kg/s
+m2 = 1 // Flow rate of another stream in kg/s
+T1 = 90 // Temperature of water in degree Celsius
+T2 = 30// Temperature of another stream in degree Celsius
+T0 =300 // Ambient temperature in K
+cp = 4.187 // Specific heat capacity of water in kJ/kgK
+
+printf("\n Example 8.11")
+m = m1+m2 // Net mass flow rate
+x = m1/m // mass fraction
+t = (T2+273)/(T1+273) // Temperature ratio
+Sgen = m*cp*log((x+t*(1-x))/(t^(1-x))) // Entropy generation
+I = T0*Sgen // Irreversibility production
+// Alternatively
+T = (m1*T1+m2*T2)/(m1+m2) // equilibrium temperature
+Sgen1 = m1*cp*log((T+273)/(T1+273))+m2*cp*log((T+273)/(T2+273))// Entropy generation
+I1 = T0*Sgen1 // Irreversibility production
+printf("\n The rate of entropy generation is %f kW/K",Sgen)
+printf("\n The rate of energy loss due to mixing is %f kW",I)
+printf("\n The rate of energy loss due to mixing is %f kW",I1) // Calculation from alternative way
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.11/Ex8_11.txt b/3685/CH8/EX8.11/Ex8_11.txt
new file mode 100644
index 000000000..65b15360a
--- /dev/null
+++ b/3685/CH8/EX8.11/Ex8_11.txt
@@ -0,0 +1,6 @@
+
+
+ Example 8.11
+ The rate of entropy generation is 0.044604 kW/K
+ The rate of energy loss due to mixing is 13.381067 kW
+ The rate of energy loss due to mixing is 13.381067 kW \ No newline at end of file
diff --git a/3685/CH8/EX8.12/Ex8_12.sce b/3685/CH8/EX8.12/Ex8_12.sce
new file mode 100644
index 000000000..14bba15e2
--- /dev/null
+++ b/3685/CH8/EX8.12/Ex8_12.sce
@@ -0,0 +1,47 @@
+clc
+Qr = 500 // Heat release in kW
+Tr = 2000 // Fuel burning temperature in K
+T0 = 300 // Ambient temperature in K
+// Part (a)
+printf("\n Example 8.12")
+Qa = 480 // Energy absorption by furnace in kW
+Ta = 1000 // Furnace temperature in K
+n1a = (Qa/Qr) // first law efficiency
+n2a = n1a*(1-(T0/Ta))/(1-(T0/Tr)) //second law efficiency
+
+//The answers vary due to round off error
+printf(" \n\n PART (A)")
+printf("\n The first law efficiency is %d percent" ,n1a*100)
+printf("\n The second law efficiency is %d percent",n2a*100)
+
+// Part (b)
+Qb = 450 // Energy absorption in steam generation in kW
+Tb = 500// steam generation temperature in K
+n1b = (Qb/Qr)// first law efficiency
+n2b = n1b*(1-(T0/Tb))/(1-(T0/Tr))//second law efficiency
+printf(" \n\n PART (B)")
+printf("\n The first law efficiency is %d percent" ,n1b*100)
+printf("\n The second law efficiency is %f percent",n2b*100)
+// Part (c)
+Qc = 300 // Energy absorption in chemical process in kW
+Tc = 320 // chemical process temperature in K
+n1c = (Qc/Qr) // first law efficiency
+n2c = n1c*(1-(T0/Tc))/(1-(T0/Tr))//second law efficiency
+printf(" \n\n PART (C)")
+printf("\n The first law efficiency is %d percent",n1c*100)
+printf("\n The second law efficiency is %f percent" ,n2c*100)
+// Part (d)
+Qd = 450
+n1d = (Qd/Qr)
+n2a_= n1d*(1-(T0/Ta))/(1-(T0/Tr))
+n2b_= n1d*(1-(T0/Tb))/(1-(T0/Tr))
+n2c_= n1d*(1-(T0/Tc))/(1-(T0/Tr))
+printf(" \n\n PART (D)")
+printf("\n The First law efficiency for all the three cases would remain same and here is %d percent",n1d*100) //The answer provided in the textbook is wrong
+
+printf("\n The Second law efficiency of part (a) is %f percent",n2a_*100)
+
+printf("\n The Second law efficiency of part (b) is %f percent",n2b_*100)
+
+printf("\n The Second law efficiency of part (c) is %f percent",n2c_*100)
+
diff --git a/3685/CH8/EX8.12/Ex8_12.txt b/3685/CH8/EX8.12/Ex8_12.txt
new file mode 100644
index 000000000..252925af1
--- /dev/null
+++ b/3685/CH8/EX8.12/Ex8_12.txt
@@ -0,0 +1,20 @@
+
+ Example 8.12
+
+ PART (A)
+ The first law efficiency is 96 percent
+ The second law efficiency is 79 percent
+
+ PART (B)
+ The first law efficiency is 90 percent
+ The second law efficiency is 42.352941 percent
+
+ PART (C)
+ The first law efficiency is 60 percent
+ The second law efficiency is 4.411765 percent
+
+ PART (D)
+ The First law efficiency for all the three cases would remain same and here is 90 percent
+ The Second law efficiency of part (a) is 74.117647 percent
+ The Second law efficiency of part (b) is 42.352941 percent
+ The Second law efficiency of part (c) is 6.617647 percent \ No newline at end of file
diff --git a/3685/CH8/EX8.14/Ex8_14.sce b/3685/CH8/EX8.14/Ex8_14.sce
new file mode 100644
index 000000000..8f19c4c4c
--- /dev/null
+++ b/3685/CH8/EX8.14/Ex8_14.sce
@@ -0,0 +1,19 @@
+clc
+cp = 1.005 // Specific heat capacity of air in kJ/kgK
+T2 = 160 // Compressed air temperature in degree Celsius
+T1 = 25 // Ambient temperature
+T0 = 25 // Ambient temperature
+R = 0.287 // Gas constant
+P2 = 8 // Pressure ratio
+P1 = 1 // Initial pressure of gas in bar
+Q = -100 // Heat loss to surrounding in kW
+m = 1 // Mass flow rate in kg/s
+
+printf("\n Example 8.14")
+W = Q + m*cp*((T1+273)-(T2+273)) // power input
+AF = cp*((T2+273)- (T1+273))-(T0+273)*((cp*log((T2+273)/(T1+273))-(R*log(P2/P1)))) // Availability
+e = AF/-W // efficiency
+printf("\n The power input is %f kW",W)
+printf(" \n The second law efficiency of the compressor is %f percent",e*100)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.14/Ex8_14.txt b/3685/CH8/EX8.14/Ex8_14.txt
new file mode 100644
index 000000000..a09006c7d
--- /dev/null
+++ b/3685/CH8/EX8.14/Ex8_14.txt
@@ -0,0 +1,4 @@
+
+ Example 8.14
+ The power input is -235.675000 kW
+ The second law efficiency of the compressor is 85.549423 percent \ No newline at end of file
diff --git a/3685/CH8/EX8.15/Ex8_15.sce b/3685/CH8/EX8.15/Ex8_15.sce
new file mode 100644
index 000000000..9f9a18bb2
--- /dev/null
+++ b/3685/CH8/EX8.15/Ex8_15.sce
@@ -0,0 +1,18 @@
+clc
+// Since vacuum has zero mass
+U = 0 // Initial internal energy in kJ/kg
+H0 = 0 // Initial enthalpy in kJ/kg
+S = 0 // Initial entropy in kJ/kgK
+// If the vacuum has reduced to dead state
+U0 = 0 // Final internal energy in kJ/kg
+H0 = 0 // Final enthalpy in kJ/kg
+S0 = 0 // Final entropy in kJ/kgK
+V0 = 0 // Final volume in m^3
+P0 = 1 // Pressure in bar
+V = 1 // Volume of space in m^3
+fi = P0*1e5*V
+
+printf("\n Example 8.15")
+printf("\n The exergy of the complete vacuum is %d kJ",fi/1e3)
+
+
diff --git a/3685/CH8/EX8.15/Ex8_15.txt b/3685/CH8/EX8.15/Ex8_15.txt
new file mode 100644
index 000000000..87e0faf14
--- /dev/null
+++ b/3685/CH8/EX8.15/Ex8_15.txt
@@ -0,0 +1,3 @@
+
+ Example 8.15
+ The exergy of the complete vacuum is 100 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.16/Ex8_16.sce b/3685/CH8/EX8.16/Ex8_16.sce
new file mode 100644
index 000000000..b5d882305
--- /dev/null
+++ b/3685/CH8/EX8.16/Ex8_16.sce
@@ -0,0 +1,22 @@
+clc
+m = 1000 // Mass of fish in kg
+T0 = 300 // Ambient temperature in K
+P0 = 1 // Ambient pressure in bar
+T1 = 300 // Initial temperature of fish in K
+T2_ = -20 // Final temperature of fish in degree Celsius
+Tf_ = -2.2 // Freezing point temperature of fish in degree Celsius
+Cb = 1.7 // Specific heat of fish below freezing point in kJ/kg
+Ca = 3.2 // Specific heat of fish above freezing point in kJ/kg
+Lh = 235 // Latent heat of fusion of fish in kJ/kg
+
+printf("\n Example 8.16")
+T2 = T2_+273 // Final temperature of fish in K
+Tf = Tf_+273 // Freezing point temperature of fish in K
+H12 = m*((Cb*(Tf-T2))+Lh+(Ca*(T1-Tf))) // Enthalpy change
+H21 = -H12 // Enthalpy change
+S12 = m*((Cb*log(Tf/T2))+(Lh/Tf)+(Ca*log(T1/Tf))) // Entropy change
+S21 = -S12 // Entropy change
+E = H21-T0*S21 //Exergy produced
+printf("\n Exergy produced is %f MJ or %f kWh",E/1e3,E/3600)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.16/Ex8_16.txt b/3685/CH8/EX8.16/Ex8_16.txt
new file mode 100644
index 000000000..5ffdf8ff7
--- /dev/null
+++ b/3685/CH8/EX8.16/Ex8_16.txt
@@ -0,0 +1,3 @@
+
+ Example 8.16
+ Exergy produced is 34.621027 MJ or 9.616952 kWh \ No newline at end of file
diff --git a/3685/CH8/EX8.17/Ex8_17.sce b/3685/CH8/EX8.17/Ex8_17.sce
new file mode 100644
index 000000000..523db7b5e
--- /dev/null
+++ b/3685/CH8/EX8.17/Ex8_17.sce
@@ -0,0 +1,20 @@
+clc
+cv = 0.718 // Specific heat capacity of air in kJ/kg
+T2 = 500 // Final temperature of air in K
+T1 = 300// Initial temperature of air in K
+m = 1 // Mass of air in kg
+T0 = 300 // Ambient temperature
+// Case (a)
+printf("\n Example 8.17")
+Sua = cv*log(T2/T1) // Entropy change of universe
+Ia = T0*Sua // irreversibility
+printf("\n The irreversibility in case a is %f kJ/kg",Ia)
+
+// Case (b)
+Q = m*cv*(T2-T1) // Heat transfer
+T = 600 // Temperature of thermal reservoir in K
+Sub = Sua-(Q/T) // Entropy change of universe
+Ib = T0*Sub // irreversibility
+printf("\n The irreversibility in case b is %f kJ/kg",Ib)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.17/Ex8_17.txt b/3685/CH8/EX8.17/Ex8_17.txt
new file mode 100644
index 000000000..557aea00a
--- /dev/null
+++ b/3685/CH8/EX8.17/Ex8_17.txt
@@ -0,0 +1,4 @@
+
+ Example 8.17
+ The irreversibility in case a is 110.031839 kJ/kg
+ The irreversibility in case b is 38.231839 kJ/kg \ No newline at end of file
diff --git a/3685/CH8/EX8.18/Ex8_18.sce b/3685/CH8/EX8.18/Ex8_18.sce
new file mode 100644
index 000000000..cfdc774b1
--- /dev/null
+++ b/3685/CH8/EX8.18/Ex8_18.sce
@@ -0,0 +1,23 @@
+clc
+h1 = 3230.9 // Enthalpy of steam at turbine inlet in kJ/kg
+s1 = 6.69212// Entropy of steam at turbine inlet in kJ/kgK
+V1 = 160 // Velocity of steam at turbine inlet in m/s
+T1 = 400 // Temperature of steam at turbine inlet in degree Celsius
+h2 = 2676.1 // Enthalpy of steam at turbine exit in kJ/kg
+s2 = 7.3549 // Entropy of steam at turbine exit in kJ/kgK
+V2 = 100 // Velocity of steam at turbine exit in m/s
+T2 = 100 // Temperature of steam at turbine exit in degree Celsius
+T0 = 298 // Ambient temperature in K
+W = 540 // Work developed by turbine in kW
+Tb = 500 // Average outer surface temperature of turbine in K
+
+printf("\n Example 8.18")
+Q = (h1-h2)+((V1^2-V2^2)/2)*1e-03-W // Heat loss
+I = 151.84-Q*(0.404) // Irreversibility
+AF = W + Q*(1-(T0/Tb)) + I // Exergy transfer
+n2 = W/AF // second law efficiency
+
+printf("\n Irreversibility per unit mass is %f kJ/kg",I)
+printf("\n The second law efficiency of the turbine is %d percent",n2*100)
+
+
diff --git a/3685/CH8/EX8.18/Ex8_18.txt b/3685/CH8/EX8.18/Ex8_18.txt
new file mode 100644
index 000000000..d9fb38026
--- /dev/null
+++ b/3685/CH8/EX8.18/Ex8_18.txt
@@ -0,0 +1,4 @@
+
+ Example 8.18
+ Irreversibility per unit mass is 142.709600 kJ/kg
+ The second law efficiency of the turbine is 78 percent \ No newline at end of file
diff --git a/3685/CH8/EX8.19/Ex8_19.sce b/3685/CH8/EX8.19/Ex8_19.sce
new file mode 100644
index 000000000..48cbd7dde
--- /dev/null
+++ b/3685/CH8/EX8.19/Ex8_19.sce
@@ -0,0 +1,22 @@
+clc
+T0 = 300 // Ambient temperature in K
+T = 1500 // Resistor temperature in K
+Q = -8.5 // Power supply in kW
+
+// Case (a)
+W = -Q // work transfer
+I = Q*(1-T0/T) + W // Irreversibility
+R = Q*(1-T0/T) // availability
+
+printf("\n Example 8.19")
+printf("\n Case A:")
+printf("\n Rate of availability transfer with heat and the irreversibility rate are \n %f kW and %f kW respectively.",I,R)
+// Case (b)
+T1 = 500 // Furnace wall temperature
+Ib = - Q*(1-T0/T) + Q*(1-T0/T1) // Irreversibility
+printf("\n Case B:")
+printf("\n Rate of availability in case b is %f kW ",Ib)
+
+
+
+
diff --git a/3685/CH8/EX8.19/Ex8_19.txt b/3685/CH8/EX8.19/Ex8_19.txt
new file mode 100644
index 000000000..54f9e0c77
--- /dev/null
+++ b/3685/CH8/EX8.19/Ex8_19.txt
@@ -0,0 +1,7 @@
+
+ Example 8.19
+ Case A:
+ Rate of availability transfer with heat and the irreversibility rate are
+ 1.700000 kW and -6.800000 kW respectively.
+ Case B:
+ Rate of availability in case b is 3.400000 kW \ No newline at end of file
diff --git a/3685/CH8/EX8.2/Ex8_2.sce b/3685/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..c8d2a4cd9
--- /dev/null
+++ b/3685/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,19 @@
+
+clc
+lhw = 1858.5 // Latent heat of water in kJ/kg
+Tew = 220 // Water evaporation temperature in degree Celsius
+
+Tig = 1100 // Initial temperature of the gas in degree Celsius
+Tfg = 550 // Final temperature of the gas in degree Celsius
+T0 = 303 // Atmospheric temperature in degree Celsius
+Tg2 = 823
+Tg1 = 1373
+printf("\n Example 8.2")
+Sw = lhw/(Tew+273) // Entropy generation in water
+Sg = integrate('3.38/T','T',Tg1,Tg2)
+St = Sg+Sw
+printf("\n Total change in entropy is %f kJ/K",St)
+
+printf("\n Increase in unavailable energy is %d kJ",T0*St)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.2/Ex8_2.txt b/3685/CH8/EX8.2/Ex8_2.txt
new file mode 100644
index 000000000..1775d33a0
--- /dev/null
+++ b/3685/CH8/EX8.2/Ex8_2.txt
@@ -0,0 +1,3 @@
+ Example 8.2
+ Total change in entropy is 2.039902 kJ/K
+ Increase in unavailable energy is 618 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.20/Ex8_20.sce b/3685/CH8/EX8.20/Ex8_20.sce
new file mode 100644
index 000000000..164d40268
--- /dev/null
+++ b/3685/CH8/EX8.20/Ex8_20.sce
@@ -0,0 +1,35 @@
+clc
+p1 = 1 // Air pressure at compressure inlet in bar
+t1 = 30 // Air temperature at compressure inlet in degree Celsius
+p2 = 3.5 // Air pressure at compressure exit in bar
+t2 = 141 // Air temperature at compressure exit in degree Celsius
+v = 90 // Air velocity at compressure exit in m/s
+cp = 1.0035 // Specific heat capacity of air in kJ/kg
+y = 1.4 // Heat capacity ratio
+R = 0.287 // Gas constant
+printf("\n Example 8.20\n")
+T2s = (t1+273)*(p2/p1)^((y-1)/y)
+if T2s>(t2+273) then
+ printf("\n Part A:")
+ printf("\n There is heat loss to surrounding.")
+end
+n =(1/(1-((log((t2+273)/(t1+273)))/(log(p2/p1)))))
+printf("\n\n Part B:")
+printf("\n The polytropic index is %f ",n)
+Wa = cp*(t1-t2)-(v^2)/2000 // Actual work
+Wt = -R*(t1+273)*log(p2/p1) - (v^2)/2000 // Isothermal work
+nt =Wt/Wa // Isothermal efficency
+printf("\n\n Part C:")
+printf("\n Isothermal efficiency is %f percent ",nt*100)
+df = cp*(t1-t2) + (t1+273)*(R*log(p2/p1) - cp*log((t2+273)/(t1+273))) -(v^2)/2000
+Wm = df // Minimum work input
+I = Wm-Wa // Irreversibility
+
+printf("\n\n Part D:")
+printf("\n The minimum work input is %f kJ/kg, and irreversibility is %f kJ/kg",Wm,I)
+// The answers given in the book contain round off error
+
+neta = Wm/Wa
+printf("\n\n Part E:")
+printf("\n Second law efficiency is %d percent",ceil(neta*100))
+
diff --git a/3685/CH8/EX8.20/Ex8_20.txt b/3685/CH8/EX8.20/Ex8_20.txt
new file mode 100644
index 000000000..8f8fc7bd8
--- /dev/null
+++ b/3685/CH8/EX8.20/Ex8_20.txt
@@ -0,0 +1,17 @@
+
+ Example 8.20
+
+ Part A:
+ There is heat loss to surrounding.
+
+ Part B:
+ The polytropic index is 1.331834
+
+ Part C:
+ Isothermal efficiency is 97.880274 percent
+
+ Part D:
+ The minimum work input is -101.404347 kJ/kg, and irreversibility is 14.034153 kJ/kg
+
+ Part E:
+ Second law efficiency is 88 percent \ No newline at end of file
diff --git a/3685/CH8/EX8.3/Ex8_3.sce b/3685/CH8/EX8.3/Ex8_3.sce
new file mode 100644
index 000000000..6373b23fd
--- /dev/null
+++ b/3685/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,15 @@
+clc
+Tw_ = 75 // Initial temperature of water in degree Celsius
+Ts_ = 5 // Atmospheric temperature in degree Celsius
+m = 40 // mass of water in kg
+cp = 4.2 // Specific heat capacity of water in kJ/kgK
+printf("\n Example 8.3")
+Tw= Tw_+273 // Initial temperature of water in K
+Ts = Ts_+273 // Atmospheric temperature in K
+Q1 = m*cp*(Tw-Ts) // Heat transfer
+
+W = integrate('m*cp*(1-(Ts/T))','T',Ts,Tw)
+UE = Q1-W // Available energy
+printf("\n Available energy is %d kJ",UE)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.3/Ex8_3.txt b/3685/CH8/EX8.3/Ex8_3.txt
new file mode 100644
index 000000000..090bd2ae6
--- /dev/null
+++ b/3685/CH8/EX8.3/Ex8_3.txt
@@ -0,0 +1,3 @@
+
+ Example 8.3
+ Available energy is 10488 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.4/Ex8_4.sce b/3685/CH8/EX8.4/Ex8_4.sce
new file mode 100644
index 000000000..953fbad4d
--- /dev/null
+++ b/3685/CH8/EX8.4/Ex8_4.sce
@@ -0,0 +1,19 @@
+clc
+Ts_ = 15 // Ambient temperature in degree Celsius
+Tw1_ = 95 // Temperature of water sample 1 in degree Celsius
+Tw2_ = 35// Temperature of water sample 2 in degree Celsius
+m1 = 25 // Mass of water sample 1 in kg
+m2 = 35 // Mass of water sample 2 in kg
+cp = 4.2 // Specific heat capacity of water in kJ/kgK
+printf("\n Example 8.4")
+Ts = Ts_+273// Ambient temperature in K
+Tw1 = Tw1_+273 // Temperature of water sample 1 in K
+Tw2 = Tw2_+273// Temperature of water sample 2 in K
+AE25 = integrate('m1*cp*(1-(Ts/T))','T',Ts,Tw1)
+AE35 = integrate('m2*cp*(1-(Ts/T))','T',Ts,Tw2)
+AEt = AE25 + AE35
+Tm = (m1*Tw1+m2*Tw2)/(m1+m2) // Temperature after mixing
+AE60 = integrate('(m1+m2)*cp*(1-(Ts/T))','T',Ts,Tm)
+AE = AEt - AE60
+printf("\n The decrease in the available energy is %f kJ",AE)
+
diff --git a/3685/CH8/EX8.4/Ex8_4.txt b/3685/CH8/EX8.4/Ex8_4.txt
new file mode 100644
index 000000000..373e449bb
--- /dev/null
+++ b/3685/CH8/EX8.4/Ex8_4.txt
@@ -0,0 +1,3 @@
+
+ Example 8.4
+ The decrease in the available energy is 281.816891 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.5/Ex8_5.sce b/3685/CH8/EX8.5/Ex8_5.sce
new file mode 100644
index 000000000..04cb38b77
--- /dev/null
+++ b/3685/CH8/EX8.5/Ex8_5.sce
@@ -0,0 +1,17 @@
+clc
+N1 = 3000 // Speed of rotation of flywheel in RPM
+I = 0.54 // Moment of inertia of flywheel in kgm^2
+ti_ = 15 // Temperature of insulated system in degree Celsius
+m = 2 // Water equivalent of shaft
+printf("\n Example 8.5")
+w1 = (2*%pi*N1)/60 // Angular velocity of rotation in rad/s
+Ei = 0.5*I*w1^2 // rotational kinetic energy
+dt = Ei/(1000*2*4.187) // temperature change
+ti = ti_+273// Temperature of insulated system in Kelvin
+tf = ti+dt // final temperature
+AE = integrate('m*4.187*(1-(ti/T))','T',ti,tf)
+UE = Ei/1000 - AE // Unavailable enrgy
+w2 = sqrt(AE*1000*2/I) // Angular speed in rad/s
+N2 = (w2*60)/(2*%pi) // Speed of rotation in RPM
+printf("\n The final RPM of the flywheel would be %d RPM",N2)
+
diff --git a/3685/CH8/EX8.5/Ex8_5.txt b/3685/CH8/EX8.5/Ex8_5.txt
new file mode 100644
index 000000000..bb1a31048
--- /dev/null
+++ b/3685/CH8/EX8.5/Ex8_5.txt
@@ -0,0 +1,3 @@
+
+ Example 8.5
+ The final RPM of the flywheel would be 222 RPM ble energy is 281.816891 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.6/Ex8_6.sce b/3685/CH8/EX8.6/Ex8_6.sce
new file mode 100644
index 000000000..e035ba4f8
--- /dev/null
+++ b/3685/CH8/EX8.6/Ex8_6.sce
@@ -0,0 +1,24 @@
+clc
+T1_ = 80 // Initial temperature of air in degree Celsius
+T2_ = 5 // Final temperature of air in degree Celsius
+V2 = 2 // Assumed final volume
+V1 = 1 // Assumed initial volume
+P0 = 100 // Final pressure of air in kPa
+P1 = 500 // Initial pressure of air in kPa
+R = 0.287 // Gas constant
+cv = 0.718 // Specific heat capacity at constant volume for gas in kJ/kg K
+m = 2 // Mass of gas in kg
+printf("\n Example 8.6")
+T1= T1_+273 // Initial temperature of air in K
+T2 = T2_+273 // Final temperature of air in K
+S = integrate('(m*cv)/T','T',T1,T2) + integrate('(m*R)/V','V',V1,V2) // Entropy change
+U = m*cv*(T1-T2)// Change in internal energy
+Wmax = U-(T2*(-S)) // Maximum possible work
+V1_ = (m*R*T1)/P1 // volume calculation
+CA = Wmax-P0*(V1_) // Change in availability
+I = T2*S // Irreversibility
+printf("\n The maximum work is %f kJ",Wmax)
+printf("\n Change in availability is %f kJ",CA)
+printf("\n Irreversibility is %f kJ",I)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.6/Ex8_6.txt b/3685/CH8/EX8.6/Ex8_6.txt
new file mode 100644
index 000000000..a55611989
--- /dev/null
+++ b/3685/CH8/EX8.6/Ex8_6.txt
@@ -0,0 +1,5 @@
+
+ Example 8.6
+ The maximum work is 122.957271 kJ
+ Change in availability is 82.432871 kJ
+ Irreversibility is 15.257271 kJ \ No newline at end of file
diff --git a/3685/CH8/EX8.7/Ex8_7.sce b/3685/CH8/EX8.7/Ex8_7.sce
new file mode 100644
index 000000000..b4fef43a8
--- /dev/null
+++ b/3685/CH8/EX8.7/Ex8_7.sce
@@ -0,0 +1,27 @@
+clc
+P1 = 500 // Initial pressure of steam in kPa
+P2 = 100// Final pressure of steam in kPa
+T1_ = 520 //Initial temperature of steam in degree Celsius
+T2_ = 300 //Final temperature of steam in degree Celsius
+cp = 1.005 // Specific heat capacity of steam in kJ/kgK
+t0 = 20 // Atmospheric temperature in degree Celsius
+R = 0.287 // Gas constant
+Q = -10 // Heat loss to surrounding in kJ/kg
+printf("\n Example 8.7")
+T1 = T1_+273 //Initial temperature of steam in degree Celsius
+T2 = T2_+273 //Final temperature of steam in degree Celsius
+S21 = (R*log(P2/P1))-(cp*log(T2/T1))
+T0 = t0+273
+CA = cp*(T1-T2)-T0*S21 // Change in availability
+Wmax = CA // Maximum possible work
+W = cp*(T1-T2)+Q // net work
+I = Wmax-W // Irreversibility
+// Altenatively
+Ssystem = -Q/T0
+Ssurr = -S21
+I1 = T0*(Ssystem+Ssurr)
+printf("\n The decrease in availability is %f kJ/kg",CA)
+printf("\n The maximum work is %f kJ/kg",Wmax)
+printf("\n The irreversibility is %f kJ/kg",I)
+printf("\n Alternatively, The irreversibility is %f kJ/kg",I1)
+
diff --git a/3685/CH8/EX8.7/Ex8_7.txt b/3685/CH8/EX8.7/Ex8_7.txt
new file mode 100644
index 000000000..b4eb5a1d5
--- /dev/null
+++ b/3685/CH8/EX8.7/Ex8_7.txt
@@ -0,0 +1,6 @@
+
+ Example 8.7
+ The decrease in availability is 260.756521 kJ/kg
+ The maximum work is 260.756521 kJ/kg
+ The irreversibility is 49.656521 kJ/kg
+ Alternatively, The irreversibility is 49.656521 kJ/kg \ No newline at end of file
diff --git a/3685/CH8/EX8.8/Ex8_8.sce b/3685/CH8/EX8.8/Ex8_8.sce
new file mode 100644
index 000000000..a46d192e0
--- /dev/null
+++ b/3685/CH8/EX8.8/Ex8_8.sce
@@ -0,0 +1,34 @@
+
+clc
+T0 = 300 // Atmospheric temperature in K
+Tg1_ = 300 // Higher temperature of combustion product in degree Celcius
+Tg2_ = 200 // Lower temperature of combustion product in degree Celcius
+Ta1 = 40 // Initial air temperature in K
+cpg = 1.09 // Specific heat capacity of combustion gas in kJ/kgK
+cpa = 1.005// Specific heat capacity of air in kJ/kgK
+mg = 12.5 // mass flow rate of product in kg/s
+ma = 11.15// mass flow rate of air in kg/s
+
+printf("\n Example 8.8")
+Tg1 = Tg1_+273 // Higher temperature of combustion product in K
+Tg2 = Tg2_+273 // Lower temperature of combustion product in K
+f1 = cpg*(Tg1-T0)-T0*cpg*(log(Tg1/T0)) // Initial availability of product
+f2 = cpg*(Tg2-T0)-T0*cpg*(log(Tg2/T0)) // Final availability of product
+printf("\n The initial and final availability of the products are %f kJ/Kg and %f kJ/Kg respectively",f1,f2)
+//The answer provided in the textbook is wrong
+
+// Part (b)
+Dfg = f1-f2 // Decrease in availability of products
+Ta2 = (Ta1+273) + (mg/ma)*(cpg/cpa)*(Tg1-Tg2) // Exit temperature of air
+Ifa = cpa*(Ta2-(Ta1+273))-T0*cpa*(log(Ta2/(Ta1+273))) // Increase in availability of air
+I = mg*Dfg-ma*Ifa // Irreversibility
+printf("\n The irreversibility of the process is %f kW",I)
+////The answer provided in the textbook contains round off error
+
+// Part (c)
+Ta2_ = (Ta1+273)*(Tg1/Tg2)^((12.5*1.09)/(11.5*1.005))
+Q1 = mg*cpg*(Tg1-Tg2) // Heat supply rate from gas to working fluid
+Q2 = ma*cpa*(Ta2_-(Ta1+273))// Heat rejection rate from the working fluid in heat engine
+W = Q1-Q2 // Power developed by heat engine
+printf("\n Total power generated by the heat engine is %f kW",W)
+//The answer provided in the textbook contains round off error
diff --git a/3685/CH8/EX8.8/Ex8_8.txt b/3685/CH8/EX8.8/Ex8_8.txt
new file mode 100644
index 000000000..6fb2cc693
--- /dev/null
+++ b/3685/CH8/EX8.8/Ex8_8.txt
@@ -0,0 +1,5 @@
+
+ Example 8.8
+ The initial and final availbility of the products are 85.967240 kJ/Kg and 39.682677 kJ/Kg respectively
+ The irreversibility of the process is 319.369802 kW
+ Total power generated by the heat engine is 472.671938 kW \ No newline at end of file
diff --git a/3685/CH8/EX8.9/Ex8_9.sce b/3685/CH8/EX8.9/Ex8_9.sce
new file mode 100644
index 000000000..9bb623331
--- /dev/null
+++ b/3685/CH8/EX8.9/Ex8_9.sce
@@ -0,0 +1,18 @@
+clc
+T2 = 790 // Final temperature of gas in degree Celsius
+T1 = 800 // Initial temperature of gas in degree Celsius
+m = 2 // Mass flow rate in kg/s
+cp = 1.1 // Specific heat capacity in kJ/KgK
+T0 = 300 // Ambient temperature in K
+
+printf("\n Example 8.9")
+I = m*cp*(((T1+273)-(T2+273))-T0*(log((T1+273)/(T2+273)))) // irreversibility rate
+printf("\n The irreversibility rate is %f kW",I)
+
+// At lower temperature
+T1_ = 80 // Initial temperature of gas in degree Celsius
+T2_ = 70 // Initial temperature of gas in degree Celsius
+I_ = m*cp*(((T1_+273)-(T2_+273))-T0*(log((T1_+273)/(T2_+273)))) // irreversibility rate
+printf("\n The irreversibility rate at lower temperature is %f kW",I_)
+//The answers vary due to round off error
+
diff --git a/3685/CH8/EX8.9/Ex8_9.txt b/3685/CH8/EX8.9/Ex8_9.txt
new file mode 100644
index 000000000..8d2a562e4
--- /dev/null
+++ b/3685/CH8/EX8.9/Ex8_9.txt
@@ -0,0 +1,4 @@
+
+ Example 8.9
+ The irreversibility rate is 15.820180 kW
+ The irreversibility rate at lower temperature is 3.033178 kW \ No newline at end of file