3

I'm interested in applying Robin boundary condition to a convection-diffusion problem in 1D.

In the following system, $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$

$$\frac{\partial C}{\partial t} = \frac{\partial}{\partial x}( D\frac{\partial C}{\partial x} - vC)$$ To implement no-flux boundary condition ,flux $$ N = D\frac{\partial C}{\partial x} - vC $$ is set to zero at the left and right boundary.

I'd like to know whether the sign of terms in the flux will vary at the right and left boundary.

According to the following description given in wiki,

enter image description here

enter image description here

Could someone explain if the above-mentioned method is the right way to implement?

Natasha
  • 421
  • 4
  • 18

1 Answers1

2

I think that the second boundary condition equation is incorrect. The first one should be right for both ends. Following your notation, the flux of mass in the domain should be: $$N = vC - D \frac{\partial C}{\partial x}$$ everywhere including the boundary points.

Keep in mind that the sign of the boundary condition value is positive if the direction of mass flux is positive and vice versa.

KJ Nam
  • 81
  • 2
  • Many thanks for the response . However, I don't understand why you have denoted flux to be vC-DdC/dx and not DdC/dx - vC as represented in my post.Could you please explain? – Natasha Oct 30 '19 at 02:29
  • The total fiux consists of two fluxes: The first one is advective flux that carries mass by the flow. This can be expressed in $vC$, which means the mass $C$ is transported along the direction of the flow. The second one is dispersive (or diffusive) flux that moves mass from higher concentration area to lower one. The direction of this flux is against the concentration gradient, so $-D \partial C / \partial x$. – KJ Nam Oct 30 '19 at 04:46
  • Thank you. Your explanation makes sense. But I saw another post here and here that states flux (DdC/dx -vC).n =g .Side note: My flow is in the positive direction – Natasha Oct 30 '19 at 05:06
  • It is amazing and unfortunate to see how inaccurate the information on the internet can be. I would rather recommend this Wikipedia document, https://en.wikipedia.org/wiki/Convection%E2%80%93diffusion_equation#Derivation, to you. No matter where you look at, the equation should not vary. – KJ Nam Oct 30 '19 at 05:15
  • I had a look at the description in the link that you provided. Over there, all the terms are on the LHS and the definition of flux that you stated holds true. But in pdepe solver of MATLAB the expression itself has the form of time derivative on LHS and rest on RHS. I would think in such a case N would be DdC/dx - vC. Second thoughts? – Natasha Oct 30 '19 at 05:33
  • @Natasha It depends on how the sign of the boundary flux value is set. If the exiting boundary flux is given as negative, you need to flip the sign of the boundary flux equation as you suggested. In fact, it could make a better physical sense when it is looked as mass gain and loss of the domain. The sign of the second boundary condition equation in your original question, however, is not flipped. – KJ Nam Oct 31 '19 at 05:25
  • "If the exiting boundary flux is given as negative", I am not sure if I understand this completely. I am solving for solute transport in a pipe. The liquid enters the left boundary and leaves the right boundary. – Natasha Nov 01 '19 at 06:57