A nonlinear numerical simulation of a second harmonic gyrotron oscillator i
s presented in this paper. Mode competition from a competing fundamental mo
de is investigated. In addition, a self-consistent nonlinear theoretical mo
del, including the effect of velocity spread, is applied to analyze the sec
ond harmonic gyrotron. A series of numerical calculations is carried out fo
r different electron beam parameters. The results are compared with that of
calculations using the cold-cavity, fixed field approximation and with exp
eriments. Good agreement is found between our calculations and an experimen
t at Fukui University. The azimuthal polarization of the field and the choi
ce of the electron beam radius are also discussed.