Gas flow and heat transfer in both cathode and anode channels have been modeled and analyzed for proton exchange membrane fuel cells. The simulated channel consists of a porous electrode layer (anode or cathode), gas flow duct, and solid current collector. The characteristics of gas flow and heat transfer in terms of friction factor and Nusselt number were investigated by a three-dimensional computational fluid dynamics code (CFD). A combined thermal boundary condition, which is unique for fuel cells and interfacial conditions between the porous layer, the gas flow duct, and the solid current collector, were clarified and applied in the calculation. The heat generation and mass transport processes have been modeled and implemented into the code by proper source terms. Furthermore, the effects of various parameters on the generation of heat, mass transport process, gas flow, and heat transfer are assessed also. These parameters include current density and permeability, effective thermal conductivity, and thickness of porous diffusion layer.