  Diffusion in heterogeneous media partitioned by semi-permeable interfaces has
a wide range of applications in the physical and life sciences, including gas
permeation in soils, diffusion magnetic resonance imaging (dMRI), drug
delivery, thermal conduction in composite media, synaptic receptor trafficking,
and intercellular gap junctions. At the single particle level, diffusion across
a semi-permeable interface can be formulated in terms of so-called snapping out
Brownian motion (SNOBM). The latter sews together successive rounds of
reflected BM, each of which is restricted to one side of the interface. Each
round of reflected BM is killed when the local time at the interface exceeds an
independent, exponentially distributed random variable. (The local time
specifies the amount of time a reflected Brownian particle spends in a
neighborhood of the interface.) The particle then immediately resumes reflected
BM on the same side or the other side of the interface according to a
stochastic switch, and the process is iterated. In this paper, we develop a
Monte Carlo algorithm for simulating a two-dimensional version of SNOBM, which
is used to solve a first passage time (FPT) problem for diffusion in a domain
with semi-permeable partially absorbing traps. Our method combines a
walk-on-spheres (WOS) method with an efficient algorithm for computing the
boundary local time that uses a Skorokhod integral representation of the
latter. We validate our algorithm by comparing the Monte Carlo estimates of the
MFPT to the exact solution for a single circular trap, and show that our
simulations are consistent with asymptotic results obtained for the 2D narrow
capture problem involving multiple small circular targets. We also discuss
extensions to higher dimensions.
