Three‐dimensional simulation of flow through a porous medium