summaryrefslogtreecommitdiff
path: root/2339/CH3/EX3.21.1/Ex3_21.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.21.1/Ex3_21.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.21.1/Ex3_21.sce')
-rwxr-xr-x2339/CH3/EX3.21.1/Ex3_21.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/2339/CH3/EX3.21.1/Ex3_21.sce b/2339/CH3/EX3.21.1/Ex3_21.sce
new file mode 100755
index 000000000..ff2653d4c
--- /dev/null
+++ b/2339/CH3/EX3.21.1/Ex3_21.sce
@@ -0,0 +1,23 @@
+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
+V=1.6;
+P=1;
+m=2;
+T=17+273;
+G=1.4;
+
+R=(P*100*V)/(m*T);
+Cv=(R)/(G-1);
+printf('The Value of Cv: %1.2f kJ/kg K',Cv);
+printf('\n');
+
+Cp=Cv+R;
+printf('The Value of Cp: %1.3f kJ/kg K',Cp);
+printf('\n')