A capillary flow model for filtration