TITLE: Diffusion model - sign of boundary condition
QUESTION [0 upvotes]: I'm trying to compute the concentration of some pollutant in the rectangular pool.
The pool is isolated from two sides (hatching in the picture), on the third side there is some cleaner which maintains a stable concentration of pollutant $c_0$ (right side - solid line in the picture). 
My problem lies on the last side (top, dashed line) - it's clear, that there will be the condition:
$$
\lambda \cdot \frac{\partial c(x,y)}{\partial y} = \varphi(x)
$$

My question
Which sign will be before the diffusion constant $\lambda$? 
At first I was sure, that $+$, because the pollutant moves inside the area of the pool, so it increases the concentration.
But now, I'm not so sure about it, because I realized, that the normal vector is, as far as I know, supposed to point outside of the pool area and the sign should be chosen according to it. My diffusion flow goes into the pool area and so, according to this logic, there should be $-$ before the diffusion constant $\lambda$.
Which argument is correct?

REPLY [0 votes]: You are talking about Fick's law of diffusion (https://en.wikipedia.org/wiki/Fick%27s_laws_of_diffusion).
The negative sign comes from the fact, that diffusion always happens in the direction where concentration gets lesser (negative gradient).
Imagine a situation where at $x=0$ you have no concentration of a particle and at $x=1$ you have 100% of one particle. And imagine a linear increase of concentration from $x=0$ to $x=1$. The concentrations gradient $\frac{dc}{dx}$ is positive. But diffusion will happen in the negative $x$-direction. Hence the flux $$j=-\lambda\frac{dc}{dx}$$
{"set_name": "stack_exchange", "score": 0, "question_id": 1759780}