summaryrefslogtreecommitdiff
path: root/3685/CH12/EX12.1/Ex12_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3685/CH12/EX12.1/Ex12_1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3685/CH12/EX12.1/Ex12_1.sce')
-rw-r--r--3685/CH12/EX12.1/Ex12_1.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3685/CH12/EX12.1/Ex12_1.sce b/3685/CH12/EX12.1/Ex12_1.sce
new file mode 100644
index 000000000..5cad8cd3f
--- /dev/null
+++ b/3685/CH12/EX12.1/Ex12_1.sce
@@ -0,0 +1,19 @@
+clc
+// Part (a)
+P1 = 1 // Initial pressure in bar
+P2 = 10 // Final pressure in bar
+vf = 0.001043 // specific volume of liquid in m^3/kg
+Wrev = vf*(P1-P2)*1e5 // Work done
+
+printf("\n Example 12.1")
+printf("\n The work required in saturated liquid form is %f kJ/kg",Wrev/1000)
+//The answers vary due to round off error
+
+// Part (b)
+h1 = 2675.5 // Enthalpy at state 1 in kJ/kg
+s1 = 7.3594 // Entropy at state 1 kJ/kgK
+s2 = s1 // Isentropic process
+h2 = 3195.5 // Enthalpy at state 2 kJ/kg
+Wrev1 = h1-h2 // Work done
+printf("\n The work required in saturated vapor form is %d kJ/kg",Wrev1)
+