diff options
Diffstat (limited to '2870/CH7/EX7.2/Ex7_2.sce')
-rwxr-xr-x | 2870/CH7/EX7.2/Ex7_2.sce | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/2870/CH7/EX7.2/Ex7_2.sce b/2870/CH7/EX7.2/Ex7_2.sce new file mode 100755 index 000000000..26ecb40e0 --- /dev/null +++ b/2870/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,28 @@ +clc;clear;
+//Example 7.2
+
+//given data
+Qsink=2000;
+Qsource=-Qsink;
+Tsource=800;
+
+//calculations
+//part - a
+Tsink=500;
+dSsource=Qsource/Tsource;
+dSsink=Qsink/Tsink;
+Sgena=dSsource+dSsink;
+disp(Sgena,'entropy generated in part a in kJ/K is ');
+//part - b
+Tsink=750;
+dSsource=Qsource/Tsource;
+dSsink=Qsink/Tsink;
+Sgenb=dSsource+dSsink;
+disp(Sgenb,'entropy generated in part b in kJ/K is ');
+if(Sgena>Sgenb)
+ disp('part a is more irreversible');
+elseif(Sgena == Sgenb)
+ disp('heat transfer is equally irreversible');
+else
+ disp('part b is more irreversible');
+end,
|