How do i mathematically represent reflection in a (diffusion) Problem? I am trying to formulate boundary conditions and it occurred to me that I never had to implement a reflective boundary before. 
The example is a one dimensional diffusion, where at $x=0$ the particles are reflected and at $x=L$ they instantly disappear in a sink. 
My question now is: 
Why can this be implemented by saying the flux must be zero at $x=0$ and with that due to Fick's first law the spatial derivative of the probability density? (this is what my research tells me so far)
In QM, we can confine a particle in a box by saying the wave function and with that the probability density are zero at the boundaries. Why does this not work here to create reflection?
And, secondly, I would like to get a better understanding on why the condition on the flux creates the conditions for reflection.
 A: Consider the general diffusion equation of the form,
$$
\frac{\partial \psi}{\partial t}=D\frac{\partial\Phi}{\partial x}=D\frac{\partial^2\psi}{\partial x^2}\tag{1}
$$
where $\Phi=\partial_x\psi$ is the probability current (flux).
In order to replicate a reflecting boundary, we establish an infinite potential at the boundaries, $V\left(x=0\right)=V\left(x=L\right)=\infty$. The particles are then unable to diffuse past $x=0$ and $x=L$ due to this boundary (containing all the particles within $0\leq x\leq L$), which must mean that the probability current, $\Phi$, must vanish at those points. The total population is then conserved in this case:
$$
\int\psi(x,t)\,dx=1
$$
Assuming, of course, that the population is normalized initially.
Setting $\psi=0$ at $x=0,L$ means that the boundary absorbs the population $\psi$. Again assuming that $\int\psi(x,t=0)\,dx=1$, then for $t>0$, the total population is not conserved:
$$
\int\psi(x,t)\,dx\neq1
$$
Hence, this cannot replicate a reflecting boundary. In fact, this integral returns the fraction of particles that have not been absorbed at time $t$ and is sometimes called the survival probability.
