summaryrefslogtreecommitdiff
path: root/3685/CH8/EX8.16/Ex8_16.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.16/Ex8_16.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.16/Ex8_16.sce')
-rw-r--r--3685/CH8/EX8.16/Ex8_16.sce22
1 files changed, 22 insertions, 0 deletions
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
+