summaryrefslogtreecommitdiff
path: root/3564/CH1/EX1.7/Ex1_7.sce
blob: 3794091eda4c2615147f86b20f1b45e1ab41c17e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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