  We consider the dynamics of a two-dimensional array of underdamped Josephson
junctions placed in a single-mode resonant cavity. Starting from a well-defined
model Hamiltonian, which includes the effects of driving current and
dissipative coupling to a heat bath, we write down the Heisenberg equations of
motion for the variables of the Josephson junction and the cavity mode,
extending our previous one-dimensional model. In the limit of large numbers of
photons, these equations can be expressed as coupled differential equations and
can be solved numerically. The numerical results show many features similar to
experiment. These include (i) self-induced resonant steps (SIRS's) at voltages
V = (n hbar Omega)/(2e), where Omega is the cavity frequency, and n is
generally an integer; (ii) a threshold number N_c of active rows of junctions
above which the array is coherent; and (iii) a time-averaged cavity energy
which is quadratic in the number of active junctions, when the array is above
threshold. Some differences between the observed and calculated threshold
behavior are also observed in the simulations and discussed. In two dimensions,
we find a conspicuous polarization effect: if the cavity mode is polarized
perpendicular to the direction of current injection in a square array, it does
not couple to the array and there is no power radiated into the cavity. We
speculate that the perpendicular polarization would couple to the array, in the
presence of magnetic-field-induced frustration. Finally, when the array is
biased on a SIRS, then, for given junction parameters, the power radiated into
the array is found to vary as the square of the number of active junctions,
consistent with expectations for a coherent radiation.
