summaryrefslogtreecommitdiff
path: root/3564/CH1/EX1.6/Ex1_6.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.6/Ex1_6.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.6/Ex1_6.sce')
-rw-r--r--3564/CH1/EX1.6/Ex1_6.sce37
1 files changed, 37 insertions, 0 deletions
diff --git a/3564/CH1/EX1.6/Ex1_6.sce b/3564/CH1/EX1.6/Ex1_6.sce
new file mode 100644
index 000000000..984185d3e
--- /dev/null
+++ b/3564/CH1/EX1.6/Ex1_6.sce
@@ -0,0 +1,37 @@
+
+// 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.6 ")
+
+//Solving part a
+disp("Part a)")
+//Mass of air in kg
+m = 4;
+//Using Appendix table A.6 for properties of air
+//Specific heat of air in J/Kg.K
+cp = 1005;
+//Representing temperature difference T2 - T1 as deltaT for computation
+//detaT in degree K
+deltaT = 10;
+
+//Heat required in kJ
+disp("Heat required in kJ is")
+Q = ((m*cp)*deltaT)/1000
+
+//Solving part b
+disp("Part b)")
+//Using Appendix table A.6 for properties of air
+funcprot(0);
+//Specific heat ratio gamma for air is
+gamma = 1.4;
+//Specific heat at constant volume of air in J/Kg.K
+cv = cp/gamma;
+//Heat required at constant volume in kJ
+disp("Heat required at constant volume in kJ is")
+Q = ((m*cv)*deltaT)/1000
+//Answer varies slightly because of round-off error