  Starting with zero initial conditions we simulate the current-voltage
characteristics (CVCs) of Intrinsic Josephson Junctions (IJJ) for parameters
close to that of the BSCCO mesas. The simulation shows a regular pattern with
voltage jumps at voltages satisfying the cavity resonance conditions. The
calculated emission has peaks at every voltage jump. Analyzing the phases we
observe a two-dimensional standing wave pattern with a kink configuration as
their static part. Depending on the kink configuration and the bias current,
the kink amplitudes may differ from $\pi$ . By means of Fast Fourier Transform
(FFT) we show that the frequencies excellently satisfy the ac Josephson
relation as in the real experiments. Integer higher harmonics up to fifth order
are also observed. Calculated amplitude maps for the frequencies achieved and
their harmonics demonstrate that together with cavity modes there exist
nonlinear background modes. Direct observation of the phase dynamics shows a
relation between oscillations of the background modes and the static kink
configuration: opposite static kinks in different junctions correspond to
opposite ($\pi$-shifted) oscillations of the background modes.
