summaryrefslogtreecommitdiff
path: root/3685/CH8/EX8.11/Ex8_11.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.11/Ex8_11.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.11/Ex8_11.sce')
-rw-r--r--3685/CH8/EX8.11/Ex8_11.sce23
1 files changed, 23 insertions, 0 deletions
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
+