I'm working with a mass density gradient with length $L$ and I'm trying to solve the heat equation in 1-D (mass diffusion equation, $\partial_t\rho(t,x)=D\Delta\rho(t,x)$), but I'm not sure which boundary conditions should I use and what would they physically mean.
The starting mass density profile ($\rho(0,x)=f(x)$) is a step-function, where the lower half has density $\rho_1$ and the upper half has $\rho_2$.
$f(x)=\begin{array}{ll} \rho_1 & 0<x<L/2 \\ \rho_2 & L/2<x<L \\ \end{array}$
Considering the boundary conditions, I find more difficult to interpret them. The mass inside the sample's volume is kept constant during the experiment as the sample is isolated from surroundings.
For this purpose, would Neumann Boundary Conditions be appropriate?
$$\partial_x \rho(t,0)=0=\partial_x \rho(t,L) $$
I'm unsure because all the examples I found do not treat the heat equation/diffusion equation as function of mass density ($\rho$). Would Neumann BC suggest No Mass Transfer between the sample's volume and the surroundings?