summaryrefslogtreecommitdiff
path: root/3433/CH10/EX10.8/Ex10_8.sce
blob: 13faeb6795409b48f767eb992c7912bd4e7504cb (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
clear;
clc;
funcprot(0);

//given data
X = 10583;//in N
D = 30;//rotor diameter in m
Cx = X/23856;
rho = 1.2;//density in kg/m^3
cx1 = 7.5;//in m/s

//sloving quadratic eqaution
a = 0;//inital guess
res = 1;
i = 0;
while (res~=0)
    res = a*(1-a) - Cx/4;
    if (res>0) then
        a = a-0.001;
    elseif (res<0)
        a = a+0.001;
    end
    if abs(res)<0.0001
        break;
    end    
end
A2 = 0.25*%pi*D^2
P = 2*rho*A2*(cx1^3)*a*(1-a)^2;

//Results
printf('P = %.3f kW.',P/1000);

//there is small error in the answer given in textbook