  We present the results of numerical simulations of the dynamical behavior of
trajectories of ultra cold neutrons (UCN) in a magnetic trap. The main goal of
our simulations was to optimize the trap parameters in order to minimize the
characteristic times for removing from the trap those untrapped neutrons with
relatively long escape times (cleaning the trap). Our results demonstrate that,
by a proper choice of the trap parameters cleaning times can be reduced to 15
sec, or even less. Many other dynamical characteristics of the neutrons in the
trap, including the conservation of the adiabatic invariant which characterizes
the orientation of the magnetic moment along the local magnetic field, are also
discussed.
