  We consider a one-phase Bernoulli free boundary problem in a container $D$ -
a smooth open subset of $\mathbb{R}^d$ - under the condition that on the fixed
boundary $\partial D$ the normal derivative of the solutions is prescribed. We
study the regularity of the free boundary (the boundary of the positivity set
of the solution) up to $\partial D$ and the structure of the wetting region,
which is the contact set between the free boundary and the
($(d-1)$-dimensional) fixed boundary $\partial D$. In particular, we
characterize the contact angle in terms of the permeability of the porous
container and we show that the boundary of the wetting region is a smooth
$(d-2)$-dimensional manifold, up to a (possibly empty) closed set of Hausdorff
dimension at most $d-5$.
