summaryrefslogtreecommitdiff
path: root/2339/CH3/EX3.18.1
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.18.1
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.18.1')
-rwxr-xr-x2339/CH3/EX3.18.1/Ex3_18.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/2339/CH3/EX3.18.1/Ex3_18.sce b/2339/CH3/EX3.18.1/Ex3_18.sce
new file mode 100755
index 000000000..97010da21
--- /dev/null
+++ b/2339/CH3/EX3.18.1/Ex3_18.sce
@@ -0,0 +1,26 @@
+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=1.5;
+m=2;
+T1=27+273;
+T2=207+273;
+V2=V1;
+M=28;
+Ro=8.314;
+
+R=Ro/M;
+
+P1=(m*R*T1)/V1;
+printf('The initial pressure of gas: %3.3f bar',P1/100);
+printf('\n');
+
+P2=(P1*T2)/T1;
+printf('The final pressure of gas: %3.3f bar',P2/100);
+printf('\n');