This research is devoted to the mathematical modeling for the filtration of a generalized Newtonian fluid in porous media by applying the homogenization method. The so-called local problem on a periodic cell are given for describing the local transfer of a CarreauYasuda fluid. The permeability tensor of a Carreau-Yasuda fluid is obtained, which is proved to be symmetric and positive definite. The particularity of local problems is discussed. A new numerical method for solving local problems is developed, which is based on the physical properties of microstructures to transform local problems into problems defined on one-eighth periodic cells, and solved by the finite element method. The solution of the local problems allows us to determine the precise local distributions of velocities, pressures and non-Newtonian viscosities in a separate pore, and also to evaluate the permeability coefficient and effective viscosity of the generalized Newtonian fluid in porous media. The local flows of a Carreau-Yasuda fluid in the three-dimensional ceramic porous structure are simulated, and the proposed model and numerical method are verified. Finally, this model is applied to the sensitivity of non-Newtonian viscosities to the permeability and the effective viscosity.