Magnetic Resonance and the Principle of Minimum Entropy Production