Question: Matlab: The Manning equation can be written for a rectangular open channel as VS(BH)5/3 n(B 2H)2/3 where Q = flow (m/s), s = slope. H-depth
Matlab:

The Manning equation can be written for a rectangular open channel as VS(BH)5/3 n(B 2H)2/3 where Q = flow (m/s), s = slope. H-depth (m), and n = the Manning roughness coefficient. In a single m-file ps 4-3 . m, develop a fixed-point iteration scheme to solve this equation for H given O = 5 m's, s 0.0002, B = 20 m, and n = 0.03. Perform fixed-point iteration to a relative error tolerance of 10-4 Hint: if manipulated in its current form to the root-finding f(x) and then to g (x) = f(x) + x. the conditions for g'(x) will be unsuitable for fixed point iteration. By inverting the expression above, you will be able to develop a more suitable root-finding function f (and, subsequently, the fixed-point iteration function g) that will converge for initial guesses H>0 Note: While this demonstrates one possible strategy for making fixed point iteration work, you must be extremely careful not to create (or eliminate) roots through modification of the original function. In this case, H can only be positive so (B+2H) is not zero for any physical value of H Moreover, H= 0 is not a root of the original expression, so we do not risk eliminating a root when inverting the original expression. This requires extreme caution; plotting the original and new functions is always a good idea to ensure you're not missing anything important. This also emphasizes that fixed point iteration is generally best for functions that already have a specific form (like those discussed in class) The Manning equation can be written for a rectangular open channel as VS(BH)5/3 n(B 2H)2/3 where Q = flow (m/s), s = slope. H-depth (m), and n = the Manning roughness coefficient. In a single m-file ps 4-3 . m, develop a fixed-point iteration scheme to solve this equation for H given O = 5 m's, s 0.0002, B = 20 m, and n = 0.03. Perform fixed-point iteration to a relative error tolerance of 10-4 Hint: if manipulated in its current form to the root-finding f(x) and then to g (x) = f(x) + x. the conditions for g'(x) will be unsuitable for fixed point iteration. By inverting the expression above, you will be able to develop a more suitable root-finding function f (and, subsequently, the fixed-point iteration function g) that will converge for initial guesses H>0 Note: While this demonstrates one possible strategy for making fixed point iteration work, you must be extremely careful not to create (or eliminate) roots through modification of the original function. In this case, H can only be positive so (B+2H) is not zero for any physical value of H Moreover, H= 0 is not a root of the original expression, so we do not risk eliminating a root when inverting the original expression. This requires extreme caution; plotting the original and new functions is always a good idea to ensure you're not missing anything important. This also emphasizes that fixed point iteration is generally best for functions that already have a specific form (like those discussed in class)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
