  We study the convergence of the weak solution of the porous medium equation
with a type of Robin boundary conditions, by tuning a parameter either to zero
or to infinity. The convergence is in the strong sense, with respect to the
$L^2$-norm, and the limiting function solves the same equation with Neumann
(resp. Dirichlet) boundary conditions when the parameter is taken to zero
(resp. infinity). Our approach is to consider an underlying microscopic
dynamics whose space-time evolution of the density is ruled by the solution of
those equations and from this, we derive sufficiently strong energy estimates
which are the keystone to the proof of our convergence result.
