Optimizing the Nematic Liquid Crystal Relaxation Speed by Magnetic Field