You are on page 1of 11

3.

Solution to the Problem

3.1

Analytical Problem

Force acting on dam

F1
F2

Force from the pressure distribution

F3

Analytical diagram for each force (assuming breadth = 1)

At

At F1
F1

F1

From the hydrostatic equation, by assuming breath = 1

At F2

F2

From the hydrostatic equation, by assuming breath = 1

At

//

Ty
pe
eq
ua
ti
on
he
re
.

By assuming breadth = 1,

/What is the value of ? Assume b = 1

For equilibrium dam, so that

(1)

and with

23.60kN/

Hence, the following equation can be present in term of

Then, substituted of these expression into equation 1

and

Thus, equation can be simplify into,

(2)

After that, from the given , we can determine the

by using

and the equation (2) will

be uses to determine the unknown . For the dam width, l specified, the angle, and the
maximum water depth, h are computed in the Table 1.

6
9
12
15
18

14.47880782
18.34115245
21.55935479
24.32711611
26.75302999

Table 1: The value for


3.2

and

75.96375653
69.44395478
63.43494882
57.99461679
53.13010235
for each

given

Numerical Method

Numerical method is the way to solve the mathematical problem by reformulated to be solved in
arithmetic operation. From the equation (2), the following term of

is uses in numerical method.

The equation can be approximated into:

The equation has rearranged by solving

using Newton-Raphson Method as follow:

3.2.1

Algorithm

1.

Start

2.

Input the value of dam width, l

3.

Compute the value of theta


theta = atan(24/ )

4.

State the values that known as parameters, starting approximation for root, h, error, eps,
tolerance, tol, maximum number of iteration, total, and first iteration, k

5.

Predefined the function of f and its derivative, f1


f=

(1.635*(h^3))+(3.27*(l^2)*h)-(183.895*(l^2))-(44.145/(sin(theta)^2))

f1 =
6.

(4.905*(h^2)) + (3.27*(l^2))

Calculate for new root value, hnew


hnew = h-f/f1

7.

Compute the absolute error, ea


eps = abs(hnew-h)
ea = eps/hnew

8.

Show the values of the number of iteration, k, maximum height, h and absolute error, ea

9.

Finish

3.2.2 Flowchart
3.2.3 Coding Program
The maximum water height at every dam width can be compute by using Matlab coding as given

below:

%
%
%
%
%
%

Name :
IC Number:
Matric Number:
Year/Course :
Project :
Lecturer :

Muhammad Aliff Irfan Bin Mohd Suhaimi


940803035865
A12KM0249
3rd year/Naval Architecture & Offshore Engineering
1
Dr. Yasser Mohamed Ahmed Abdel Razak

% Date :

17 December 2014

% to find the maximum water height, h (m) by using Newton-Raphson


% equation of function in term of h,f(h) = (1.635*(h^3))+(3.27*(l^2)*h)(183.895*(l^2))-(44.145/(sin(theta)^2))
l = input('Dam Width (m) : ');
theta = atan(24/l); % angle
h = 24; % the value starting approximate to the root
eps = 1;
tol = 10^(-14);
total = 100;
k = 0;
format long;
while ((eps > tol) & (k < total))
f = (1.635*(h^3))+(3.27*(l^2)*h)-(183.895*(l^2))-(44.145/(sin(theta)^2));
f1 = (4.905*(h^2))+(3.27*(l^2)); % First derivation at h = h_k
hnew = h-f/f1; % New approximation value for the root
eps = abs(hnew-h);
h = hnew;
k = k+1;
ea = eps/hnew;
fprintf('k = %2.0f, x = %12.10f, ea = %12.10f\n',k,h,ea);
end

You might also like