= Reflecting boundary condition
A \b[reflecting boundary condition] prevents normal particle or probability <flux> through a wall. For drift-free scalar <diffusion> with $D>0$, the condition is
$$
\mathbf j\cdot\mathbf n=0,\qquad\mathbf j=-D\nabla p,
\qquad\partial_n p=0.
$$
Here $\mathbf n$ is the outward <unit normal>. The last expression is a homogeneous <Neumann boundary condition>. Integrating the <diffusion equation> and applying the <divergence theorem> gives conservation of total probability or material in a closed container.<Linear Partial Differential Equations Lecture 10 in MIT OpenCourseWare>[pp.1–2: diffusive flux, closed container and conserved integral]{ref}
For an original example, choose units in which the interval is $0\leq x\leq1$. The density
$$
p(x,t)=1+a e^{-D\pi^2t}\cos(\pi x),\qquad |a|\leq1,
$$
satisfies $p_t=Dp_{xx}$, has zero endpoint derivatives and integrates to one. With $a=0.6$, $D=0.5$ and $t=0.5$, its cosine amplitude is about $0.050883$. A nonuniform density therefore relaxes while remaining inside the interval; reflection does not hold the boundary concentration fixed.
For anisotropic <diffusion>, impose zero normal <diffusive flux> using the full <diffusion tensor>. At a wall with $\mathbf n=(1,0)$, let
$$
\mathbf D=\begin{pmatrix}2&1\\1&2\end{pmatrix},\qquad
\nabla C=\begin{pmatrix}1\\-2\end{pmatrix}
$$
in consistent units. Then $\mathbf n^T\mathbf D\nabla C=0$, although $\partial_nC=1$. Setting the normal derivative to zero would impose a different condition. Absorption and finite permeability require their own boundary models; a reflecting wall allows continued motion within the available space.
Back to article page