summaryrefslogtreecommitdiff
path: root/3685/CH8/EX8.20/Ex8_20.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3685/CH8/EX8.20/Ex8_20.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3685/CH8/EX8.20/Ex8_20.sce')
-rw-r--r--3685/CH8/EX8.20/Ex8_20.sce35
1 files changed, 35 insertions, 0 deletions
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))
+