diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2507/CH2/EX2.5/Ex2_5.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2507/CH2/EX2.5/Ex2_5.sce')
-rwxr-xr-x | 2507/CH2/EX2.5/Ex2_5.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/2507/CH2/EX2.5/Ex2_5.sce b/2507/CH2/EX2.5/Ex2_5.sce new file mode 100755 index 000000000..f3ce66025 --- /dev/null +++ b/2507/CH2/EX2.5/Ex2_5.sce @@ -0,0 +1,25 @@ +clc
+clear
+printf("Example 2.5 | Page number 40 \n\n");
+//Find the work interaction for pure substance.
+//Given Data
+p1 = 10 //bar //initial pressure
+V1 = 0.1 //m^3 //initial volume
+p2 = 2 //bar //final pressure
+V2 = 0.35 //m^3 //final volume
+
+printf("Initial pressure = %.2f bar\n",p1);
+printf("inital volume = %.2f m^3\n",V1);
+printf("Final pressure = %.2f bar\n",p2);
+printf("Final volume = %.2f m^3\n",V2);
+
+//Solution
+printf("\nLet the expansion process follow the path pV^(n) = constant\n");
+printf("Therefore,\n");
+n = (log(p1/p2))/(log(V2/V1));
+printf("n = (ln(p1/p2))/(ln(V2/V1)) = (ln(%.2f/%.2f))/(ln(%.2f/%.2f)) = %.4f\n",p1,p2,V2,V1,n);
+W_d = (p1*V1 - p2*V2)*10^5/(n-1) //J //Work interaction for pure substance
+printf("Work interaction for pure substance = (p1V1 - p2V2)/(n-1) = %.2f kJ",W_d*.001)
+
+
+
|