Numerical modeling of mode excitation and mode competition at THz range gyrotrons operation at cyclotron harmonics