summaryrefslogtreecommitdiff
path: root/1919/CH5/EX5.3/Ex5_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1919/CH5/EX5.3/Ex5_3.sce')
-rwxr-xr-x1919/CH5/EX5.3/Ex5_3.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/1919/CH5/EX5.3/Ex5_3.sce b/1919/CH5/EX5.3/Ex5_3.sce
new file mode 100755
index 000000000..55f9e6099
--- /dev/null
+++ b/1919/CH5/EX5.3/Ex5_3.sce
@@ -0,0 +1,23 @@
+
+// Theory and Problems of Thermodynamics
+// Chapter 5
+// Second law of Thermodynamics
+// Example 3
+
+clear ;clc;
+
+//Given data
+TL = -10 //TL = Lower temperature of reservoir
+TH = 40 //TH = High temperature of reservoir
+
+// Units conversion from Celsius to Kelvin
+TL = TL + 273.15;
+TH = TH + 273.15;
+
+// To find the coefficient of performance of a Carnot refrigerator and a Carnot Heat Pump
+COP_R = TL/(TH-TL); // Carnot refrigerator
+COP_HP = TH/(TH-TL); // Carnot Heat pump
+
+// Results
+mprintf('The coefficient of performance of a Carnot refrigerator = %5.3f ', COP_R)
+mprintf('\n The coefficient of performance of a Carnot Heat Pump = %5.3f ', COP_HP)