summaryrefslogtreecommitdiff
path: root/3564/CH1/EX1.7/Ex1_7.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3564/CH1/EX1.7/Ex1_7.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 '3564/CH1/EX1.7/Ex1_7.sce')
-rw-r--r--3564/CH1/EX1.7/Ex1_7.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/3564/CH1/EX1.7/Ex1_7.sce b/3564/CH1/EX1.7/Ex1_7.sce
new file mode 100644
index 000000000..3794091ed
--- /dev/null
+++ b/3564/CH1/EX1.7/Ex1_7.sce
@@ -0,0 +1,29 @@
+
+// Display mode
+mode(0);
+
+// Display warning for floating point exception
+ieee(1);
+
+clc;
+disp("Introduction to Fluid Mechanics, 3rd Ed. William S. Janna Chapter - 1 Example # 1.7 ")
+
+//Using Appendix table A.6 for properties of air
+//Specific heat of air in Btu/slag
+cp = 7.72;
+//Specific heat ratio gamma for air is
+gamma = 1.4;
+//Specific heat at constant volume of air in Btu/slag.R
+cv = cp/gamma;
+
+//Inital temperature in degree F
+T1 = 70;//Symbol is assumed for computation
+//Final temperature in degree F
+T2 = 110;//Symbol is assumed for computation
+//Temperature difference deltaT in degree K
+deltaT = T2-T1;
+
+//Change in internal energy in Btu/slag
+disp("Change in internal energy in Btu/slag is")
+deltau = cv*deltaT
+//Answer varies slightly because of round-off error