  The transition from a microscopic model for the movement of many particles to
a macroscopic continuum model for a density flow is studied. The microscopic
model for the free flow is completely deterministic, described by an
interaction potential that leads to a coherent motion where all particles move
in the same direction with the same speed known as a flock. Interaction of the
flock with boundaries, obstacles and other flocks leads to a temporary
destruction of the coherent motion that macroscopically can be modeled through
density dependent diffusion. The resulting macroscopic model is an
advection-diffusion equation for the particle density whose diffusion
coefficient is density dependent. Examples describing i) the interaction of
material flow on a conveyor belt with an obstacle that redirects or restricts
the material flow and ii) the interaction of flocks (of fish or birds) with
boundaries and iii) the scattering of two flocks as they bounce off each other
are discussed. In each case, the advection-diffusion equation is strictly
hyperbolic before and after the interaction while the interaction phase is
described by a parabolic equation. A numerical algorithm to solve the
advection-diffusion equation through the transition is presented.
