  The DELiTE (Differential Equations on Linear Triangular Elements) framework
was developed for spatial discretisation of partial differential equations on
an unstructured triangular grid in axisymmetric geometry. The framework is
based on discrete differential operators in matrix form, which are derived
using linear finite elements and mimic some of the properties of their
continuous counterparts. A single-fluid two-temperature MHD code is implemented
in this framework. The inherent properties of the operators are used in the
code to ensure global conservation of energy, particle count, toroidal flux,
and angular momentum. The code was applied to study a novel experiment in which
a compact torus (CT), produced with a magnetized Marshall gun, is magnetically
levitated off an insulating wall and then magnetically compressed through the
action of currents in the levitation/compression coils located outside the
wall. We present numerical models for CT formation, levitation, and magnetic
compression, and comparisons between simulated and experimental diagnostics.
