summaryrefslogtreecommitdiff
path: root/1919/CH4/EX4.14/Ex4_14.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.14/Ex4_14.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.14/Ex4_14.sce')
-rwxr-xr-x1919/CH4/EX4.14/Ex4_14.sce55
1 files changed, 55 insertions, 0 deletions
diff --git a/1919/CH4/EX4.14/Ex4_14.sce b/1919/CH4/EX4.14/Ex4_14.sce
new file mode 100755
index 000000000..e3b70c784
--- /dev/null
+++ b/1919/CH4/EX4.14/Ex4_14.sce
@@ -0,0 +1,55 @@
+
+// Theory and Problems of Thermodynamics
+// Chapter 4
+// Energy Analysis of Process
+// Example 14
+
+clear ;clc;
+
+//Given data
+V = 1 // Volume of tank in m^3
+P0 = 1 // Initial Pressure in MPa
+Pf = 0.8 // final Pressure in MPa
+P0 = P0*1e3 // units conversion MPa to kPa
+Pf = Pf*1e3 // units conversion MPa to kPa
+
+// at P = 1 MPa
+v0 = 0.19444 // units m^3/kg
+h0 = 2778.1 // units kJ/kg
+
+m0 = V/v0 // mass in kg
+u0 = h0-P0*v0 // units kJ/kg
+
+
+mf = 4.243 // assume mf in kg
+vf = V/mf // units in m3/kg
+
+//at 0.8 MPa
+vf_sat = 0.001115 // data from steam tables units m^3/kg
+vg = 0.2404 // data from steam tables units m^3/kg
+hf_sat = 721.11 // data from steam tables units kJ/kg
+hg = 2769.1 // data from steam tables units kJ/kg
+hfg = 2048.97 // data from steam tables units kJ/kg
+
+// Calculations
+X = (vf - vf_sat)/(vg - vf_sat) // Fraction of steam
+
+hf = hf_sat + X * hfg // units kJ/kg
+uf = hf-Pf*vf // units kJ/kg
+h2 = (h0 + hg) * 0.5
+
+// substitute the values in LHS and RHS of equation D till both gets same
+//(m0-mf)*h2 = m0*u0 - mf*uf
+LHS = (m0-mf)*h2
+RHS = m0*u0 - mf*uf
+
+mass_steam = m0-mf // mass of the steam in kg
+
+// Output Results
+
+mprintf('Amount of steam withdrawn from tank = %3.1f kg', mass_steam)
+
+
+
+
+