You are on page 1of 28

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

MICHAEL C. CALONGCONG
BSCE III

Engr / EnP. Irismay T. Jumawan, Ph.D


Instructor

January 15, 2024


TABLE OF CONTENTS

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

II. CASE STUDY 2: CHANNEL FLOW

III.CASE STUDY 3: CHANNEL FLOW (TRAPEZOIDAL SECTION)

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

V. CASE STUDY 5: DEFLECTION OF BEAMS

VI. CASE STUDY 6: CURVE FITTING (POLYNOMIAL REGRESSION)

VII.CASE STUDY 7: CHANNEL FLOW (LEAST SQUARE FITTING)


I. CASE STUDY 1: LINEAR SYSTEMS OF EQUATION
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

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

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


Equation 2: y=0.5x 0.5x-y=0
Equation 3: z=0.5x + 3M 0.5x-z=-3M

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
0 -1 0
Dx1=
-3M 0 -1

1 47M 1
0.5 0 0
Dx2=
0.5 -3M -1
1 1 47M
0.5 -1 0
Dx3=
0.5 0 -3M

ANSWERS:
x1/D=44,000,000/2=22,000,000 Pesos
x2/D=22,000,000/2=11,000,000 Pesos
x3/D=28,000,000/2=14,000,000 Pesos
II. CASE STUDY 1: LINEAR SYSTEMS OF EQUATION (TRUSS)

2000lb

A 30 60 TRUSS FREE BODY DIAGRAM


C
1000lb 3000lb

B D

Ha A E
H G F

Va Ve
MEMBER FORCES (lb) NATURE

4000 COMPRESSION
CD

GF 6061.971 TENSION

DG 3000 COMPRESSION
III. CASE STUDY 3: CHANNEL FLOW
Assignment 1: For the sample problem use any methods in solving the velocity

Continuity Equation: Q=UAc

Where: 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)

( )[ ] ( )[ ]
1 5 1 5

S2 ( BH ) 3 S2 ( BH ) 3
Substituting: Q= 2
0= 2
−Q
n 3
n 3
( B+2 H ) ( 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.471405 ) 2
−5
3
( 20+2 H )
2
3
' 46.31122316 H ( 50+ 3 H )
f ( H )= 5
( 20+2 H ) 3
Solve using Newton-Raphson Method:

2nd Iteration:
1 st Iteration :

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

( 20+2 ( 0.5 )) 3 ( 20+2 ( 0.726114 ) ) 3

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

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

i Xo f(Xo) f'(Xo)

1 0.5 -2.12537 9.39957

2 0.726114 0.278014 11.7867

3 0.702527 0.002704 11.55674

4 0.702293 2.69E-07 11.55444

5 0.702293 0 11.55444

Q= UBH; H= 0.702293
5= U[20(0.702293)]
U= 0.356 m/s
IV. CHANNEL FLOW (TRAPEZOIDAL SECTION)
Using the same given, but in a trapezoidal section with side slopes of 45°.
Given:
Q= 5 m/s n= 0.03
B= 20 m S= 0.0002

Continuity Equation:
Q= UAc
where:

1 ( )
2 1

U = R 3 S2 P=B+2 H √ 2 > wetted perimeter of a


n trapezoid section

Ac B1=20
R=
P
B2= 20+2H

Ac=
[ B 1+B 2
2 ]
H > cross-sectional

area of a trapezoid

Substituting to the Equation:

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

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
( 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.440397555

(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.30982491
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.018407993
'
f ( 0.4302 )=¿
( 31427 √3 50 ( ( 0.4302 )−20 ) ( 7071 ( 0.4302 )2 +70000 ( 0.4302 ) −400000 ) )
800
√(
3 −( 0.4302 ) ( ( 0.4302 )−20 )
7071 ( 0.4302 ) +50000 )
( 7071 ( 0.4302 )+ 50000 )
2

f’(0.4302)= 6.85273995

Using Newton-Raphson Method:

i Xo f(Xo) f'(Xo)

1 0.5 0.440397555 6.30982491

2 0.430204473 -0.018407993 6.85273995

3 0.432890697 -3.05236E-05 8.83004077


4 0.432895166 -8.40839E-11 6.83000314

5 0.432895166 0 6.83000314

H= 0.4329

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

U= 0.5903 m/s
V. CASE STUDY 5:
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

( √1f )=−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
)

f ' ( x )=
( x1 )+ 2• ( 8.10811+118.26382 )• ¿
2
)
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

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

LET’S SOLVE FOR (b): Insert the given parameter values into the first equation to obtain:
(ε=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
−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

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


2 2
f ≈ x 7=0.0921979 =0.0085
Substitute f to the 1st Equation:
VI. CASE STUDY 6: DEFLECTION OF BEAMS
0.2⋅1.23 ⋅1600
Δ p=0.0085 ⋅ =39.36 ⋅ 0.0085=0.334578 Pa
2 ⋅0.005
Δ p ¿ 0.334578 Pa
Solution:

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

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
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:


VII. CASE STUDY 7: CURVE FITTING (POLYNOMIAL REGRESSION)

a.) Fit a fourth degree polynomials of prob. 20.19

Solution:

4th degree polynomial:


a0 + a1x + a2x^2 + a3x^3 + a4x^4
LEAST-SQUARE REGRESSION (POLYNOMIAL)
DEPTH=X
STRESS=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
3 4 5
∑x=54.4 ∑y=402. ∑ x²=390.22 ∑x =3,102.81 ∑x =26,276.63 ∑x =231,708.78 ∑x6=2,099,426.44
2

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.34 8
∑x =181,470,202.13 ∑xy=2,900.75 2
∑x y=23,173.97 3
∑x y=196,730.66 4
∑x y=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

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


6.044444444 0 61.40222222 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
2919.625311 0 72,881.16 960,130.26 10,326,720.57 104,752,294.51 a₄ 561,427.14

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
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


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
0 0 0 1,445.63 34,345.77 a₃ -236.63
23.75839606 0 0 0 0 6,074.31 a₄ -267.61

BACK SUBSTITUTION:

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


When 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)

VIII. CASE STUDY 8: CHANNEL FLOW (LEAST SQUARE FITTING)


Solution:
a.

X Y
Distance (m) x Lane Width (m)
DISTANC LANE WIDTH
E (m) (m) 3.5
2.4 2.9
1.5 2.1 3

2.4 2.3 2.5


1.8 2.1
1.8 1.8 2
2.9 2.7
1.5
1.2 1.5
3 2.9 1
1.2 1.5
0.5

X Y 0
1 1.5 2 2.5 3 3.5
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
18.2/9=2.0
y= 0.71672 + 0.73349x
x̄ = 2222
ȳ = 19.8/9=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

A1= 𝑛 Σ 𝑥𝑦 − Σ 𝑥 Σ 𝑦
𝑛 Σ 𝑥2 − (Σ 𝑥)2

9 ( 42.78 )− (18.2 )( 19.8 )


a 1=
9(40.54 )−¿ ¿

a1= 0.73349

A0 = Σ 𝑦 (Σ 𝑥2) − Σ 𝑥(Σ 𝑥𝑦)


𝑛 Σ 𝑥2 − (Σ 𝑥)2

40.54 ( 19.8 )−( 18.2 ) ( 42.78 )


a0=
9(40.54)−¿ ¿

a0= 0.71672
Distance (m) x Lane Width (m)
y= a0 + a1x 3.5
y= 0.71672 + 0.73349x
3

2.5

1.5

0.5

0
1 1.5 2 2.5 3 3.5

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

You might also like