summaryrefslogtreecommitdiff
path: root/2417/CH4/EX4.1/Ex4_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2417/CH4/EX4.1/Ex4_1.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2417/CH4/EX4.1/Ex4_1.sce')
-rwxr-xr-x2417/CH4/EX4.1/Ex4_1.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/2417/CH4/EX4.1/Ex4_1.sce b/2417/CH4/EX4.1/Ex4_1.sce
new file mode 100755
index 000000000..bf325932b
--- /dev/null
+++ b/2417/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,31 @@
+//scilab 5.4.1
+clear;
+clc;
+printf("\t\t\tProblem Number 4.1\n\n\n");
+// Chapter 4 : The Second Law Of Thermodynamics
+// Problem 4.1 (page no. 148)
+// Solution
+
+//given data
+t1=1000; //(unit:fahrenheit) //Source temperature
+t2=80; //(unit:fahrenheit) //Sink temperature
+//solution
+//converting temperatures to absolute temperatures;
+T1=t1+460; //Source temperature //Unit:R
+T2=t2+460; //Sink temperature //Unit:R
+
+printf("Solution for (a)\n");
+ans=((T1-T2)/T1)*100;//(ans in %) //Efficiency of the engine
+printf("Efficiency of the engine is %f percentage\n\n",ans);
+
+printf("Solution for (b)\n");
+T1=2000+460; //Source temperature //Unit:R
+T2=t2+460; //Sink temperature //Unit:R
+ans=((T1-T2)/T1)*100;//(ans in %) //Efficiency of the engine
+printf("When the upper tempretrature is increased upto certain ,Efficiency of the engine is %f percentage \n\n",ans);
+
+printf("Solution for (c)\n");
+T1=t1+460; //Source temperature //Unit:R
+T2=160+460; //Sink temperature //Unit:R
+ans=((T1-T2)/T1)*100;//(ans in %) //Efficiency of the engine
+printf("When the lower tempretrature is increased upto certain ,Efficiency of the engine is %f percentage \n\n",ans);