By the end of this chapter, you will be able to:
Mastering these skills will help you solve real-world problems efficiently and make precise calculations essential in many technical fields.
Perform Numerical Methods plays a crucial role in Water Engineering, especially in Kenya where water resource management involves complex calculations that cannot always be solved analytically. Numerical methods provide practical tools for solving equations, estimating values, and making predictions in contexts such as flow rates, reservoir levels, and water quality parameters. This chapter focuses on key numerical techniques including identification of numerical problems, iterative methods for solving nonlinear equations, interpolation for estimating intermediate values, and extrapolation to predict beyond observed data. Mastery of these methods enables engineers to analyze real-world water engineering problems efficiently and accurately.
Numerical methods refer to algorithms used to obtain approximate solutions to mathematical problems that are difficult or impossible to solve analytically. In Water Engineering, many problems such as nonlinear flow equations, sediment transport, and contaminant dispersion require numerical approaches. Kenyan water engineers often apply these methods to simulate water distribution systems, optimize pump operations, and analyze hydrological data where exact formulas are unavailable or too complex.
Numerical methods begin with correctly identifying the type of problem to be solved, which dictates the appropriate method to apply. Problems can be broadly categorized into root-finding, solving linear or nonlinear systems, interpolation, integration, and differential equations. Identification also involves understanding the nature of the function or data, such as continuity, smoothness, or presence of noise, which influences method selection.
Numerical problems in water engineering commonly include:
Key factors for choosing numerical methods include:
Example 1: Identify the numerical problem type for estimating water velocity from the nonlinear equation \(Q = A v\), where \(Q\) is flow rate and \(v\) velocity, given \(Q\) and \(A\).
Example 2: Given rainfall measurements at discrete times, identify the problem type for estimating rainfall at an unmeasured time.
Example 3: Predicting water demand for the next year based on past 5 years of data is an extrapolation problem, as it estimates beyond the known data range.
Iterative methods solve equations by successive approximations, especially useful for nonlinear equations common in water engineering, such as Manning’s equation for open channel flow. These methods start with an initial guess and improve it until a desired accuracy is reached.
Iterative methods update an estimate \(x^{(k)}\) to a better approximation \(x^{(k+1)}\) using a function \(g(x)\):
$$ x^{(k+1)} = g(x^{(k)}) $$
Convergence occurs if the sequence \(x^{(k)}\) approaches the true root \(x^*\).
Example 1: Solve \(x^3 + x - 1 = 0\) using the iteration \(x = 1 - x^3\), starting with \(x^{(0)} = 0\).
Given: \(x^{(0)}=0\)
$$ x^{(1)} = 1 - (0)^3 = 1 $$
$$ x^{(2)} = 1 - (1)^3 = 0 $$
$$ x^{(3)} = 1 - (0)^3 = 1 $$
The sequence oscillates; method does not converge here.
Example 2: Solve \(x^3 + 4x^2 - 10 = 0\) with iteration \(x = \sqrt{\frac{10}{x+4}}\), starting at \(x^{(0)}=1.5\).
Given: \(x^{(0)}=1.5\)
$$ x^{(1)} = \sqrt{\frac{10}{1.5 + 4}} = \sqrt{\frac{10}{5.5}} = \sqrt{1.818} = 1.348 $$
$$ x^{(2)} = \sqrt{\frac{10}{1.348 + 4}} = \sqrt{\frac{10}{5.348}} = \sqrt{1.870} = 1.367 $$
$$ x^{(3)} = \sqrt{\frac{10}{1.367 + 4}} = \sqrt{\frac{10}{5.367}} = \sqrt{1.864} = 1.365 $$
Answer: Root approximately \(1.365\)
Example 3: Use Newton-Raphson to solve \(f(x) = x^2 - 7 = 0\), starting at \(x^{(0)}=2\).
Formula:
$$ x^{(k+1)} = x^{(k)} - \frac{f(x^{(k)})}{f'(x^{(k)})} $$
Given: \(f(x) = x^2 - 7\), \(f'(x) = 2x\)
Step 1:
$$ x^{(1)} = 2 - \frac{2^2 - 7}{2 \times 2} = 2 - \frac{4 - 7}{4} = 2 + \frac{3}{4} = 2.75 $$
Step 2:
$$ x^{(2)} = 2.75 - \frac{2.75^2 - 7}{2 \times 2.75} = 2.75 - \frac{7.5625 - 7}{5.5} = 2.75 - \frac{0.5625}{5.5} = 2.75 - 0.1023 = 2.6477 $$
Step 3:
$$ x^{(3)} = 2.6477 - \frac{2.6477^2 - 7}{2 \times 2.6477} = 2.6477 - \frac{7.012 -7}{5.295} = 2.6477 - \frac{0.012}{5.295} = 2.6477 - 0.0023 = 2.6454 $$
Answer: Root approximately \(2.6454\)
Interpolation estimates values of a function for points within the range of known data. It is widely used in Water Engineering to estimate parameters like rainfall intensity, water table levels, or flow rates between measured points.
For two data points \((x_0, y_0)\) and \((x_1, y_1)\), the interpolated value at \(x\) is:
$$ y = y_0 + \frac{(y_1 - y_0)}{(x_1 - x_0)} (x - x_0) $$
Example 1: Interpolate rainfall at 10:30 am given rainfall at 10:00 am is 12 mm and at 11:00 am is 20 mm.
Given:
\(x_0 = 10\), \(y_0 = 12\) mm
\(x_1 = 11\), \(y_1 = 20\) mm
\(x = 10.5\) (10:30 am)
$$ y = 12 + \frac{20 - 12}{11 - 10} (10.5 - 10) = 12 + 8 \times 0.5 = 12 + 4 = 16 \text{ mm} $$
Answer: 16 mm rainfall at 10:30 am
Example 2: Given water levels at 2 m at 8 am and 3.5 m at 10 am, estimate water level at 9 am.
Given:
\(x_0 = 8\), \(y_0 = 2\) m
\(x_1 = 10\), \(y_1 = 3.5\) m
\(x = 9\)
$$ y = 2 + \frac{3.5 - 2}{10 - 8} (9 - 8) = 2 + 0.75 \times 1 = 2 + 0.75 = 2.75 \text{ m} $$
Answer: 2.75 m water level at 9 am
Example 3: Interpolate flow rate at 3.5 hours given flow rates 15 m³/s at 3 hours and 25 m³/s at 4 hours.
Given:
\(x_0 = 3\), \(y_0 = 15\) m³/s
\(x_1 = 4\), \(y_1 = 25\) m³/s
\(x = 3.5\)
$$ y = 15 + \frac{25 - 15}{4 - 3} (3.5 - 3) = 15 + 10 \times 0.5 = 15 + 5 = 20 \text{ m}^3/\text{s} $$
Answer: 20 m³/s flow rate at 3.5 hours
Extrapolation estimates values outside the known data range, important in Water Engineering for predicting future water demand or reservoir levels. It carries more uncertainty than interpolation but provides useful forecasts.
Using two data points \((x_0, y_0)\), \((x_1, y_1)\), estimate \(y\) at \(x\) outside the range:
$$ y = y_1 + \frac{(y_1 - y_0)}{(x_1 - x_0)} (x - x_1) $$
Example 1: Predict rainfall at 12 pm given 10 mm at 10 am and 15 mm at 11 am.
Given:
\(x_0 = 10\), \(y_0 = 10\) mm
\(x_1 = 11\), \(y_1 = 15\) mm
\(x = 12\)
$$ y = 15 + \frac{15 - 10}{11 - 10} (12 - 11) = 15 + 5 \times 1 = 20 \text{ mm} $$
Answer: 20 mm rainfall at 12 pm
Example 2: Estimate water demand for year 6 given year 4 demand 1200 m³/day and year 5 demand 1300 m³/day.
Given:
\(x_0 = 4\), \(y_0 = 1200\) m³/day
\(x_1 = 5\), \(y_1 = 1300\) m³/day
\(x = 6\)
$$ y = 1300 + \frac{1300 - 1200}{5 - 4} (6 - 5) = 1300 + 100 \times 1 = 1400 \text{ m}^3/\text{day} $$
Answer: 1400 m³/day demand in year 6
Example 3: Predict reservoir level at hour 13 given 50 m at hour 11 and 55 m at hour 12.
Given:
\(x_0 = 11\), \(y_0 = 50\) m
\(x_1 = 12\), \(y_1 = 55\) m
\(x = 13\)
$$ y = 55 + \frac{55 - 50}{12 - 11} (13 - 12) = 55 + 5 \times 1 = 60 \text{ m} $$
Answer: 60 m reservoir level at hour 13
Identify the numerical method type required to solve the nonlinear equation \(Q = A v + B v^2\) for velocity \(v\) given \(Q, A, B\). (5 marks)
Use the iterative method \(x^{(k+1)} = \frac{1}{2}(x^{(k)} + \frac{10}{x^{(k)}})\) to approximate \(\sqrt{10}\) starting with \(x^{(0)}=3\). Perform 4 iterations and give the final approximation. (10 marks)
Given flow rates of 30 m³/s at 2 hours and 45 m³/s at 4 hours, interpolate the flow rate at 3 hours. (5 marks)
Extrapolate the water demand for year 8 given demands of 1500 m³/day at year 6 and 1600 m³/day at year 7. (5 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter covered numerical methods with a focus on their identification and application in solving engineering problems. Iterative methods were explored as an essential approach for approximating solutions through repeated calculations. The chapter included practical exercises on interpolation, demonstrating how to estimate values within a data range. Extrapolation techniques were also discussed to predict values beyond known data points. The concept of finding roots of polynomials was examined, emphasizing methods to determine polynomial solutions numerically. Further detail was given to interpolation and extrapolation, highlighting their importance in data analysis and engineering computations. Throughout the chapter, numerical methods were presented as vital tools for addressing complex problems that are difficult to solve analytically.
A water tank’s outflow rate \(Q\) (m³/s) varies with time \(t\) (seconds) according to the polynomial \(Q(t) = 0.05t^3 - 0.4t^2 + 1.2t\). Use the Newton-Raphson method to find the time \(t\) when the outflow rate is exactly 1.0 m³/s, starting with an initial guess \(t_0 = 2\) s. (3 marks)
Given water pressure data at depths 0 m, 5 m, and 10 m as 101 kPa, 150 kPa, and 200 kPa respectively, use Lagrange interpolation to estimate the pressure at 7 m depth. (3 marks)
A water treatment plant requires solving the nonlinear equation \(f(x) = x^3 - 5x + 3 = 0\) to determine the optimal chemical dosage. Use the bisection method to find the root between \(x=0\) and \(x=2\) after two iterations. (4 marks)
Using the Newton-Raphson method, estimate the root of the equation \(f(x) = x^2 - 7 = 0\) starting from an initial guess of \(x_0 = 3\). Perform two iterations. (4 marks)
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
So, are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.