Problem 60406. Alert a city about a spill

Problem statement
Cody Problem 54750 involved determining the length of a stream affected by a spill of a contaminant. Any municipalities within that reach would want to know when water from the river would be safe to drink—for example, below the U.S. Environmental Protection Agency’s maximum contaminant level (MCL). As in CP 54750, the spill of mass M will be assumed instantaneous at position x = 0 and time t = 0 and mixed over the cross section (with area A). Then if the flow is steady and the geometry of the flow does not change downstream, the concentration can be computed with
C = (M/(A sqrt(4 pi K t)) exp(-(x-Ut)^2/(4Kt))
where U = Q/A is the mean velocity of the river, Q is the discharge or volumetric flow rate, and K is a dispersion coefficient, which describes spreading by several mechanisms.
Write a function that returns the dates and times (given as datetimes) between which the water is unsafe to drink (i.e., the concentration exceeds the MCL) at position x downstream of the spill. Round the times to the nearest second. If the concentration does not exceed the MCL, return 'The MCL is not exceeded.' Please note that the MCL is given in mg/L, whereas other variables are given in SI units.
Details
Many empirical formulas are available for the dispersion coefficient. For this problem, use the formula of Seo and Cheong (1998):
K = 5.915u*H(B/H)^0.62(U/u*)^1.428
where B is the width of the channel (assumed rectangular here), H is the water depth, and u* is the shear velocity, which is related to the shear stress on the wetted perimeter of the channel. In steady uniform flow, the component of the fluid’s weight down the slope will balance the friction on the channel bed, and the shear velocity can be computed as
u* = sqrt(gRS0)
where g = 9.81 m/s^2 is the gravitational acceleration, S0 is the longitudinal slope of the channel, R = A/P is the hydraulic radius, and P is the wetted perimeter. For a rectangular channel, P = B + 2H.
In addition to assuming steady uniform flow and an unchanging channel, ignore any reaction, decay, or loss of the chemical; this assumption provides a conservative estimate of the time range. In practice, one would include a factor of safety that accounts for uncertainty in the parameters. Nevertheless, the calculations here would form a basis for the advice to the city.

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Jun 01, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers4

Suggested Problems

More from this Author269

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!