In this paper, a non-isothermal two-phase flow in the cathode gas diffusion layer (GDL) of PEM fuel cell is modeled. The governing equations including energy, mass and momentum conservation equations are solved by numerical methods. Also, the optimal values of the effective parameters such as the electrodes porosity, gas diffusion layer (GDL) thickness and inlet relative humidity are calculated using the optimization algorithms. Optimization is done by considering the fuel cell voltage as the objective function. The results show that by increasing the relative humidity of the air, the rate of evaporation in cathode GDL and temperature distribution across the fuel cell decreases. Among the different methods of optimization, the best method for two phase flow is Simulated Annealing algorithm. Optimum porosity of the electrodes, GDL thickness and relative humidity are obtained 0.44, 0.24 mm and 99%, respectively. The fuel cell power density at optimum condition increased 6% compared to the base condition.
 M. Ji and Z. Wei, (2009). A Review of Water Management in Polymer Electrolyte Membrane Fuel Cells, Energies, 2: 1057.
 B. M. Bernardi and M.W.Verbrugge (1991). Mathematical Model of a Gas Diffusion Electrode Bonded to a Polymer Electrolyte, Journal of AIChE, , 37 : 1151.
 B. M. Bernardi and M.W.Verbrugge (1992). A Mathemathical Model of the solid-polymer-electrolyte fuel cell", Journal of The Electrochemical Society, 139 : 2477.
 A. Rowe and X.Li,(2001). Mathematical Modeling of proton exchange membrane fuel cells, Journal of Power Sources, 102 : 82.
 N.Djilali and D.Lu (2002). Influence of heat transfer on gas and water transport in fuel cells, International Journal of Thermal Science, 41 : 20.
 E. Afshari and S. A. Jazayeri, 2008. Heat and Water Management in PEM Fuel Cell, Journal of WSEAS Transactions on fluid mechanics, 3 : 137.
 U.Pasaogullari and C. Y.Wang,(2004). Liquid Water Transport in Gas Diffusion Layer of Polymer Electrolyte Fuel Cells", Journal of The Electrochemical Society, 151 : 399.
 Z. Zhan ,J. Xiao,D. Li, M. Pan and Y. Runzhang, (2006). Effects of porosity distribution variation on the liquid water flux through gas diffusion layers of PEM fuel cells, Journal of Power Sources, 160 : 1041.
 M.Vynnycky,(2007). On the modeling of two-phase flow in the cathode gas diffusion layer of a polymer electrolyte fuel cell, Applied Mathematical and Computation, 189 : 1560.
 W.Shi,E. Kurihara and N. Oshima,(2008). Effects of capillary pressure on liquid water removal in the cathode gas diffusion layer of a polymer electrolyte fuel cell, Journal of Power Sources, 182 : 112.
 H.Hassanzadeh, A. Ferdowsara and M. Barzgary,(2014). Modeling of two phase flow in the cathode of gas diffusion layer of proton exchange membrane fuel cell, Modares Mechanical Engineering, 14 : 55 (In Persian).
 H.Hassanzadeh,S.H.Golkar and M. Barzgary ,(2015). Modeling of two phase and non - isothermal flow in polymer electrolyte fuel cell, Modares Mechanical Engineering, 15 : 313 (In Persian).
 S. H. Golkar, (2014). Two phase and non-isothermal modeling and optimization of PEM Fuel cell, M sc. Thesis, University of Birjand, (In Persian).
 E. A. Ticianelli,C. R. Derouin, A. Redondo and S. Srinivasan,(1988). Methods to Advance Technology of Proton Exchange Membrane Fuel Cells", Journal of The Electrochemical Society, 135 : 2209.
 D. Song, Q. Wang, Z. S. Liu and C. Huang, (2006). Transient analysis for the cathode gas diffusion layer of PEM fuel cells, Journal of Power Sources, 159 : 928.
 T. Susai, M Kaneko, K. Nakato, T. Isono, A. Hamada and Y. Miyake,(2001). Optimization of proton exchange membranes and humidifying conditions to improve cell performance polymer electrolyte fuel cells, International Journal of Hydrogen Energy, 26: 631.
 M. Grujicic, C. L. Zhao, K. M. Chittajallu and J. M. Ochterbeck ,(2004). Cathode and interdigitated air distributor geometry optimization in polymer electrolyte membrane (PEM) fuel cells, Materials science and Engineering, 108 : 241.
 M. Grujicic and K. M. Chittajallu,(2004). Design and optimization of polymer electrolyte membrane (PEM) fuel cells, Applied Surface Science, 227 : 56-72.
 V. Mishra, F. Yang and R. Pitchumani,(2005). Analysis and design of PEM fuel cells, Journal of Power Sources, 141: 47.
 P. K. Das, X. Li and Z. Liu, (2007). Analytical approach to polymer electrolyte membrane fuel cell performance and optimization, Journal of Electroanalytical Chemistry, 604 : 72.
 B. Dokkar, N. Chennouf, N. Settou, B. Negrou and A. Benmhidi,(2013). Analysis and optimization of PEM fuel cell biphasic model, International Journal of Chemical, Materials Science and Engineering, 7: 24.