summaryrefslogtreecommitdiff
path: root/2339/CH3/EX3.39.1/Ex3_39.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2339/CH3/EX3.39.1/Ex3_39.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 '2339/CH3/EX3.39.1/Ex3_39.sce')
-rwxr-xr-x2339/CH3/EX3.39.1/Ex3_39.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/2339/CH3/EX3.39.1/Ex3_39.sce b/2339/CH3/EX3.39.1/Ex3_39.sce
new file mode 100755
index 000000000..43ec4bdcd
--- /dev/null
+++ b/2339/CH3/EX3.39.1/Ex3_39.sce
@@ -0,0 +1,28 @@
+clc
+clear
+
+//Inputs
+//The Values in the program are as follows:
+//Temperature in Celcius converted to Kelvin(by adding 273)
+//Pressure in bar converted to kPa (by multiplying 100)
+//Volume in m^3
+//Value of R,Cp and Cv in kJ/kg K
+V1=0.6;
+P1=1;
+T1=90+273;
+V2=0.18;
+P2=5;
+R=0.287;
+G=1.4;
+
+m=(P1*100*V1)/(R*T1);
+printf('The mass of Gas: %3.4f kg',m);
+printf('\n');
+n=(log(P2/P1))/(log(V1/V2));
+printf('The value of n: %3.3f ',n);
+printf('\n');
+Cv=R/(G-1);
+T2=((P2*V2)/(P1*V1))*T1;
+U=m*Cv*(T2-T1);
+printf('The change in Internal Energy: %3.3f kJ',U);
+printf('\n');