Solar flare magnetohydrodynamics