A model of runaway electron generation and orbit predictions is described and applied to the problem of determining the influence of magnetic field ripple on the radiation loss and energy limits of runaway electrons. In particular the prediction of orbits and energy limits for a proposed ITER design are discussed. It is found that a resonance between the electron gyrofrequency and the fundamental ripple frequency can lead to large synchrotron radiation losses and create an upper bound on runaway energy which is strongly dependent on the pitch angle. Interactions with the second harmonic of the ripple field are very sensitive to the ripple amplitude and may lead to a further reduction in runaway energy. In ITER, this effect can limit the runaway energy to values of 270 MeV.