We present a numerical model for generating cylindrical vector beams (CVBs) through an ytterbium-doped few-mode fiber laser. A practical numerical model based on propagation rate equations with consideration of propagating modes competition between LP01 and LP11. To optimize the output power of LP11 while depress LP01, we analyze the dependence of this competition on resonant wavelength, pump power, ytterbium doped fiber (YDF) length, doping concentration and distribution. We also propose an effect method to completely depress the generation of LP01.