Hypothesis Control of capillary flow through porous media has broad practical implications. However, achieving accurate and reliable control of such processes by tuning the pore size or by modification of interface wettability remains challenging. Here we propose that the flow of liquid by capillary penetration can be accurately adjusted by tuning the geometry of porous media and develop numerical method to achieve this. Methodologies On the basis of Darcys law, a general framework is proposed to facilitate the control of capillary flow in porous systems by tailoring the geometric shape of porous structures. A numerical simulation approach based on finite element method is also employed to validate the theoretical prediction. Findings A basic capillary component with a tunable velocity gradient is designed according to the proposed framework. By using the basic component, two functional capillary elements, namely, (i) flow amplifier and (ii) flow resistor, are demonstrated. Then, multi functional fluidic devices with controllable capillary flow are realized by integrating the designed capillary elements. All the theoretical designs are validated by numerical simulations. Finally, it is shown that the proposed model can be extended to three dimensional designs of porous media