summaryrefslogtreecommitdiff
path: root/1913/CH2/EX2.7/ex7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1913/CH2/EX2.7/ex7.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 '1913/CH2/EX2.7/ex7.sce')
-rwxr-xr-x1913/CH2/EX2.7/ex7.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/1913/CH2/EX2.7/ex7.sce b/1913/CH2/EX2.7/ex7.sce
new file mode 100755
index 000000000..136db5b4c
--- /dev/null
+++ b/1913/CH2/EX2.7/ex7.sce
@@ -0,0 +1,19 @@
+clc
+clear
+//Input data
+m=3;//Mass of substance in the system in kg
+P1=500;//Initial pressure of the system in kPa
+P2=100;//Final pressure of the system in kPa
+V1=0.22;//Initial volume of the system in m^3
+n=1.2;//Polytropic index
+Q1=30;//Heat transfer for the another process
+
+//Calculations
+V2=V1*(P1/P2)^(1/1.2);//Final volume of the system in m^3
+U=3.56*(P2*V2-P1*V1);//Total change in internal energy in kJ
+W1=(P2*V2-P1*V1)/(1-n);//Work done for the 1-2 process in kJ
+Q=U+W1;//Heat developed in the process in kJ
+W2=Q1-U;//Work done for the another process in kJ
+
+//Output
+printf('(a)Total change in internal energy U = %3.0f kJ \n (b)Work done for the 1-2 process W = %3.0f kJ \n (c)Heat developed in the process Q = %3.0f kJ \n (d)Work done for the another process W = %3.0f kJ ',U,W1,Q,W2)