summaryrefslogtreecommitdiff
path: root/3564/CH1/EX1.8/Ex1_8.sce
blob: 6dde947db9843c0cc21712a95484a58274737452 (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
30
31

// 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.8 ")

//Using Appendix table A.5 for properties of acetone
//Density in kg/m3
rho = 0.787*1000;
//Speed of sound in m/s
a = 1174;
//Isothermal bulk modulus in N/m2
k = (rho*a)*a;

//Change in volume is given to be -1 percent
//Assuming V = 1 cubic m so that deltaV/V = -0.01

//Initial volume in m3
V = 1;
//Change in volume in m3
deltaV = -0.01;


//Change in pressure in N/m2
disp("Change in pressure in N/m2 is")
deltap = -(k*deltaV)/V
//Answer varies slightly because of round-off error