I asked this on the Physics site, but it fits much better here, and I now can ask a more specific question.
For the scope of the problem, I have a 250-mL bottle filled with pure water and a sampling line at the bottom slowly draining the bottle to analyze, say 2.5 mL/min. The bottle is on the order of 10 cm high.
Since the bottle is open, a tiny amount of analyte (trace metal) is constantly entering the bottle from the top, at a certain mass flux. I observe that the concentration of this analyte increases over time as expected, but I'm interested in modeling the dynamics, perhaps for different bottle sizes.
First I want to model this with the 1D convection-diffusion equation, but I don't know how to properly apply boundary conditions. If the equation is,
$$\frac{\partial C}{\partial t} = D\frac{\partial^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$
then I choose $v$ as the velocity that the liquid is draining (with the numbers I gave, $0.1$ cm/min).
For the boundary conditions, I'm unsure (for now I'm ignoring that the top face is moving downwards as the bottle drains). I think the top face should be a Robin boundary; since it has a constant flux, I could do
$$vC - D\frac{\partial C}{\partial x} = \phi, \quad x = 0$$
For the bottom face, I'm wondering if the boundary should simply be
$$\frac{\partial C}{\partial x} = 0, \quad x = L$$
since nothing can diffuse out of the bottom of the bottle, but I allow whatever concentration flows out of the system through the sampling tube to pass by. Is this correct?
Edit: I found a coordinate transform to include the effect of the level dropping, essentially mapping $x\in[0,\delta(t)]\to y=x/\delta ,y\in [0,1]$ (now x,y = 0 is the bottom face and y=1 is the top). I adapted the procedure in this paper After this transform, the advection term becomes something like $v(1−y)$; because the top boundary is moving due to the coordinate transform, it effectively sees no velocity in the volume there. Now what should the top boundary condition be?