2
$\begingroup$

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?

$\endgroup$
5
  • $\begingroup$ The boundary conditions should be applied to the flux $q = vC - DC_x$, not just $C_x$. That is a special case when $v=0$. $\endgroup$
    – whpowell96
    Commented Sep 4, 2023 at 14:37
  • $\begingroup$ @whpowell96 So what should the BC be at the bottom? My other thought was that the flux draining is simply the flow rate times the concentration at the drain, $C(L)$ $\endgroup$ Commented Sep 5, 2023 at 23:41
  • $\begingroup$ If nothing is flowing, then flux is zero; i.e., $q\cdot \hat{n}=0$. For one spatial dimension, the normal vector is just a sign change but since it is zero it doesn't matter here. I can write this up as a more detailed answer tomorrow, but it follows from the fact that physical boundary conditions are typically only applied to either the state or the flux. Neumann boundary conditions are a often just special case of the latter. $\endgroup$
    – whpowell96
    Commented Sep 5, 2023 at 23:44
  • $\begingroup$ Let me make sure I didn't confuse the issue. The sample is flowing out the bottom, albeit slowly, through a tiny opening, the sample line. So I thought diffusion wouldn't be important, but if $q = vC - DC_x$ is still appropriate then let's use that. $\endgroup$ Commented Sep 5, 2023 at 23:56
  • $\begingroup$ Is the sample flowing through the bottom at some prescribed rate? If so that would just be another Robin condition $q\cdot\hat{n} = \psi$. I am not familiar with models where the flux is definitionally different depending on where you are in the domain. I would assume a priori that diffusion and convection should be considered everywher in the domain $\endgroup$
    – whpowell96
    Commented Sep 6, 2023 at 0:55

1 Answer 1

2
$\begingroup$

If you are negleting the fact the the level of the flow gets lower as the bottle drains, then you are implicitly assuming that new water comes into the domain at speed $v$. Since the analyte inflows at a prescribed rate, too, I would use the condition $vC=\phi$ at the top of the bottle, that you can further split into $v=0.1\mathrm{cm/min}$ and $C=\phi/v$ if you need. If you include the diffusive flux of concentration in the top boundary condition you will potentially allow the analyte to diffuse outwards, depending on the concentration gradinent, which does not make much sense considering your physical system.

The bottom condition you wrote is ok because it allows the analyte to exit the domain only because of the flow of water. Consider that with 1D advection you do not need a boundary condition when the prescribed flow velocity blows towards the outside of the domain, so you are ok setting only a homogeneous Neumann condition on the concentration.

$\endgroup$
4
  • $\begingroup$ Thanks. Sorry to pivot the question, but 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 hindawi.com/journals/mpe/2013/384246 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? $\endgroup$ Commented Sep 14, 2023 at 10:57
  • 1
    $\begingroup$ Hi, I will try to help with your question in the next days if I find some time $\endgroup$
    – Rigel
    Commented Sep 14, 2023 at 12:57
  • $\begingroup$ I believe rewriting the equation would help clarify how you applied your transformation (this would help also other readers that are interested in your problem). In addition, your question changes a lot with this new transformation. My opinion is that it would be better to close this and open a new one. If my previous answer was satisfying, that should be marked as accepted. I'm already thinking to an answer for your updated question. $\endgroup$
    – Rigel
    Commented Sep 15, 2023 at 7:05
  • $\begingroup$ Done. Thank you. scicomp.stackexchange.com/questions/43235/… $\endgroup$ Commented Sep 15, 2023 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.