A comprehensive three-dimensional modeling of static K diode pumped alkali laser (DPAL) and flowing-gas K and Rb DPALs is carried out. The cases of He/CH4 and pure He buffer gases are investigated and the output power and optical efficiency calculated for various pump powers, mole fractions of methane, buffer gas pressures and flow velocities. The model considers the processes of excitation of high levels of K and Rb, ionization, ion-electron recombination and heating of electrons which affect the diffusion coefficient of K and Rb ions. It explains the experimentally observed sharp increase in power in static K DPAL caused by the addition of a few percent of methane to He buffer gas and its decrease with further increase in the methane percentage [B.V. Zhdanov et al, Opt. Exp. 25, 30793 (2017)]. The predictions of the model for different He/CH4 mixtures are presented and verified by comparing them with experimental results for K flowing-gas DPAL [A. J. Wallerstein, Ph.D. dissertation (Air Force Institute of Technology, 2018)] and with the calculated results obtained using a simplified three-level model based on one-dimensional gas dynamics approach reported by A. Gavrielides et al [J. Opt. Soc. Am. B 35, 2202 (2018)].