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 /555/CH7/EX7.8/8.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 '555/CH7/EX7.8/8.sce')
-rw-r--r-- | 555/CH7/EX7.8/8.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/555/CH7/EX7.8/8.sce b/555/CH7/EX7.8/8.sce new file mode 100644 index 000000000..45abb4d0a --- /dev/null +++ b/555/CH7/EX7.8/8.sce @@ -0,0 +1,25 @@ +// Implementation of example 7.8
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+Pa = 130; //kPa
+Pb = 100; //kPa
+Ta = 50; //degree C
+Ta = Ta + 273; //K
+Tb = 13; //degree C
+Tb = Tb + 273; //K
+Cp = 1.005; //kJ/kg K
+dS_sys = Cp * log(Tb/Ta) - 0.287 * log(Pb/Pa);
+dS_surr = 0;
+dS_univ = dS_sys + dS_surr;
+printf("dS_univ = %f kJ/kg K\n\n",dS_univ);
+
+if dS_univ<0 then
+ printf("Flow must be from B to A since entropy cannot be negative\n");
+elseif dS_univ>0 then
+ printf("Flow must be from A to B as entropy change is positive\n");
+else
+ printf("Flow will not occur\n");
+end
\ No newline at end of file |