Polymer solution flow is studied numerically in a periodic, hexagonal array of cylinders as a model for a porous medium. We use a lattice Boltzmann method supplemented by a polymer stress, where the polymers are modeled as finitely extensible, nonlinear, elastic dumbbells. The simulated, nonmonotonic behavior of the effective viscosity μ eff as a function of the Weissenberg number We is in qualitative agreement with experiments in the literature. An analytical model, which replaces the flexible polymers by rods and that replaces the flow field in the porous medium by a superposition of shear and elongation, correctly reproduces the simulated μ eff as a function of the polymer extensibility parameter b in the limit of large We.