Optimal reservoir conditions for fluid extraction through permeable walls in the viscous limit