You are on page 1of 25

College of Engineering and Architecture

Civil Engineering Department


Brgy. Bajumpandan, Dumaguete City

ENM 331 – NUMERICAL METHODS AND ANALYSIS


MWF 5:30 PM - 7:30 PM

NUMERICAL METHODS AND ANALYSIS

CASE STUDIES

Veegay T. Kibete
BSCE III

Engr. Irismay T. Jumawan, Ph.D.


Instructor

January 2024
TABLE OF CONTENTS

I. CASE STUDY 1: LINEAR SYSTEMS OF EQUATION

a. TRUSS -------------------------------------------------------------------------------------- 2

b. CONTRACTOR --------------------------------------------------------------------------- 6

II. CASE STUDY 2: CHANNEL FLOW ------------------------------------------------------------ 8

III. CASE STUDY 3: CHANNEL FLOW

a. TRAPEZOIDAL SECTION --------------------------------------------------------------- 10

IV. CASE STUDY 4: PRESSURE DROP OF A SECTION OF PIPE ----------------------- 12

V. CASE STUDY 5: DEFLECTION OF BEAMS ------------------------------------------------ 15

VI. CASE STUDY 6: CURVE FITTING

a. POLYNOMIAL REGRESSION ---------------------------------------------------------18

VII.CASE STUDY 7: CHANNEL FLOW


a. LEAST SQUARE FITTING ---------------------------------------------------------------- 21

1|Page
I. CASE STUDY 1: LINEAR SYSTEMS OF EQUATION (TRUSS)

2|Page
 NODE A:  NODE D:

3|Page
 NODE B:  NODE E:

 NODE C:  NODE F:

 NODE G:  NODE F:
4|Page
 Plot the unknows from the equation into the matrix.

 Proceed to an upper triangular matrix and eliminate using gaussian


elimination

5|Page
CD= 4000 lbs.
(COMPRESSION)
DG= 3000 lbs.
(COMPRESSION)
ASSIGNMENT: CONTRACTORGF= 6061.972 lbs.

(TENSION)

6|Page
Three contractors have a total money of 47 million pesos. Contractor 2 has half the amount of money
that of Contractor 1 and Contractor 3 has 3 million pesos more than that of Contractor 2. How much
money do these contractors each have?
SOLUTION: USING CRAMER’S RULE

x x
Contractor 1(x): x Contractor 2(y): Contractor 3(z): +3 M
2 2

Equation 1: x + y + z=47 M → x + y + z=47 M

Equation 2: y=0.5 x → 0.5 x− y =0

Equation 3: z=0.5 x +3 M → 0.5 x−z=−3 M

Rearrange the equations into Matrix Form:


1 1 1 47M
0.5 -1 0 0
0.5 0 -1 -3M

Solve for the Determinant, and then the values of x1, x2 and x3:

1 1 1

D= 0.5 -1 0

0.5 0 -1

47M 1 1

Dx1= 0 -1 0

-3M 0 -1

7|Page
1 47M 1

Dx2= 0.5 0 0

0.5 -3M -1

1 1 47M

Dx3= 0.5 -1 0

0.5 0 -3M

ANSWERS:
x 1 44,000,000
= =22,000,000 Pesos
D 2
x 2 22,000,000
= =11,000,000 Pesos
D 2
x 3 28,000,000
= =14,000,000 Pesos
D 2

8|Page
II. CASE STUDY 2: CHANNEL FLOW
Assignment 1: For the sample problem use any methods in solving the velocity.

Continuity Equation:
Q= UAc
wherein:
Ac= BH (cross-sectional Area of a rectangular channel)
U= (1/n) R2/3S1/2 (Manning Equation)
R= Ac/P (Hydraulic Radius)
P= B +/2H (wetted perimeter of a rectangle)
Substituting:

( )[ ]
1 5
3
S 2
( BH )
Q= 2
n
( B+2 H ) 3

( )[ ]
1 5

S2 ( BH ) 3
0= 2
−Q
n 3
( B+2 H )

Substituting the given:


Q= 5 m3/s n= 0.03
B= 20 m S= 0.0002

( )[ ]
1 5

0.0002 2 20 ( H ) 3
f ( H )= 2
−5
0.03 3
( 20+2 H )

[ ]
5
( 20 H ) 3
f ( H )=( 0.47140 ) 2
−5
3
( 20+2 H )
2
3
' 46.31122 H ( 50+3 H )
f ( H )= 5
( 20+2 H ) 3

9|Page
1 st Iteration :
2nd Iteration:

[ ]
5

[ ]
20 ( 0.5 ) 3 5
f ( 0.5 )=( 0.47141 ) 2
−5 20 ( 0.726114 ) 3
f ( 0.726114 )=( 0.47141 ) −5
( 20+2 ( 0.5 ) ) 3 2

( 20+2 ( 0.726114 ) ) 3

f ( 0.5 )=−2.12537
f ( 0.726114 )=0.278014

'
f ( 0.5 )=46.31122¿ ¿ '
f ( 0.726114 )=46.31122¿ ¿
'
f ( 0.5)=9.39957
f ' ( 0.726114 )=11.7867

Using Newton-Raphson Method:

I XO F(XO) F'(XO)
1 0.5 -2.12537 9.39957
2 0.726114 0.218014 11.7867
3 0.702527 0.002704 11.55674
4 0.702293 0.269 11.55444
5 0.702293 0 11.55444

Q= UBH; H= 0.702293
5= U[20(0.702293)]
U= 0.35598 m/s

10 | P a g e
III. CHANNEL FLOW (TRAPEZOIDAL SECTION)
Using the same given in the previous situation, but in a trapezoidal section with side slopes of 45°.
Given: 20
I------------------------------------
Q= 5 m/s n= 0.03 ---------- ---I ----------
H√2
- H -H H√2
B= 20 m S= 0.0002 45ᵒ 45ᵒ
I---------I-------------------
H I---------I
20-2H H
Continuity Equation:
Q= UAc
where:

1 (3 )
2 1
U = R S2
n
Ac
R=
P

Ac=
[ B 1+B 2
2
H
] > cross-sectional area of a trapezoid

P=B+2 H √ 2 > wetted perimeter of a trapezoid section


B1=20

B2= 20+2H
Substituting to the Equation:

[ ]
2
( B 1+B 2 ) 3 1
(H ) ( B 1+B 2 )
Q=
1
n () 2
B+ 2 H √ 2
S2 [
2
(H )]

Using the given:

[ ]
2
( 20+20−2 H ) 3
(H)
[ ]
1
5=¿) 2 ( 20+ 20−2 H )
( 0.0002 ) 2 (H)
20+2 H √2 2

[ ]
2
( 20−H ) ( H ) 3
f ( H )=( 0.471405 ) ( 20−H )−5
20+2 H √ 2

11 | P a g e
( 31427 √3 50 ( H−20 ) ( 7071 H 2+70000 H −400000 ) )

(√ 7071
'
f ( H )=¿
H +50000 )
3 −H ( H−20 ) 2
800 ( 7071 H +50000 )

1st Iteration:

[ ]
2
( 20−( 0.5 ) ) ( 0.5 ) 3
f ( 0.5 )=( 0.471405 ) ( 20−( 0.5 ) )−5
20+2 ( 0.5 ) √ 2

f(0.5) = 0.44040

(31427 √3 50 ((0.5)−20 ) ( 7071(0.5)2 +70000(0.5)−400000 ) )

√(
'
f ( 0.5 )=¿
800
3 −(0.5) ( (0.5)−20 )
7071(0.5)+50000 )
( 7071( 0.5)+50000 )
2

f’(0.5)= 6.30982
2nd Iteration:

[ ]
2
( 20− ( 0.4302 ) ) ( 0.4302 ) 3
f ( 0.4302 )=( 0.471405 ) ( 20−( 0.4302 ) )−5
20+ 2 ( 0.4302 ) √ 2

f(0.4302)= -0.01844

( 31427 √3 50 ( ( 0.4302 )−20 ) ( 7071 ( 0.4302 )2 +70000 ( 0.4302 ) −400000 ) )

√( )
'
f ( 0.4302 )=¿ 3 −( 0.4302 ) ( ( 0.4302 )−20 ) 2
800 ( 7071 ( 0.4302 )+ 50000 )
7071 ( 0.4302 ) +50000

f’(0.4302)= 6.85278

Using Newton-Raphson Method:

I xo f(xo) f'(xo)
1 0.5 0.44040 6.30982
2 0.43020 -0.01844 6.85278
3 0. 43289 -0.00003 6.83005
4 0.43289 -0.00004 6.83005
5 0. 43290 0 6.822996

12 | P a g e
H= 0.4329

[ ]
1
5
U= 20+20−2 ( 0.4329 )
( 0.4329 )
2

U= 0.59028 m/s
IV. CASE STUDY 4: PRESSURE DROP OF A SECTION OF PIPE

13 | P a g e
Solution:
a. Insert the given parameter values into the first equation to obtain
0.2 ×1.23 ×1600
∆ p=f • =39.36 f
2 ×0.005
Determine Re by inserting the parameter values into the third given equation.
1.23 × 40 ×0.005
ℜ= −5
=13743.02
1.79 ×10
Now rewrite the second equation as follows.

( )
1 2.51
6
=−2.0 log ⁡( 1.5 ×10 +¿ )
√f 3.7 ×0.005 13743.02• √ f

( √f )
1
=−2.0 log ⁡((8.10811+ ¿
18.26382
√f
) • 10 ¿ −5

( √1f )−23.02585+2.0 log ⁡(8.10811+ ¿ 18.26382


√f
) ¿0

It remains to solve (2) for f. To simplify the problem, solve the equation for x=√f and then
determine f as f= (√f ¿2 = x 2 .

f ( x )= ( 1x )−23.02585+2.0 log ⁡(8.10811+ ¿ 18.26382


x
)

( ) ( )
1 1
f ' ( x )= + 2• •¿
x
2
18.26382 )
8.10811+
x

X0 = √f0 = √ ( 0.136
ℜ )
0.25
=0.170838

Now Newton's method can be used to determine the root of f.


f (x 0) −7.68222
x i=x 0− =0.170838− =0.00067
f ' (x 0) −45.1451

14 | P a g e
0.102679−0.170838
ε a= =−253.649
0.102679

Now, solve the substitution formula x=√ f for f

2 2
f ≈ x 4 =0.082307 =0.0067744

Substitute f to the 1st Equation:

0.2 ⋅1.23⋅ 1600


Δ p=0.0067744 ⋅ =39.36 ⋅0.0067744=0.266642 Pa
2 ⋅0.005
Δ p=0.266642 Pa

b. Repeat the computation but for a rougher commercial steel pipe (ε=0.045~mm)
0.2⋅1.23 ⋅1600
1 st Equation: Δp=f ⋅ =39.36 ⋅ f
2⋅ 0.005
Determine ℜ by inserting the parameter values into the third given equation.

1.23 ⋅ 40 ⋅0.005
ℜ= −5
=13743.02
1.79 ⋅10
Now, you can rewrite the second equation as follows:

1 4.5 ⋅10−5 2.51


=−2 log( + )
√f 3.7 ⋅0.005 13743.02⋅ √ f
1
⇔ =−2 log ¿ )
√f
1 18.26382
⇔ =−23.02585+2 log (243.243+ )=0
√f √f
Use the same substitution formula as in (a) and determine the derivative of the modified function f(x) as follows. Note that
the initial guess remains the same.

1 18.26382
f (x)= −23.02585+2 log (243.24324 + )
x x

15 | P a g e
−1 1 −18.26382
f ' (x)= +2 ⋅ ⋅( )
x
2
18.26382 x
2
243.24324 +
x

x 0=√ fo=
√ 0.316
R e 0.25
=0.170838

V. CASE STUDY 5: DEFLECTION OF BEAMS

Solution:

First determine the derivative of y and insert the given parameter values into the equation to obtain:

16 | P a g e
Note that

where

Since , preform iterations of the bisection method to obtain the following


results.

Iteration xL f(xL) xU f(xU) xr f(xR)


1 0.00000 -0.00089 450.00000 0.00000 225.00000 0.00017
2 0.00000 -0.00089 225.00000 0.00017 112.50000 -0.00057
3 112.50000 -0.00057 225.00000 0.00017 168.75000 -0.00023
4 168.75000 -0.00023 225.00000 0.00017 196.87500 -0.00003
5 196.87500 -0.00003 225.00000 0.00017 210.93750 0.00007
6 196.87500 -0.00003 210.93750 0.00007 203.90625 0.00002
7 196.87500 -0.00003 203.90625 0.00002 200.39063 -0.00001
8 200.39063 -0.00001 203.90625 0.00002 202.14844 0.00001
9 200.39063 -0.00001 202.14844 0.00001 201.26953 0.00000
10 200.39063 -0.00001 201.26953 0.00000 200.83008 0.00000
11 200.83008 0.00000 201.26953 0.00000 201.04980 0.00000
12 201.04980 0.00000 201.26953 0.00000 201.15967 0.00000
13 201.15967 0.00000 201.26953 0.00000 201.21460 0.00000
14 201.21460 0.00000 201.26953 0.00000 201.24207 0.00000
15 201.24207 0.00000 201.26953 0.00000 201.25580 0.00000
16 201.24207 0.00000 201.25580 0.00000 201.24893 0.00000
17 201.24207 0.00000 201.24893 0.00000 201.24550 0.00000
18 201.24550 0.00000 201.24893 0.00000 201.24722 0.00000
19 201.24550 0.00000 201.24722 0.00000 201.24636 0.00000
20 201.24550 0.00000 201.24636 0.00000 201.24593 0.00000
21 201.24593 0.00000 201.24636 0.00000 201.24614 0.00000
22 201.24593 0.00000 201.24614 0.00000 201.24604 0.00000
23 201.24604 0.00000 201.24614 0.00000 201.24609 0.00000
24 201.24609 0.00000 201.24614 0.00000 201.24612 0.00000
25 201.24612 0.00000 201.24614 0.00000 201.24613 0.00000

17 | P a g e
26 201.24612 0.00000 201.24613 0.00000 201.24612 0.00000
27 201.24612 0.00000 201.24612 0.00000 201.24612 0.00000
28 201.24612 0.00000 201.24612 0.00000 201.24612 0.00000
29 201.24612 0.00000 201.24612 0.00000 201.24612 0.00000

Insert the approximation into the initial equation to obtain:

CASE STUDY 6: CURVE FITTING (POLYNOMIAL REGRESSION)

18 | P a g e
Solution:

 LEAST-SQUARE REGRESSION (POLYNOMIAL)


x y
Depth Stress x² x³ x⁴ x⁵ x⁶
(m) (kPa)
1.9 14.4 3.61 6.86 13.03 24.76 47.05
3.1 28.7 9.61 29.79 92.35 286.29 887.50
4.2 19.2 17.64 74.09 311.17 1,306.91 5,489.03
5.1 43.1 26.01 132.65 676.52 3,450.25 17,596.29
5.8 33.5 33.64 195.11 1,131.65 6,563.57 38,068.69
6.9 52.7 47.61 328.51 2,266.71 15,640.31 107,918.16
8.1 71.8 65.61 531.44 4,304.67 34,867.84 282,429.54
9.3 62.2 86.49 804.36 7,480.52 69,568.84 646,990.18
10 76.6 100 1,000.00 10,000.00 100,000.00 1,000,000.00
∑x=54.4 ∑y=402.2 ∑ x²=390.22 ∑x3=3,102.8 ∑x4=26,276.6 ∑x5=231,708.7 ∑x6=2,099,426.4
1 3 8 4
N=9
x⁷ x⁸ xy x²y x³y x⁴y
89.39 169.84 27.36 51.98 98.77 187.66
2,751.26 8,528.91 88.97 275.81 855.00 2,650.51
23,053.93 96,826.52 80.64 338.69 1,422.49 5,974.46
89,741.07 457,679.45 219.81 1,121.03 5,717.26 29,158.02
220,798.42 1,280,630.82 194.30 1,126.94 6,536.25 37,910.26
744,635.33 5,137,983.74 363.63 2,509.05 17,312.42 119,455.73
2,287,679.25 18,530,201.89 581.58 4,710.80 38,157.46 309,075.46
6,017,008.71 55,958,180.97 578.46 5,379.68 50,031.01 465,288.35
10,000,000.00 100,000,000.00 766.00 7,660.00 76,600.00 766,000.00
∑x7=19,385,757. ∑x8=181,470,202. ∑xy=2,900.7 2
∑x y=23,173.9 ∑x3y=196,730. ∑x4y=1,735,700.
34 13 5 7 66 44

19 | P a g e
9a₀ + 54.4a₁ + 390.22a₂ + 3102.81a₄ + 26,276.63 = 402.2

54.4a₀ + 390.22a₁ + 3102.81a₂ + 26276.63a₄ + 231708.78a₄ = 2,900.75

390.22a₀ + 3102.81a₁ + 26276.63a₂ + 231708.78a₄ + 2099426.44a₄ = 23,173.97

3102.81a₀ + 26276.63a₁ + 231708.78a₂ + 2099426.44a₄ + 19385757.34a₄ = 196,730.66

26276.63a₀ + 231708.78a₁ + 2099426.44a₂ + 19385757.34a₄ + 181470202.13a₄ = 1,735,700.44

 Using Gaussian Elimination with pivoting to determine the value of a, a1, a2, a3 and a4.

9 54.4 390.22 3,102.81 26,276.63 a₀ 402.2


54.4 390.22 3,102.81 26,276.63 231,708.78 a₁ 2,900.75
390.22 3,102.81 26,276.63 231,708.78 2,099,426.44 a₂ 23,173.97
3,102.81 26,276.63 231,708.78 2,099,426.44 19,385,757.34 a₃ 196,730.66
26,276.63 231,708.78 2,099,426.44 19,385,757.34 181,470,202.13 a₄ 1,735,700.44

20 | P a g e
m 9 54.4 390.22 3,102.81 26,276.63 a₀ 402.2
61.4022222
6.044444444 0 2 744.14 7,521.88 72,881.16 a₁ 469.67
43.35777778 0 744.14 9,357.56 97,177.92 960,130.26 a₂ 5,735.47
344.7564444 0 7,521.88 97,177.92 1,029,713.39 10,326,720.57 a₃ 58,069.62
960,130.2 10,326,720.5
2919.625311 0 72,881.16 6 7 104,752,294.51 a₄ 561,427.14

m 9 54.4 390.22 3,102.81 26,276.63 a₀ 402.2


61.4022222
0 2 744.14 7,521.88 72,881.16 a₁ 469.67
12.11918497 0 0 339.13 6,018.90 76,869.97 a₂ 43.40
122.50171 0 0 6,018.90 108,270.57 1,398,653.53 a₃ 533.70
1186.946659 0 0 76,869.97 1,398,653.53 18,246,242.17 a₄ 3,948.62

m 9 54.4 390.22 3,102.81 26,276.63 a₀ 402.2


0 61.40222222 744.14 7,521.88 72,881.16 a₁ 469.67
0 0 339.13 6,018.90 76,869.97 a₂ 43.40
17.74825503 0 0 0 1,445.63 34,345.77 a₃ -236.63
226.6706793 0 0 0 34,345.77 822,074.72 a₄ -5,889.63

m 9 54.4 390.22 3,102.81 26,276.63 a₀ 402.2


61.4022222
0 2 744.14 7,521.88 72,881.16 a₁ 469.67
0 0 339.13 6,018.90 76,869.97 a₂ 43.40
 1,445.6
0 0 0 3 34,345.77 a₃ -236.63
23.75839606 0 0 0 0 6,074.31 a₄ -267.61

6074.31 a₄ = -267.61
a₄ = -0.04406
1,445.63 a₃ + 34,345.77 a₄ = - 236.63
a₃ = 0.88302
339.13 a₂ + 6,018.90 a₃ + 76,869.97 a₄ = 43.40 a₂ = -5.55779
61.4022 a₁ + 744.14 a₂ + 7,521.88 a₃ + 72,881.16 a₄ = 469.67 a₁ = 19.12614
9 a₀ + 54.4 a₁ + 390.22 a₂ + 3,102.81 a₃ + 26,276.63 a₄ = 402.2 a₀ = -5.74328

y= -5.74328 + 19.12614x - 5.55779x2 + 0.88302x3 - 0.04406x4

21 | P a g e
 x= 4.5 m
y= -5.74328 + 19.12614(4.5) - 5.55779(4.5)2 + 0.88302(4.5)3 - 0.04406(4.5)4
y= 41.43193 kpa (Shear at the depth of 4.5 m)
CASE STUDY 7: CHANNEL FLOW (LEAST SQUARE FITTING)

Solution:
a.
Distance (m) x Lane Width (m)
X Y 3.5
DISTANC LANE WIDTH
E (m) (m) 3
2.4 2.9
1.5 2.1 2.5
2.4 2.3
2
1.8 2.1
1.8 1.8 1.5
2.9 2.7
1.2 1.5 1

0.5
22 | P a g e
0
1 1.5 2 2.5 3 3.5
3 2.9
1.2 1.5

x y
Distance (m) Lane Width (m) xy x²
2.4 2.9 6.96 5.76
1.5 2.1 3.15 2.25
2.4 2.3 5.52 5.76
1.8 2.1 3.78 3.24
1.8 1.8 3.24 3.24
2.9 2.7 7.83 8.41
1.2 1.5 1.8 1.44
3 2.9 8.7 9
1.2 1.5 1.8 1.44
2
∑x= 18.2 ∑y= 19.8 ∑xy= 42.78 ∑x = 40.54
b. LEAST-SQUARE REGRESSION (LINEAR)

N= 9

x̄ = 2.02222 y= 0.71672 + 0.73349x


ȳ= 2.2
Distance (x) 2.4 1.5 2.4 1.8 1.8 2.9 1.2 3 1.2
Lane Width (y) 2.477 1.817 2.477 2.037 2.037 2.844 1.597 2.917 1.597

23 | P a g e
Distance (m) x Lane Width (m)
3.5

9 ( 42.78 )− (18.2 )( 19.8 ) 2.5


a 1=
9(40.54 )−¿ ¿
a1= 0.73349 2

1.5

a0= y−a1 x
1
a0= 2.2−90.73349 ¿(2.02222)
a0= 0.71672 0.5

0
y= a0 + a1x 1 1.5 2 2.5 3 3.5
y= 0.71672 + 0.73349x

c. x= 2m
y= 0.71672 + 0.73349x = 0.71672 + 0.73349(2) = 2.19370 m (corresponding minimum lane width)

24 | P a g e

You might also like