A nonhydrostatic numerical model is used to simulate two-dimensional f
rontogenesis forced by either horizontal deformation or shear. Both in
viscid frontogenesis prior to frontal collapse and frontogenesis with
horizontal diffusion following collapse are considered. The numerical
solutions generally agree well with semigeostrophic (SG) theory, thoug
h differences can be substantial for intense fronts. Certain deviation
s from SG that have been previously discussed in the literature are, u
pon closer examination, associated with spurious gravity waves produce
d by inadequate resolution or by the initialization of the numerical m
odel. Even when spurious waves are eliminated, however, significant de
viations from SG still exist: gravity waves are emitted by the frontog
enesis when the cross-front scale becomes sufficiently small, and high
er-order corrections to SG may also be present. In the postcollapse so
lutions (where they are most prominent), the emitted waves are station
ary with respect to the front and lead to a band of increased low-leve
l ascent just ahead of the surface front. It is suggested here that, w
hen small, the deviations from SG arise as the linear forced response
to the cross-front accelerations neglected by SG.