summaryrefslogtreecommitdiff
path: root/1187/CH12/EX12.4/4.sce
blob: f28b8a37ff6eae8f65f39532e7a033b9be5ce723 (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
32
33
34
35
36
37
38
39
40
41
clc

disp("(b) Estimate the height of tank required")

f=0.006;
l=1400; // m
g=9.81; // m/s^2
d1=0.75; // m
d2=3; // m
Q=1.2; // m^3/s
a=20; // m

K=4*f*l/(2*g*d1);

// 2*K*Y = l*a/(g*A) = 8.919 s^2

// Y=2*K*Y/2*K

Y=8.919/(2*K);
// When t=0

u0=Q/(%pi/4*d1^2);

y0=K*u0^2;

C=-Y/K/exp(y0/Y);

// To determine the height of the surge tank, we consider the condition y = y_max when u = 0. 

// 0 = 1/K*(y_max+Y) + C*exp(y_max/Y)

// From the above eqn we get

y_max=-Y;

H=a-y_max;
disp("The minimum height of the surge tank =")
disp(H)
disp("m")

disp("The actual design height should exceed the minimum required, say 23 m")