From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3685/CH7/EX7.2/Ex7_2.sce | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 3685/CH7/EX7.2/Ex7_2.sce (limited to '3685/CH7/EX7.2/Ex7_2.sce') diff --git a/3685/CH7/EX7.2/Ex7_2.sce b/3685/CH7/EX7.2/Ex7_2.sce new file mode 100644 index 000000000..6efb5ccdc --- /dev/null +++ b/3685/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,24 @@ +clc +// Part (a) +T1 = 273 // Initial temperature of water in Kelvin +T2 = 373 // Temperature of heat reservoir in Kelvin +m = 1 // Mass of water in kg +cv = 4.187 // Specific heat capacity of water + +printf("\n Example 7.2") +Ss = m*cv*log(T2/T1) // entropy change of water +Q = m*cv*(T2-T1) // Heat transfer +Sr = -(Q/T2) // Entropy change of universe +S = Ss+Sr // Total entropy change + +printf("\n The entropy change of the universe is %f kJ/K",S) + +// Part (b) +T3 = 323 // Temperature of intermediate reservoir in K +Sw = m*cv*(log(T3/T1)+log(T2/T3)) // entropy change of water +Sr1 = -m*cv*(T3-T1)/T3 // Entropy change of universe +Sr2 = -m*cv*(T2-T3)/T2 // Entropy change of universe +Su = Sw+Sr1+Sr2 // Total entropy change +printf("\n The entropy change of the universe is %f kJ/K",Su) +//The answers vary due to round off error + -- cgit