Using differential equation mixing problem for measuring combustion gasses I'm trying to measure the concentration of carbon monoxide as the result of combustion as a factor of time in an enclosed space, with a relief valve (e.g., without incoming flow, no gas will flow out). I was thinking of basing the equation on a mixing problem, but I have no idea how to set it up.
The tank would have a volume of $V$ cubic feet completely filled with pure "clean air", and combustion byproducts would flow in at a rate of $r$ cubic feet/minute. The clean air and the byproduct gasses have no components in common, and due to finite amounts of fuel, only $F$ cubic feet of gasses will be produced, after which all flow will stop.
I'm running into a problem when I try to set up the incoming concentration of the flow, because I have $C'(t) = r - \frac{rC(t)}{V}$, which ends up as $C(t) + C'(t) = V$, if I'm doing my math correctly. But looking at this, it seems that the flow rate has no bearing on the concentration over time, which I logically know not to be true. 
Can someone please explain where I'm going wrong?
 A: Based on your description of the problem, I believe that your ODE for the combustion byproducts volume $C(t)$ is correct -- assuming that the gases don't cool off, which will have an effect on the density. So, we have
\begin{equation}
C'(t) = r - \frac{r}{V} C(t).
\end{equation}
This is not equivalent with $C' + C = V$, since
\begin{equation}
 C' + C = r + C - \frac{r}{V} C = r + (1-\frac{r}{V}) C
\end{equation}
which is only equal to $V$ if and only if $r = V$, i.e. if the inflow would fill the volume in exactly one minute.
The solution to your ODE, with initial condition $C(0) = 0$ is given by
\begin{equation}
C(t) = V \left(1-e^{-\frac{r}{V} t}\right).
\end{equation}
As you can see in the plot, the combustion byproducts volume initially increases linearly, and converges to $V$ as $t$ goes to infinity, i.e. it eventually fills the entire chamber.

In your case, this doesn't really happen: the inflow stops after a certain volume $F$ (which I assume is less than $V$) is produced. At an inflow rate or $r$ cubic feet per minute, this simply means that after $t_\text{stop} = \frac{F}{r}$ minutes, the inflow stops. At that point in time, the combustion byproducts volume in the chamber is given by
\begin{equation}
 C(t_\text{stop}) = V\left(1-e^{-\frac{F}{V}}\right).
\end{equation}
The combustion byproducts volume as a function of time would then look something like this:

Finally, assuming constant temperature, full mixing and assuming that the combustion byproducts behave as ideal gases, the concentration of carbon monoxide in the chamber after the exhaust event is given by
\begin{equation}
 [\text{CO}] = \frac{2}{7} \left(1-e^{-\frac{F}{V}}\right).
\end{equation}
