Topology optimization offers optimal material layouts, enabling automation in the design of devices. Given the recent advances in computer technology and additive manufacturing, topology optimization is increasingly being used to design complex porous structures, for example, microfluidic devices. For the flow of fluids in such miniature-sized porous structures, viscous shearing stresses will be significant. However, the Darcy model—the most popular mathematical model describing the flow of a single-phase incompressible fluid in rigid porous media—neglects the internal friction arising from viscous shearing stresses. We, therefore, develop a material design framework under the topology optimization based on the Darcy–Brinkman model—a mathematical model for the flow of fluids through porous media that accounts for internal friction besides the drag considered in the Darcy model. The proposed framework uses the total rate of mechanical dissipation—a physical quantity—for the objective function. To understand the effect of viscous shearing stresses on the design, we compare the optimal material layouts provided by the Darcy and Darcy–Brinkman models under topology optimization. In particular, we show, using analytical solutions corroborated by numerical simulations, that the optimal material layouts are alike for the class of problems exhibiting axisymmetry, for which viscous shearing stresses vanish. These analytical solutions will be valuable to check the veracity of numerical simulators. For those problems with dominant viscous shearing stresses (e.g., flow in a backward-facing step domain), we show, using numerical solutions, the optimal material layouts under the Darcy and Darcy–Brinkman models are very different. Also, the associated solution fields (i.e., velocity and pressure) are qualitatively different under their respective optimal layouts for these two models.