probability density distribution: From free diffusion to presence of a barrier I am a biologist and I am not very comfortable with statistical mechanics. However, I want to learn and I am trying to understand. I just need some clues from people that handle these topics easily.
I would like to model the probability density distribution (PDF) for a particle moving from xo to x in time t, in presence of a barrier. We have the solution for "absence of a barrier" = free diffusion (1st case). We have the solution in presence of a barrier (2nd case). However, I'm interested in knowing how PDF would change from "1st case" to "2nd case" if I model the adding of a barrier at time t1.
Statistical mechanics is used in both cases. I'm interested to know what I should study and look at if I want to model this "phase transition" from case 1 to case 2.
I'm following this article in which both cases are present: https://www.sciencedirect.com/science/article/pii/S1090780714002134
 A: Actually, all the work has been done in the paper that you refer to. The solution of diffusion equations is conveniently handled by calculating the propagator or Green's function, $G(x,y;t)$. This is the probability density of finding a particle at position $x$ at time $t$, given that it started at position $y$ at time $0$. You can imagine it describing how a very narrow initial distribution of density (a Dirac delta function $\delta(x-y)$ ) spreads with time, and becomes a Gaussian function of $x$ at later times:
$$
G_0(x,y;t) = \frac{1}{\sqrt{4\pi Dt}} \exp[-(x-y)^2/4Dt]
$$
The useful feature is that, because the diffusion equation is linear, any initial distribution of density $\rho(x,0)$ can be described as a linear superposition of spreading Gaussians, determined by the initial conditions. 
So at time $t_1$
$$
\rho(x,t_1) = \int_{-\infty}^\infty \, G_0(x,y;t_1) \, \rho(y,0) \, dy
$$
depending on your initial density $\rho$ at $t=0$. If your particles really are localised at position $y$ at time zero, $\rho(x,0)=\delta(x-y)$, then this simplifies to $\rho(x,t_1)=G_0(x,y;t_1)$.
Now, the propagator must be constructed to comply with the imposed boundary conditions. The propagator above, $G_0$, is for no barrier: the boundary conditions are simply that the density should vanish as $x\rightarrow\pm\infty$. When the semi-permeable barrier is present, the propagator is more complicated. However, the cited paper gives the propagator for this case, $G(x,y;t)$, in eqn (5), in terms of complementary error functions. It is a combination of slightly different formulae depending on the signs of $x$ and $y$. Nonetheless, it functions in exactly the same way as $G_0$. Therefore, if you insert the barrier at time $t_1$, start with the density $\rho(x,t_1)$ determined by the no-barrier propagator up to that time, and seek solutions at $t>t_1$, you get
$$
\rho(x,t) = \int_{-\infty}^\infty \, G(x,y;t-t_1) \, \rho(y,t_1) \, dy
$$
In the case that $\rho(x,0)=\delta(x-y)$ we can write this as 
$$
\rho(x,t) = \int_{-\infty}^\infty \, G(x,y';t-t_1) \, G_0(y',y;t_1) \, dy'
$$
and the quantity on the left can be interpreted as the overall propagator 
(probability density to be at position $x$ at time $t$, given initial position $y$ at time $0$),
incorporating the effects of free diffusion up to time $t_1$,
followed by diffusion in the presence of the barrier for later times.
NB in the equations above $\rho(x,t)$ represents the probability density of the diffusing particles, as a function of position and time. In the cited paper, $\rho$ is used for something different.
