summaryrefslogtreecommitdiff
path: root/1919/CH4/EX4.10/Ex4_10.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1919/CH4/EX4.10/Ex4_10.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 '1919/CH4/EX4.10/Ex4_10.sce')
-rwxr-xr-x1919/CH4/EX4.10/Ex4_10.sce34
1 files changed, 34 insertions, 0 deletions
diff --git a/1919/CH4/EX4.10/Ex4_10.sce b/1919/CH4/EX4.10/Ex4_10.sce
new file mode 100755
index 000000000..68b4b7c81
--- /dev/null
+++ b/1919/CH4/EX4.10/Ex4_10.sce
@@ -0,0 +1,34 @@
+
+// Theory and Problems of Thermodynamics
+// Chapter 4
+// Energy Analysis of Process
+// Example 10
+
+clear ;clc;
+
+//Given data
+V = 2 // volume in m^3
+gam = 1.67 // gamma ideal gas coefficient
+P0 = 0.1 // Initial Pressure in MPa
+T0 = 300 // Initial Temperature in K
+Pf = 3 // Final Pressure in MPa
+T1 = 500 // Final Temperature in K
+R = 8.314 // Gas constant
+
+// Calculation
+// the first law of thermodynamics for a transient flow and after rewriting
+Tf = Pf/(((Pf-P0)/(gam*T1))+(P0/T0)) // Final temperature
+
+Pf = Pf * 1e6 // units conversion from MPa to Pa
+P0 = P0 * 1e6 // units conversion from MPa to Pa
+
+q = (V/R)*(Pf/Tf - P0/T0)
+
+// Output Results
+mprintf('Temperature of helium in the tank = %6.2f K',Tf)
+mprintf('\nQuantity of helium entered into tank = %6.2f mol',q)
+
+
+
+
+