summaryrefslogtreecommitdiff
path: root/3831/CH10/EX10.2/Ex10_2.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3831/CH10/EX10.2/Ex10_2.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 '3831/CH10/EX10.2/Ex10_2.sce')
-rw-r--r--3831/CH10/EX10.2/Ex10_2.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3831/CH10/EX10.2/Ex10_2.sce b/3831/CH10/EX10.2/Ex10_2.sce
new file mode 100644
index 000000000..317534203
--- /dev/null
+++ b/3831/CH10/EX10.2/Ex10_2.sce
@@ -0,0 +1,20 @@
+// Example 10_2
+clc;funcprot(0);
+// Given data
+p_0=0.101;// MPa
+T_0=20.0+273;// K
+p=1.500; // MPa
+T=20+273;// K
+C_v=0.781;// kJ/kg.K
+C_p=1.004;// kJ/kg.K
+R=0.286;// kJ/kg.K
+g=9.81;// m/s^2
+g_c=1;// The gravitational constant
+
+// Calculation
+// Assume deltau=u-u_0;deltav=v-v_0;deltas=s-s_0;
+deltau=C_v*(T-T_0);// kJ/kg
+deltav=R*((T/(p*10^3))-(T_0/(p_0*10^3)));// kJ/kg
+deltas=(C_p*log(T/T_0))-(R*log((p*10^3)/(p_0*10^3)));// kJ/kg
+a=deltau+(p_0*10^3*deltav)-(T_0*deltas)+0+0;// kJ/kg
+printf("\nThe specific available energy,a=%3.0f kJ/kg",a);