The evolution of the magnetic field and the manner of conversion of thermal energy into different forms in the corona following a solar flare are investigated by means of a nonplane magnetohydrodynamic (MHD) analysis. All three components of magnetic field and velocity are treated in a physically self-consistent manner, with all physical variables as functions of time (t) and two spatial coordinates (r, theta). The difference arising from the initial magnetic field, either twisted (force-free) or non-twisted (potential), is demonstrated. Consideration is given to two initial field topologies (open vs. closed). The results demonstrate that the conversion of magnetic energy is faster for the case of the initially twisted (force-free) field than for the initially untwisted (potential) field. In addition, the twisted field is found to produce a complex structure of the density enhancements.