Solve an ODE: concentrations predicted by the cells-in-series model - MATLAB Cody - MATLAB Central

Problem 54735. Solve an ODE: concentrations predicted by the cells-in-series model

Difficulty:Rate
One approach for predicting mixing and transport of contaminants in a river is the cells-in-series model. The model divides a river into several well-mixed cells of volume V. Then if the discharge (i.e., the volume of water flowing past a cross section per unit time) is Q and the first-order decay coefficient (dimensions of time^{-1}) is k, the concentration C_n in the nth cell is given by
V dC_n/dt = Q C_{n-1} - Q C_n - kVC_n
Write a function to compute the maximum concentration in the nth cell and the time it occurs assuming that the concentration in the first cell (i.e., n = 1) is C_in at time t = 0 and no contaminant enters the first cell from upstream.

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Jun 24, 2022

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
14
6

Problem Recent Solvers3

Suggested Problems

More from this Author290

Community Treasure Hunt

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

Start Hunting!
Go to top of page