diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3685/CH7/EX7.2/Ex7_2.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-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/CH7/EX7.2/Ex7_2.sce')
-rw-r--r-- | 3685/CH7/EX7.2/Ex7_2.sce | 24 |
1 files changed, 24 insertions, 0 deletions
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 + |